Community
Participate
Working Groups
In QVTu mapping refinement can ensure that a derived mapping hides a base mapping. QVTu2QVTm flattens refinement, but discards the priority and exclusion so that all matches happen. ... Ultimately this means that QVTi execution must be able to make an appropriate dispatch choice amongst a polymorphic group of candidates.
Normal Semantics: naively, all object permutations are passed to all mappings. Refined semantics: Every mapping has a refined predicate for each of the direct refinements of the mapping. The refined predicate passes if any predicate of the refining mapping fails. i.e for B refines A1, B refines A2, C1 refines B, C2 refines B. For a given permutation of objects (C1 and/or C2) or B or (A1 and/or A2) or nothing executes. e.g. if C1 executes, C2 is unaffected, B, A1, A2 are suppressed. WFR: Refinement relationships form an acyclic directed graph. --- Consider a stupid refinement of the Ecore metamodel. Mapping A consumes an EReference, Mapping B refines Mapping A and consumes an EAttribute. Mapping B is invoked normally for all EAttributes. Mapping A is invoked for each EReference and the has-Mapping-B-passed predicate is evaluated. Mapping B cannot consume an EReference, so the predicate might pass if Mapping B processed any EAttribute - unhelpful. WFR: A refining mapping must consume all the inputs of the refined mapping. ? are same inputs identified by same guard variable name / type / position? - type doesn't work if two inputs have same type - position doesn't work for multiple refinement - name may be very restricting for multiple refinement => name for now (? refinement binding may be needed for flexibility) --- QVTu2QVTm: the refinement mappings are flattened. The refinement relationship are retained as supersedes relationships. QVTm2QVTp: the supersedes are retained by the primary partitioned mappings (secondaries have no failing predicates). QVTp2QVTs: each leaf supersedes is scheduled (e.g. C1 and C2) as supercession of the possibilities e.g. C1,B,A1,A2 or C2,B,A1,A2. The supercession may be pruned by static analysis. QVTs2QVTi: supersedes relationships are synthesized. Execution: naively each refinement predicate could just block awaiting the verdict of the refining invocation. More efficiently each refined invocation can be triggered by the failure of its refining mapping before blocking on further refining mappings. Typically a 1:1 direct connection with no overheads.