Date post: | 23-Dec-2015 |
Category: |
Documents |
Upload: | benjamin-chase |
View: | 212 times |
Download: | 0 times |
®
Eurostep.ESUKPC20.000030v0.1©Copyright Eurostep Limited
An Introduction to ISO STEP Part 25
David Price
®
Eurostep.ESUKPC20.000030v0.1©Copyright Eurostep Limited
Agenda
• Why Part 25?• EXPRESS/UML Mapping• Future
®
Eurostep.ESUKPC20.000030v0.1©Copyright Eurostep Limited
Why Part 25?
• The ISO EXPRESS language has been used by the STEP, POSC, EDIF and other data modelling communities for 15 years
• Since the OMG standardized UML, it became a widely used software engineering language
• Part 25 is designed to allow software engineers using UML to reuse schemas modelled using EXPRESS
®
Eurostep.ESUKPC20.000030v0.1©Copyright Eurostep Limited
How?
• Define mapping into OMG standards– OMG defined a subset of UML for use in defining
modeling languages• Meta-Object Facility or MOF
– OMG defined an XML encoding of anything modeled using MOF
• XML Metadata Interchange or XMI
– OMG defined a model of the UML language using MOF
• “UML Model Interchange” Model
®
Eurostep.ESUKPC20.000030v0.1©Copyright Eurostep Limited
The Part 25 Vision
ModelInformation
ChangeEnvironment
ModelSoftware
GenerateSoftware
SCHEMA people;
ENTITY person;name : STRING;END_ENTITY;
ENTITY organization;name : STRING;members : SET OF person;END_ENTITY;
END_SCHEMA;
Start with an EXPRESSschema of the datarequirements ofthe domain of interest
®
Eurostep.ESUKPC20.000030v0.1©Copyright Eurostep Limited
The Part 25 Vision
ModelInformation
ChangeEnvironment
ModelSoftware
GenerateSoftware
<XMI><UML:Class name=“Person”></UML:Class><UML:Class name=“Organization”></UML:Class></XMI>
Translate EXPRESS intoXML Metadata Interchangeformat (XMI)
®
Eurostep.ESUKPC20.000030v0.1©Copyright Eurostep Limited
The Part 25 Vision
ModelInformation
ChangeEnvironment
ModelSoftware
GenerateSoftware
Use UML software engineeringtools to model the completesoftware system
Person Organization
®
Eurostep.ESUKPC20.000030v0.1©Copyright Eurostep Limited
The Part 25 Vision
ModelInformation
ChangeEnvironment
ModelSoftware
GenerateSoftware
Generate much of theapplication in the programminglanguage of choice
public Person {}public Organization {}
®
Eurostep.ESUKPC20.000030v0.1©Copyright Eurostep Limited
Conformance
EXPRESS text or XML parser
EXPRESS toUML metamodel
XMI syntax for UML metamodel
Specified inPart 11 or 28
Specified in Part 25
Specified in XMI
Part 25-basedEXPRESS toUML/XMI tool
EXPRESS schema
text or XML
EXPRESS language
DTD
XMI-compliant UML DTD
XMI encoding ofUML mapped
from EXPRESS schema
controlsif XML
controls
®
Eurostep.ESUKPC20.000030v0.1©Copyright Eurostep Limited
Mapping Requirements
• The mapping was designed with “software engineering using UML” in mind– Round-trip, completely interoperable
EXPRESS/UML translation was not a requirement for Edition 1
– Consider UML an abstraction of Java, C++, etc.
• 80/20 rule and don’t “surprise” people who know both languages
• Part 25 defines a one-way mapping from EXPRESS 1 to UML 1.5– Based on the meta-model of UML, not the
diagrams
®
Eurostep.ESUKPC20.000030v0.1©Copyright Eurostep Limited
Mapping Approach
• Mapping is viewed from a “context schema”, the top-level schema you want to implement– Schemas using other schemas are mapped
correctly– Anything not visible in context schema is ignored
• Map into native UML concepts on a “Static Class Diagram”– “vanilla” UML is the result– as round-trip not required, the fact that the UML
started life as EXPRESS is mostly lost
®
Eurostep.ESUKPC20.000030v0.1©Copyright Eurostep Limited
Class Diagram Example
Association
Package
Class
Generalization
Attribute
®
Eurostep.ESUKPC20.000030v0.1©Copyright Eurostep Limited
Mapping Issues
• UML Associations must be SETs– Only SET and LIST OF UNIQUE can map to
Association
• No built-in support for nested aggregation types
• What is a select type?• Default for UML Generalization is
disjoint/ONEOF, but is ANDOR/overlapping in EXPRESS
®
Eurostep.ESUKPC20.000030v0.1©Copyright Eurostep Limited
Not Mapped
• RULE declarations• domain rules in ENTITY or TYPE declarations• UNIQUE rules in ENTITY declarations• SUPERTYPE declarations other than ABSTRACT
SUPERTYPE and complete ONEOF constraints• FUNCTION declarations• PROCEDURE declarations• CONSTANT declarations• explicit attributes redeclared as derived
attributes• remarks
®
Eurostep.ESUKPC20.000030v0.1©Copyright Eurostep Limited
Mapping Schema, Entity, Type
Schema UML Package
USE FROM and REFERENCE FROM and AS
UML ElementImport and Alias
ENTITY and SUBTYPE OF and ABSTRACT SUPERTYPE and ONE OF
UML Class and Generalization and isAbstract and disjoint
TYPE x = SELECT UML Class and Aggregation Association named “selection_of”
TYPE x = ENUMERATION UML Enumeration and Enumeration Literals
TYPE x = not SELECT and not ENUMERATION
UML Class and Generalization with representation of underlying type being the parent
®
Eurostep.ESUKPC20.000030v0.1©Copyright Eurostep Limited
Mapping Attributes
explicit attribute of simple data type and OPTIONAL
UML Attribute with corresponding type and Multiplicity set
explicit attribute of type ENTITY or TYPE reference and OPTIONAL and INVERSE
UML Association between Classes with Multiplicity set and reverse Multiplicity set as in INVERSE
explicit attribute of type SET or LIST OF UNIQUE ENTITY or TYPE
UML Association between Classes with multiplicity set as bounds
redeclared explicit attribute specializing domain to a subtype
OCL Constraint
explicit attribute of type other aggregation of ENTITY or TYPE
UML Multi-valued Attribute (UML Associations must be sets)
derived attribute UML derived Attribute or Association
®
Eurostep.ESUKPC20.000030v0.1©Copyright Eurostep Limited
Mapping Aggregates and Datatypes
LIST or SET of simple type (referenced from TYPE or attribute)
UML Class named List-of-xxx or Set-of-xxx
nested aggregations UML Class named Set-of-Set-of-xxx and aggregation association named aggregation_of
STRING and INTEGER and BOOLEAN
UML String and Integer and Boolean
NUMBER and REAL Double equivalent to MOF/IDL, there is no native UML Double
BINARY Create new DataType called Binary, there is no native UML Binary
LOGICAL UML Enumeration and Enumeration Literals
®
Eurostep.ESUKPC20.000030v0.1©Copyright Eurostep Limited
The Reverse• UML Package
– Schema• UML Class
– Entity Type– Select Type– Other Defined Type except Enumeration Type– Nested Aggregate Type (referenced from UML Attribute or
Association)– Simple Datatype (one option)
• UML Enumeration– Enumeration
• UML Association– single-valued explicit attribute : named type– SET or LIST OF UNIQUE : named type
• UML Attribute– all explicit attributes not mapped to UML Association
®
Eurostep.ESUKPC20.000030v0.1©Copyright Eurostep Limited
EXPRESS (1)SCHEMA STEP_demo;
TYPE approval_assignment = SELECT ( Product, Product_version );END_TYPE;
ENTITY Product SUPERTYPE OF (ONEOF ( Requirement ) ); id : STRING; name : STRING; description : OPTIONAL STRING; versions : SET[1:?] OF Product_version;END_ENTITY;
ENTITY Requirement SUBTYPE OF ( Product );END_ENTITY;
®
Eurostep.ESUKPC20.000030v0.1©Copyright Eurostep Limited
EXPRESS (2)ENTITY Product_version; id : STRING; name : STRING;END_ENTITY;
ENTITY Product_category; id : STRING; name : STRING; products : SET[0:?] OF Product;END_ENTITY;
END_SCHEMA;
®
Eurostep.ESUKPC20.000030v0.1©Copyright Eurostep Limited
Example UML
®
Eurostep.ESUKPC20.000030v0.1©Copyright Eurostep Limited
Nested aggregate EXPRESS
ENTITY our_entity;
our_matrix : ARRAY[1:3] OF ARRAY[1:3] OF REAL;
END_ENTITY;
®
Eurostep.ESUKPC20.000030v0.1©Copyright Eurostep Limited
Nested Aggregate UML
®
Eurostep.ESUKPC20.000030v0.1©Copyright Eurostep Limited
Use of OCLRedeclared explicit
attribute of_product in system_version
results in OCL Constraint with Name
and Body
®
Eurostep.ESUKPC20.000030v0.1©Copyright Eurostep Limited
Redeclared explicit attribute
ENTITY system_version SUBTYPE OF ( product_version ); SELF\product_version.of_product : system;END_ENTITY;
Constraint Name redeclaredsystem_versionof_product
Constraint Body context system_version inv redeclaredsystem_versionof_product : self.of_product -> forAll ( oclIsTypeOf ( system ) )
®
Eurostep.ESUKPC20.000030v0.1©Copyright Eurostep Limited
Future
• Edition 2 planning, ideas are:– Add support for EXPRESS 2 (highest priority)– Define EXPRESS using the OMG Meta-Object
Facility (now called UML Infrastructure or Core)• Result will be EXPRESS as one of the UML family of
languages or ability to use EXPRESS in some UML tools natively
– Support UML 2– UML Profile for EXPRESS
• Allow use of UML class diagram instead of EXPRESS-G• Supports UML to EXPRESS and perhaps round-trip
metadata interchange
– Further use of OCL in the mapping