Information Technology Reference
In-Depth Information
Figure 3.1 presents a model example. This is a class model.
The concrete syntax we used to create this model presents
model elements as stereotyped boxes and labeled arrows.
Each stereotype in a box indicates the type of model element.
Values for element properties are displayed inside each box.
Relationships between model elements are represented by
standard class model arrows (directed-composition or directed-
association arrows). Thus, the class model has one package,
School , containing two classes, Student and Program .
Student has two attributes, studentName of type String
and registeredProgram of type Program . Program has
one attribute, programName , which is of type String . The
compositionlinksfromthepackagenamed School andthetwo
classes ( Program and Student ) are labeled with their roles,
respectively class1 and class2 .
Figure 3.1. Class model example
The abstract syntax of a language is often defined using
a metamodel. A metamodel describes the concepts of the
language,the relationships between them,and the structuring
rulesthatconstrainthemodelelementsandtheircombinations
to respect the domain rules. Figure 3.2 presents a sample
metamodelforUMLclassmodels.Thismetamodelisexpressed
as a UML class diagram and includes the metaconcept
of Classifier , which is the abstract superclass of both
the concrete metaconcepts PrimitiveDataType and Class .
Search WWH ::




Custom Search