190 likes | 339 Views
Part 25 E2 EXPRESS/UML Walkthrough. Seattle STEP October 2004. Agenda. Walkthrough of EXPRESS 2 to UML 1.5 mappings Walkthrough of UML 1.5 Profile/Stereotypes for representing EXPRESS 2 Relationship to UML/OWL mappings Demonstration of early implementations Issue discussion
E N D
Part 25 E2 EXPRESS/UML Walkthrough Seattle STEP October 2004
Agenda • Walkthrough of EXPRESS 2 to UML 1.5 mappings • Walkthrough of UML 1.5 Profile/Stereotypes for representing EXPRESS 2 • Relationship to UML/OWL mappings • Demonstration of early implementations • Issue discussion • Next actions/plans for CD TS ballot
Part 25 Edition 2 Content • Extend existing mapping to support EXPRESS 2 and same use case • treat UML Class as slightly more abstract C++ or Java class declaration • a one-way mapping for software development • UML Classes not tagged as from EXPRESS • Add New mapping to support using EXPRESS definition using UML (aka UML Profile for EXPRESS) • UML Classes are tagged as EXPRESS • Two-way mapping now possible • Add OCL where EXPRESS equivalence is clear • Equivalent to EXPRESS-G but in UML
1. Extend current Mapping to EXPRESS 2 • New Concepts in EXPRESS 2 • Extensible SELECT and ENUMERATION • Rename and redeclare attribute • GENERIC_ENTITY on SELECT • TOTALOVER • Separate SUBTYPE_CONSTRAINT • ABSTRACT ENTITY
Extensible SELECT • Each SELECT, whether extensible or not, is mapped to a UML Class • For each SELECT that is extensible, the complete set of select items must be computed and the “selection_of” association set • That fact that the SELECT was extensible is lost in the mapping • The fact that one SELECT is BASED_ON another is lost
Extensible Enumeration • Each Enumeration, whether extensible or not, is mapped to a UML Enumeration • For each Enumeration that is extensible, the complete set of enumeration literals must be computed and set • That fact that the Enumeration was extensible is lost in the mapping • The fact that one Enumeration is BASED_ON another is lost
Rename redeclared attribute • UML 1.5 does not allow the renaming of inherited attributes • Renaming is simulated by • mapping the renamed attribute into a derived attribute with the new name • setting the expression for its value to simply assign the value of the inherited attribute
GENERIC_ENTITY on SELECT • This is really a constraint on other selects based on the select where it is defined • This is not mapped to UML
SUBTYPE_CONSTRAINT and TOTAL_OVER • SUBTYPE_CONSTRAINT is mapped to UML in the same way as SUPERTYPE is mapped • In both cases, OCL is added to the UML for these constraints where it is simple • Deciding what the OCL should be is work to-be-done
ABSTRACT ENTITY • The attributes of an abstract entity can have generic type domains • Example ENTITY general_approval ABSTRACT; approved_items : BAG OF GENERIC_ENTITY; status : approval_status; END_ENTITY;
ABSTRACT ENTITY (2) • P25 E1 • ABSTRACT maps to isAbstract = TRUE flag on UML Class (Name in Italics) • EXPRESS attributes map • to UML Attributes for simple types, defined types • to UML Associations for entity type, select type • P25 E2? • Could only map instantiable attributes
2. UML Profile for EXPRESS • Two profiling UML concepts • UML Stereotype • UML Tagged Value • UML Stereotype
Structures • Schema maps to UML Package with <<exp_schema>> stereotype • No change to USE/REFERENCE mapping • No change to Entity Type mapping except add <<exp_entity>> stereotype • No change to the Defined Type (not Constructed) except add <<exp_type>> stereotype • No change to Enumeration Type mapping except <<exp_enum>> stereotype
Structures (2) • Change to Select Type mapping • map to UML Class as before adding <<exp_select>> stereotype • Change link to select items from association named “selection_of” to unstereotyped UML Generalization • Could also add stereotype but not proposing to do so as that fact can be derived • Why? Because, this seems closer to the idea of “union” of domains. One rationale for previous mapping was “it creates multiple inheritance in many places” but with <<exp_select>> code generation can treat this differently
Structures (3) • No change to simple attribute mapping • Can’t see need to stereotype attributes too
Structures (4) • On aggregations, two approaches to consider • Use stereotypes • Treat as constraints on UML Association Ends
Aggregation by stereotype • Minor change to SET or UNIQUE LIST mapping • Add stereotype to UML Association <<exp_set> and <<exp_list>> • Change to BAG and LIST not UNIQUE • In order to align these better with SET, map to UML Association and stereotype the association as <<exp_bag>> and <<exp_list>
Aggregation by Constraint • Model aggregations, including nested, as a UML association • Constraint on association end encodes the LIST, SET, BAG, ARRAY and nesting