Difference between revisions of "Uno/Spec/Cascaded Mapping"

From Apache OpenOffice Wiki
< Uno‎ | Spec
Jump to: navigation, search
m (Fixed link.)
m (Added some links.)
 
(7 intermediate revisions by the same user not shown)
Line 1: Line 1:
version: {{REVISIONID}} <br>
+
[[Uno/Meta/Organization#Types|Type]]: Specification  [[Uno/Meta/Organization#States|State]]: final  [[Uno/Meta/Organization#Claims|Claim]]: recommended
state:   final         <br>
+
type:    specification <br>
+
  
== Cascaded Mapping ==
+
==Feature==
 +
Cascaded mapping generalizes the runtimes search&connect algorithm in a way, that it always finds a mapping between any two particular (purpose) [[Uno/Spec/Environment|environments]], necessarily falling back to the generic [[Uno/Binary/Spec/Uno Environment|Uno Environment]] for mediation, in case no specialized bridges ([[Uno/Spec/Mapping|mappings]]) can be found.
  
; Feature
+
For example:
: Cascaded mappings extend the mapping search algorithm in a generic way, that it always finds a mapping between any two particular (purpose) environments, necessarily falling back to the generic UNO environment for mediation in case no specialized mappings can be found.
+
<code>uno::Mapping("C++:unsafe", "C++")</code>
:
+
gets mediated via the <code>"unsafe_uno_uno"</code> purpose bridge:
: For example:
+
=> Mapping("C++:unsafe" -> "uno:unsafe" -> "uno" -> "C++")
: <code>uno::Mapping("gcc3:thread", "gcc3")</code>
+
: gets mediated via the "uno_uno_thread" purpose bridge:
+
: => Mapping("gcc3:thread" -> "uno:thread" -> "uno" -> "gcc3")
+
:
+
: Mapping algorithm:
+
:# directly map, in all cases with the same purpose: "uno:mutex" -> "gcc3:mutex" => "uno:mutex" -gcc3_uno-> "gcc3:mutex"
+
:# mediate through a purpose in case it is asked for a mapping between different purposes: "uno:mutex" -mutex_uno_uno-> "uno", the purpose here is "mutex_uno_uno"
+
:# mediate through the "uno" environment, if asked for a mapping from one purpose environment to another purpose environment: "uno:mutex" -> "uno:thread" => "uno:mutex" -mutex_uno_uno-> "uno" -thread_uno_uno-> "uno:thread"
+
:# recursively apply -4- in case a multi purpose has been specified: "gcc3:mutex:debug" -> "gcc3:thread" => "gcc3:mutex:debug" -gcc3_uno-> "uno:mutex:debug" -debug_uno_uno-> "uno:mutex" -mutex_uno_uno-> "uno" -thread_uno_uno-> "uno:thread" -gcc3_uno-> "gcc3:thread"
+
:# map through the nearest "uno:<purpose>" environment: "gcc3:debug:mutex" <-> "gcc3:debug:thread" => "gcc3:debug:mutex" -gcc3_uno-> "uno:debug:mutex" -mutex_uno_uno-> "uno:debug" -thread_uno_uno-> "uno:debug:thread" -gcc3_uno-> "gcc3:debug:thread"
+
:# shortcut if possible, no is mediation necessary, should directly map through purpose: "uno:debug:thread" -> "uno:debug" => "uno:debug:thread" -thread_uno_uno-> "uno:debug"
+
: The mapping algorithm does not know any particular purpose. It is just leverages the current purpose API.
+
  
; Rationale : The introduction of purpose environments allows, to have environments of the same type (e.g. "gcc3") but with different purposes. The introduction of cascaded mappings allows to map between environments of different purposes, by using the UNO runtimes protocol mapping mechanism.
+
==Mapping Algorithm==
 +
# In case both environments are of the same purpose, map directly, e.g. <br> "uno:unsafe" -> "gcc3:unsafe" => "uno:unsafe" -gcc3_uno-> "gcc3:unsafe" .
 +
# Mediate through a purpose bridge, in case it is asked for a mapping between different purposes, e.g. <br> "uno:unsafe" -unsafe_uno_uno-> "uno", the purpose bridge here is "unsafe_uno_uno".
 +
# Mediate through the "uno" environment, if asked for a mapping from one purpose environment to another purpose environment, e.g. <br> "uno:unsafe" -> "uno:affine" => "uno:unsafe" -unsafe_uno_uno-> "uno" -affine_uno_uno-> "uno:affine".
 +
# Recursively apply -4- in case a multi purpose environment has been specified, e.g. <br> "gcc3:unsafe:debug" -> "gcc3:affine" => "gcc3:unsafe:debug" -gcc3_uno-> "uno:unsafe:debug" -debug_uno_uno-> "uno:unsafe" -unsafe_uno_uno-> "uno" -affine_uno_uno-> "uno:affine" -gcc3_uno-> "gcc3:affine".
 +
# Always map through the nearest "uno:<purpose>" environment, e.g. <br> "gcc3:debug:unsafe" <-> "gcc3:debug:affine" => "gcc3:debug:unsafe" -gcc3_uno-> "uno:debug:unsafe" -unsafe_uno_uno-> "uno:debug" -affine_uno_uno-> "uno:debug:affine" -gcc3_uno-> "gcc3:debug:unsafe".
 +
# Shortcut if possible, no is mediation necessary, should directly map through purpose, e.g. <br> "uno:debug:affine" -> "uno:debug" => "uno:debug:affine" -affine_uno_uno-> "uno:debug".
 +
The mapping algorithm does not know any particular purpose. It is just leverages the current purpose API.
  
; API: None, implicit only.
+
==Rationale==
 +
The introduction of purpose environments allows to instantiate multiple environments of the same ABI (e.g. "gcc3") but with different purposes. Cascaded mappings allows to map between environments of different purposes, by using the Uno runtimes purpose mapping mechanism.
  
; Compatibility Issues: None.
+
==Dependencies==
 +
* [[../Purpose Environment]]
  
; Dependencies : [[../Purpose Environment]]
 
  
 +
[[Category:Spec]]
 +
[[Category:Uno]]
 
[[Category:Uno:Spec]]
 
[[Category:Uno:Spec]]

Latest revision as of 09:01, 13 February 2007

Type: Specification State: final Claim: recommended

Feature

Cascaded mapping generalizes the runtimes search&connect algorithm in a way, that it always finds a mapping between any two particular (purpose) environments, necessarily falling back to the generic Uno Environment for mediation, in case no specialized bridges (mappings) can be found.

For example:

uno::Mapping("C++:unsafe", "C++")

gets mediated via the "unsafe_uno_uno" purpose bridge: => Mapping("C++:unsafe" -> "uno:unsafe" -> "uno" -> "C++")

Mapping Algorithm

  1. In case both environments are of the same purpose, map directly, e.g.
    "uno:unsafe" -> "gcc3:unsafe" => "uno:unsafe" -gcc3_uno-> "gcc3:unsafe" .
  2. Mediate through a purpose bridge, in case it is asked for a mapping between different purposes, e.g.
    "uno:unsafe" -unsafe_uno_uno-> "uno", the purpose bridge here is "unsafe_uno_uno".
  3. Mediate through the "uno" environment, if asked for a mapping from one purpose environment to another purpose environment, e.g.
    "uno:unsafe" -> "uno:affine" => "uno:unsafe" -unsafe_uno_uno-> "uno" -affine_uno_uno-> "uno:affine".
  4. Recursively apply -4- in case a multi purpose environment has been specified, e.g.
    "gcc3:unsafe:debug" -> "gcc3:affine" => "gcc3:unsafe:debug" -gcc3_uno-> "uno:unsafe:debug" -debug_uno_uno-> "uno:unsafe" -unsafe_uno_uno-> "uno" -affine_uno_uno-> "uno:affine" -gcc3_uno-> "gcc3:affine".
  5. Always map through the nearest "uno:<purpose>" environment, e.g.
    "gcc3:debug:unsafe" <-> "gcc3:debug:affine" => "gcc3:debug:unsafe" -gcc3_uno-> "uno:debug:unsafe" -unsafe_uno_uno-> "uno:debug" -affine_uno_uno-> "uno:debug:affine" -gcc3_uno-> "gcc3:debug:unsafe".
  6. Shortcut if possible, no is mediation necessary, should directly map through purpose, e.g.
    "uno:debug:affine" -> "uno:debug" => "uno:debug:affine" -affine_uno_uno-> "uno:debug".

The mapping algorithm does not know any particular purpose. It is just leverages the current purpose API.

Rationale

The introduction of purpose environments allows to instantiate multiple environments of the same ABI (e.g. "gcc3") but with different purposes. Cascaded mappings allows to map between environments of different purposes, by using the Uno runtimes purpose mapping mechanism.

Dependencies

Personal tools