UML Class Model Abstract Syntax and Set-Based Semantics

Similar documents
Efficient Recognition of Finite Satisfiability in UML Class Diagrams: Strengthening by Propagation of Disjoint Constraints

CSC Discrete Math I, Spring Sets

9.5 Equivalence Relations

Correctness Algorithms

CSE 20 DISCRETE MATH. Fall

Enhanced Entity-Relationship (EER) Modeling

Appendix 1. Description Logic Terminology

Appendix 1. Description Logic Terminology

Chapter 8: Enhanced ER Model

Copyright 2016 Ramez Elmasri and Shamkant B. Navathe

Introduction to Sets and Logic (MATH 1190)

CSE 20 DISCRETE MATH. Winter

THREE LECTURES ON BASIC TOPOLOGY. 1. Basic notions.

SLIDES: Introductory Modeling Example Employing UML and OCL [UML: Unified Modeling Language, OCL:Object Constarint Language]

Introduction to Software Testing Chapter 4 Input Space Partition Testing

A set with only one member is called a SINGLETON. A set with no members is called the EMPTY SET or 2 N

Chapter 6: Entity-Relationship Model. The Next Step: Designing DB Schema. Identifying Entities and their Attributes. The E-R Model.

The Next Step: Designing DB Schema. Chapter 6: Entity-Relationship Model. The E-R Model. Identifying Entities and their Attributes.

SMO System Management Ontology

Integrating SysML and OWL

Chapter 2: Entity-Relationship Model

Chapter 7: Entity-Relationship Model

10/11/2018. Partial Orderings. Partial Orderings. Partial Orderings. Partial Orderings. Partial Orderings. Partial Orderings

Logic and Discrete Mathematics. Section 2.5 Equivalence relations and partitions

Power Set of a set and Relations

TOPOLOGY, DR. BLOCK, FALL 2015, NOTES, PART 3.

Sets. De Morgan s laws. Mappings. Definition. Definition

EDAA40 At home exercises 1

2. Functions, sets, countability and uncountability. Let A, B be sets (often, in this module, subsets of R).

Chapter 8 The Enhanced Entity- Relationship (EER) Model

CHAPTER 3 FUZZY RELATION and COMPOSITION

Conceptual modeling of entities and relationships using Alloy

Notes on metric spaces and topology. Math 309: Topics in geometry. Dale Rolfsen. University of British Columbia

Copyright 2016 Ramez Elmasri and Shamkant B. Navathe

2 A topological interlude

CS 338 The Enhanced Entity-Relationship (EER) Model

Functions. Def. Let A and B be sets. A function f from A to B is an assignment of exactly one element of B to each element of A.

Point-Set Topology 1. TOPOLOGICAL SPACES AND CONTINUOUS FUNCTIONS

Chapter 11 Object and Object- Relational Databases

High Level Database Models

Proceedings of the Workshop on OCL and Textual Modelling (OCL 2010)

Slides for Faculty Oxford University Press All rights reserved.

26. Object-Oriented Design. Java. Summer 2008 Instructor: Dr. Masoud Yaghini

Topology I Test 1 Solutions October 13, 2008

axiomatic semantics involving logical rules for deriving relations between preconditions and postconditions.

Chapter No. 2 Class modeling CO:-Sketch Class,object models using fundamental relationships Contents 2.1 Object and Class Concepts (12M) Objects,

Relational Database: The Relational Data Model; Operations on Database Relations

Bound Consistency for Binary Length-Lex Set Constraints

MATH 22 MORE ABOUT FUNCTIONS. Lecture M: 10/14/2003. Form follows function. Louis Henri Sullivan

Semantics of ARIS Model

Chapter 7: Entity-Relationship Model

Chapter 7: Entity-Relationship Model

Deformable Polygon Representation and Near-Mincuts

Complexity Theory. Compiled By : Hari Prasad Pokhrel Page 1 of 20. ioenotes.edu.np

2.1 Sets 2.2 Set Operations

Using High-Level Conceptual Data Models for Database Design A Sample Database Application Entity Types, Entity Sets, Attributes, and Keys

Class modelling (part 2)

Categorical models of type theory

Cardinality Lectures

CHAPTER 3 FUZZY RELATION and COMPOSITION

SOFTWARE ENGINEERING DESIGN I

Problem. Prove that the square of any whole number n is a multiple of 4 or one more than a multiple of 4.

Comparing sizes of sets

Chapter 7: Entity-Relationship Model

The Inverse of a Schema Mapping

UML Tutorial. Unified Modeling Language UML Tutorial

Lecture 25 : Counting DRAFT

Computer Science and Mathematics. Part I: Fundamental Mathematical Concepts Winfried Kurth

Chapter 4 Fuzzy Logic

Metamodeling. Janos Sztipanovits ISIS, Vanderbilt University

Class modelling (part 2)

High-Level Database Models (ii)

Relational Model: History

2 Review of Set Theory

CHAPTER 8. Copyright Cengage Learning. All rights reserved.

Guided Tour: Intelligent Conceptual Modelling in EER and UML-like class diagrams with icom compared to ORM2

Chapter 6: Entity-Relationship Model

Model Finder. Lawrence Chung 1

Software development using B method. Julien Cervelle LACL - UPEC

The Language of Sets and Functions

Chapter 10. Normalization. Chapter Outline. Chapter Outline(contd.)

Sets 1. The things in a set are called the elements of it. If x is an element of the set S, we say

Johns Hopkins Math Tournament Proof Round: Point Set Topology

Sets MAT231. Fall Transition to Higher Mathematics. MAT231 (Transition to Higher Math) Sets Fall / 31

1. true / false By a compiler we mean a program that translates to code that will run natively on some machine.

Introduction III. Graphs. Motivations I. Introduction IV

Attribute Algebra for N-layer Metamodeling

Ontological Modeling: Part 7

About the Tutorial. Audience. Prerequisites. Copyright & Disclaimer. Discrete Mathematics

Scalable Analysis of Conceptual Data Models

Discrete Mathematics Lecture 4. Harper Langston New York University

Mathematics for Computer Science Exercises from Week 4

SWEN-220 Mathematical Models of Software

Representing Product Designs Using a Description Graph Extension to OWL 2

Module 11. Directed Graphs. Contents

Relational Databases

Engineering Design w/embedded Systems

Topology problem set Integration workshop 2010

SET DEFINITION 1 elements members

MODELS OF CUBIC THEORIES

Transcription:

UML Class Model Abstract Syntax and Set-Based Semantics Mira Balaban and Azzam Maraee Computer Science Department Ben-Gurion University of the Negev, ISRAEL mira,mari@cs.bgu.ac.il March 31, 2017 The class-model language, which is visualized by class diagrams, is the backbone of UML. It consists of classes, associations, class descriptors attributes, operations and constraints that are imposed on them. The meaning of a class model is given by its instances. A class-model instance has a semantic domain, and a denotation mapping, that maps syntactic elements of the class-model to elements in or over the semantic domain. Classes are mapped to sets of objects in the domain, and associations are mapped to relationships between these sets. The denotation of classes and associations are called extensions. Attributes are mapped to mappings defined on class extensions. Constraints denote restrictions over the extensions of the class-model elements. An instance of a class-model, is legal if it satisfies all the constraints; it is empty if all class extensions are empty, and is infinite if some class-extension is not finite. The formal syntax-semantics definition enables precise definitions of syntactic and semantic relationships between class models and their instances. These are defined at the end of this document. The formal definition is essential for investigation of class models, including verification, validation, optimization, instance completion, and repairing. The definition below follows the UML 2.5 specification in [2]. It does not include class operations. Many thanks to Igal Khitron for providing multiple helpful comments 1

1 Abstract Syntax A class model is a tuple C, P, A, M, Att, Dt, Mappings, Constraints. 1.1 Element symbols C is a set of class symbols. P is a set of property symbols (also called association ends). Property symbols denote multi-mappings derived from their associations. A is a set of association symbols. M is a set of multiplicity symbols. Att: A set of attribute symbols. Dt: A set of data-type symbols. M appings describe syntactic interrelationships between the symbols, and Constraints specify semantic requirements that can be imposed on the symbols. The semantics of some constraints implies syntactic restrictions that must hold, in order for the constraints to be satisfied. 1.2 Mappings Multiplicity mappings: val : M N {0} N { } is a function that assigns multiplicity values 1. It satisfies: For m M, if val(m) 2, then val(m) 1 val(m) 2, where val(m) 1, val(m) 2 refer to the first and second elements in val(m). val(m) 1 and val(m) 2 are the boundary cardinalities of m, and are denoted min(m) and max(m), respectively. An integer i such that min(m) < i < max(m), is an internal cardinality of m. Data type mappings: Each data-type symbol T is associated with a known domain of values, denoted domain(t ). cardinality(t ) is defined as the cardinality of domain(t ). Qualifier attributes and their mappings: 1 In previous UML2 versions, a multiplicity can be a set of intervals, which means that the val function is a multi-valued function. However, this complex definition has been dropped in the UML 2.x versions. 2

1. Qatt Att is the subset of attributes in Att that function as qualifier attributes of properties. 2. q dt : Qatt Dt is a mapping of qualifier attributes to data types. 3. q att : P Qatt is a multi-valued function that assigns a (possibly empty) set of qualifier attributes to a property. The assigned property is called a qualified property and its association is a qualified association. In Figure 1b, q att (p 2 ) = {q 1, q 2 }, q dt (q 1 ) = D 1, q dt (q 2 ) = D 2. (a) A binary association (b) A qualified association Figure 1: Visualization of binary and qualified associations Attribute (non-qualifier) mappings: 1. att: C (Att Qatt) is a multi-valued function that assigns a (possibly empty) set of non-qualifier attribute symbols to every class. 2. Each attribute in a class can be associated with a data-type and a multiplicity symbols. For every class C C, there is a mapping dt C : att(c) Dt and a mapping mul C : att(c) M. Notation: For a class C, and attribute a att(c), min C (a) = min(mul C (a)) and max C (a) = max(mul C (a)). Property mappings: 1. inverse : P P is a bijective mapping, that assigns to every property p its unique inverse, denoted p 1. It satisfies: inverse(p) p, and (p 1 ) 1 = p. 2. source: P C and target: P C are mappings of properties to classes such that for a property p P, target(p) = source(p 1 ). In Figure 1a, p 1 is p 1 2, target(p 2 ) = source(p 1 ) = B, and source(p 2 ) = target(p 1 ) = A. 3

3. Property multiplicity: mul : P Qatt... Qatt M is a function that assigns multiplicities to property symbols and their qualifier attributes. It is defined only for p, q 1,..., q n such that q att (p) = {q 1,..., q n }. We take the liberty to write shortly mul(p, q att (p)). Notation: min(p, q att (p)) = min(mul(p, q att (p))) is the minimum multiplicity of p and its qualifier attributes, and max(p, q att (p)) = max(mul(p, q att (p))) is its maximum multiplicity. Syntactic restriction: The minimum multiplicity of a property with a qualifier attribute that has an infinite data type is 0: If for some q q att (p), cardinality(q dt (q)) =, then min(p, q att (p)) = 0. For non-qualified properties (q att (p) = ): mul : P M, and min(p) = min(mul(p)), max(p) = max(mul(p)). Association mappings: props: A P P is an injection that satisfies props(a) = p, p 1 (arbitrary ordering), and every property appears in exactly one props(a). Notation: assoc(p 1 ) or assoc(p 1, p 2 ) (where p 2 = p 1 1 ) denote the association of p 1 or of p 1, p 2, and props 1 (a), props 2 (a) (arbitrary ordering) denote the two properties of a. Note that for a property p, assoc(p) is unique. In Figure 1a, props(r) = p 1, p 2 and assoc(p 1 ) = assoc(p 2 ) = assoc(p 1, p 2 ) = r. For simplicity we use a compact symbolic notation that captures all symbols related to an association. For example, the association r in figure 1a is denoted r(p 1 : A[m 1, n 1 ], p 2 : B[m 2, n 2 ]). The symbolic representation of the qualified association in figure 1b is: r(p 1 : A[m 1, n 1 ], p 2 : B{q 1 : D 1, q 2 : D 2 }[m 2, n 2 ]), and min(p 2, {q 1, q 2 }) = m 2, and max(p 2, {q 1, q 2 }) = n 2. Note that the visualization of the qualifier is on the opposite side (source side) of the qualified property. Association classes: 1. AC C is the subset of classes in C that function as association classes. 2. assoc ac : AC A is an injective function that maps association class symbols to association symbols. For example, in Figure 2, assoc ac (C) = r. 4

Figure 2: Visualization of an association class 1.3 Constraints Aggregation and Composition: aggregation and composition are predicates on P that characterize aggregation and composition properties. composition is a refinement of aggregation, i.e., for p P, composition(p) aggregation(p). Aggregation/composition properties are marked as p a and p c respectively. Visually, aggregation/composition properties are marked by diamonds, with an empty diamond for aggregation and a solid diamond for composition. For example, in Figure 3, p 5 is a composition property. Syntactic restriction: A composition property p is not multi-valued, i.e., max(p) = 1, or max(p, q att (p)) = 1 in case of qualified property. Figure 3: A class diagram with quantifier, association-class, class-hierarchy and composition constraints Class hierarchy: Class hierarchy is a non-circular binary relationship on class symbols (which are not association classes): (C AC) (C AC). Henceforth C 2 C 1, stands for C 2 is a subclass of C 1. + is the transitive closure of, and C 2 C 1 stands for C 2 = C 1 or C 2 + C 1. For example, in Figure 4a, class C1 is a subclass of C, i.e., C1 C. Generalization-set (GS): This is an (n + 1)-ary n 2 relationship on C AC. A GS constraint is denoted GS(C, C 1,..., C n ; Const). C is called the superclass and the C i -s are called the subclasses. GS constraints may be associated with disjoint/overlapping and complete/in- 5

complete constraints. Figure 4b shows the GS constraint GS(C, C 1, C 2 ; disjoint, complete) Syntactic restrictions: For i, j = 1..n (1) C C i ; (2) C i C j. (a) (b) Figure 4: Class diagram visualization of class-hierarchy and GS constraints Subsetting: Subsetting is a non-circular binary relation on the set of property symbols: P P. p 1 p 2, is read p 1 subsets p 2, where p 1 is the subsetting property, and p 2 is the subsetted property 2. Figure 5 includes two subsetting constraints: The presentation property subsets the paper property, and the presenter property subsets the author property. The constraints state that a paper presented by an author must be a paper of the author, and the presenter of an accepted paper is also the author of that paper. As for class hierarchies, + is the transitive closure of, and p 1 p 2 stands for p 1 = p 2 or p 1 + p 2. Syntactic restrictions: (1) source(p 1 ) source(p 2 ); (2) target(p 1 ) target(p 2 ); (3) max(p 1 ) max(p 2 ). Figure 5: A class diagram with subsetting constraints Redefinition: Redefinition is also a non-circular binary relation on the set of property symbols: P P. p 1 p 2, is read p 1 redefines p 2. p 1 is termed the redefining property and p 2 is termed the redefined property. Figure 6 shows type- and multiplicity-redefinition constraints. In Figure 6a, property tacourse redefines the multiplicity constraint of property course. It restricts a teaching assistant to teach exactly one 2 We use the same symbol as for class hierarchy. Distinction is made by context. 6

course, although Academic employees can teach up to three courses. In Figure 6b, property gregister redefines the type and multiplicity of property register. It restricts a graduate student to register to exactly four graduate courses instead of to any number of general courses. Similarly to subsetting, is the transitive closure of, and p 1 p 2 stands for p 1 = p 2 or p 1 p 2. Syntactic restrictions: Restriction (3) of subsetting is strengthened to require that the multiplicity interval of p 1 is included in that of p 2, i.e., min(p 1 ) min(p 2 ), max(p 1 ) max(p 2 ). Student -register 1..* Course GraduateStudent -gregister GraduateCourse 4 {redefines register} (a) (b) Figure 6: Class diagrams with redefinition constraints Union: This constraint associates a property with a group of properties. So, similarly to generalization-set, union is an (n + 1)-ary n 2 relationship on P. In a union relationship p = union(p 1,..., p n ), p is called the superproperty and the p i -s are called the subproperties. In Figure 7, the declaration of property course as a union implies that a student can register only to required or elective courses. Dropping the union constraint enables students to register to courses which are neither required nor elective. Syntactic restrictions: For i, j = 1..n (1) p p i ; (2) p i p j ; (3) For i = 1..n, source(p i ) source(p); target(p i ) target(p); max(p i ) max(p). * Student * registering {subsets course} -rc 1..* -course {union} 1..* RequiredCourse Course {subsets course} ElectiveCourse -ec * Figure 7: A class diagram with a union constraint Association hierarchy: Association hierarchy is similar to class hierarchy, and denoted using the same symbol:. However, it is more 7

complex, since it requires also pairwise specification of property correspondence. Therefore, association hierarchy is a non-circular binary association on triplets of associations, and their properties: (A P P) (A P P). For example, Figure 8 shows an association specialization between the special authorization and the authorization associations. It enforces an external user with a special authorization access to some wireless network, to have a regular user authorization to the same network. Syntactic restrictions: For an association hierarchy a 1, p 1, q 1 a 2, p 2, q 2 : (1) For i = 1, 2, a i = assoc(p i ) = assoc(q i ); (2) source(p 1 ) source(p 2 ); target(p 1 ) target(p 2 ); max(p 1 ) max(p 2 ); (3) source(q 1 ) source(q 2 ); target(q 1 ) target(q 2 ); max(q 1 ) max(q 2 ). User Authorization Wireless InnerUser ExternalUser SpechialAuthorization Figure 8: A class diagram with association specialization constraint Association-class hierarchy: Association-class hierarchy is similar to association hierarchy: It is like class hierarchy, but requires also specification of property correspondence the properties of the associations of the association classes. Therefore, it is also a non-circular binary association on triplets of classes, and the properties of their associated associations: (AC P P) (AC P P). Figure 9 shows a class diagram with an association-class constraint. Syntactic restrictions: For an association-class hierarchy C 1, p 1, q 1 C 2, p 2, q 2 : (1) For i = 1, 2, assoc ac (C i ) = assoc(p i ) = assoc(q i ); (2) source(p 1 ) source(p 2 ); target(p 1 ) target(p 2 ); max(p 1 ) max(p 2 ); (3) source(q 1 ) source(q 2 ); target(q 1 ) target(q 2 ); max(q 1 ) max(q 2 ). xor: A xor constraint restricts properties with a common source class, and denoted xor(p, q). In Figure 10, properties b and c are restricted by a xor constraint. Syntactic restrictions: For a xor constraint xor(p, q), source(p) = source(q). The common source class is termed the base class of the xor constraint, and denoted base(xor(p, q)). 8

Figure 9: A class diagram with an association-class hierarchy constraint 2 Semantics Figure 10: A class diagram with a xor constraint The standard set theoretic semantics of class models associates a class model with instances I, that have a semantic domain and an extension mapping, that associates syntactic symbols with elements over the semantic domain. Classes are mapped to sets of objects in the domain, and associations are mapped to relationships between these sets. The denotation of classes and associations are called extensions. Properties and attributes are mapped to multi-valued functions on class extensions. For a symbol x, x I is its denotation in I. 2.1 Symbol denotation: 1. Classes: For C C, C I, the extension of C in I, is a set of elements in the semantic domain. The elements of class extensions are called objects. 2. Attributes (non-qualified): The denotation of an attribute is a higher-order function that maps a class symbol to a function from the class extension to the domain of the data-type of the attribute. That is, for class C C and attribute a att(c), a I (C): C I domain(dt C (a)) is a multi-valued function that satisfies: For every object o C I, 9

min C (a) a I (C)(o) max C (a). 3. Properties: For p P, p I is a multi-valued function from its source class to its target class: p I : source(p) I target(p) I. Restriction: Inverse properties denote inverse functions: (p 1 ) I = (p I ) 1. 4. Associations: For a A, a I is a binary relationship on the extensions of the classes of a. If props(a) = p 1, p 2, then since p 1 = (p 2 ) 1, their denotations are inverse functions of each other: p I 1 = (p I 2) 1, and vice versa. The association denotes all object pairs that are related by its properties: a I = {(e, e ) e target(p 1 ) I, e target(p 2 ) I, p I 2(e) = e }. Elements of association extensions are links. 2.2 Constraints: 1. Multiplicity constraints on properties: (a) Non-qualified properties For every e source(p) I, min(p) p I (e) max(p). The upper bound is ignored if max(p) =. (b) Qualified properties: A qualified property denotes a mapping that refines the denotation mapping of the property. If q att (p) = {q 1,..., q n } and q dt (q i ) = T i, i = 1..n, and domain(t i ) = D i, then the mappings of p I are partitioned by a semantic function q p : source(p) I D 1... D n target(p) I, that satisfies: i. For every e source(p) I and d i D i, i = 1..n: q p (e, d 1,..., d n ) p I (e). ii. For every e source(p) I and d i, d i D i, i = 1..n: q p (e, d 1,..., d n ) q p (e, d 1,..., d n) =. iii. For every e source(p) I and d i D i, i = 1..n: min(p, q 1,..., q n ) q p (e, d 1,..., d n ) max(p, q 1,..., q n ). The upper bound is ignored if max(p) =. Recall that if the domain of some q i is infinite, i.e., cardinality(t i ) =, then min(p, q 1,..., q n ) = 0. In Figure 3, p I 8 is partitioned by the function q p8 : A I T E I, and q p8 (a 1, t 1 ) = e 2, q p8 (a 1, t 2 ) = e 1. 2. Association class: For an association-class C, C I is a set of elements in I and pairs C : C I (assoc ac (C)) I is a 1:1 and onto semantic mapping, that maps every object in C I to a single link in the relation (assoc ac (C)) I. In Figure 11, pairs D (d 1 ) = (c 1, c 2 ). 10

Figure 11: An instance diagram for the class diagram in Figure 3 3. Aggregation constraints: Aggregation denotes part-whole relationships. Therefore, cycles of aggregated objects are not allowed: For aggregation properties p a 1,..., p a n, such that target(p a i ) = source(p a i+1), i = 1, n 1, if e source(p a 1) I, then e / p a n I (p n 1 ai (... (p a 1 I (e)))). 4. Composition constraints: The syntactic definition restricts a composition to be also marked as an aggregation. Therefore, cycles of composite objects are not allowed. In addition, a composition is an aggregation in which an object cannot be part of two different wholes. Recall that a composition property is not multi-valued. The additional semantic multi-composition constraint states that if two composition properties have a common domain, then they map an object to a single whole object, either directly or not. That is: For composite properties p c, q c such that source(p c ) = source(q c ), e source(p c ) I implies that either p c (e) = q c (e) or there are intermediate properties p = p c 1,..., p c n, such that target(p c i) = source(p c i+1), i = 1, n 1, and p c n I (p ci n 1 (... (p c 1 I (e)))) = q c (e). 5. Class-hierarchy constraints: A constraint C 1 C 2 denotes a subset relations between the class extension: C 1 I C 2 I. 6. Generalization-set constraints: A GS constraint GS(C, C 1,..., C n ; Const) imposes class hierarchy constraints among the subclasses and the superclass, and set constraints among the subclasses. That is: (a) Class hierarchy: For i = 1..n, C i C; (b) Set constraints: (1) Const =disjoint: Ci I Cj I =, i, j = 1..n; (2) Const = overlapping: For some i, j = 1..n, it might be Ci I Cj I ; (3) Const = complete: C I = n Ci I ; (4) Const = i=1 n incomplete: Ci I C I. i=1 11

7. Subsetting constraint: For p 1, p 2 P, p 1 p 2 states that p 1 is a submapping of p 2, i.e., for e source(p 1 ) I, p I 1 (e) p I 2 (e). The semantics of subsetting requires the syntactic restrictions that for p 1 p 2, the source and target classes of p 1 are descendant subclasses of the source and target classes of p 2, respectively, and the maximum cardinality of p 1 can only restric that of p 2. Moreover, in [1] we show that the subsetting constraint is symmetric with respect to the inverse properties. That is, if p 1 p 2 then also p 1 1 p 1 2. 8. Redefinition constraint: Redefinition strengthens subsetting with a requirement that the redefining property overrides the redefined property [1]. That is, for p 1, p 2 P, p 1 p 2 states that for objects in the source class of the redefining property p 1, the redefined property p 2 is equal to p 1. Formally, for e source(p 1 ) I, p I 2 (e) = p I 1 (e). This definition implies the following constraints: (a) Type redefinition: For object e source(p 1 ) I, p 2 I (e) target(p 1 ) I. (b) Multiplicity redefinition: For object e source(p 1 ) I, min(p 1 ) p 2 I (e) max(p 1 ), which implies the syntactic restriction that the multiplicity interval of p 1 is included in that of p 2. 9. Union constraint: Property union means that the union property combines all the union component properties. That is, for p, p 1,..., p n P, p = union(p 1,..., p n ), means that for every object e source(p) I, p I (e) = i=1..n (pi i (e)). 10. Association hierarchy: Association hierarchy means link inclusion, following the property ordering as specified in the constraint. That is, for a 1, a 2 A, a 1, p 1, q 1 a 2, p 2, q 2 requires that for every object e source(p 1 ), p 1 (e) p 2 (e), and for every object d source(q 1 ), q 1 (d) q 2 (d). In [1] it is shown that association hierarchy is equivalent to subsetting. 11. Association-class hierarchy: Association-class hierarchy is a regular class hierarchy, but also implies hierarchy of the associated associations. That is, for C 1, C 2 C, C 1, p 1, q 1 C 2, p 2, q 2 means C 1 C 2, and if for i = 1, 2, assoc ac (C i ) = a i, then a 1, p 1, q 1 a 2, p 2, q 2. 12. xor: A xor constraint restricts the extensions of the xored properties, so that they are not defined on common objects. That is, for xor(p, q), an instance I, and an object e base(xor(p, q)) I, if p I (e) then q I (e) =, or vice-versa. 12

Semantics-based relations: An instance I of a class model CM is legal, denoted I = CM, if it satisfies all the constraints of CM. A constraint c is entailed by a class-model CM, denoted CM = c if it holds in every legal instance of CM. A class model CM 1 is entailed from class model CM 2, denoted CM 1 = CM 2, if every legal instance of CM 1 is a legal instance of CM 2. Class models are equivalent, denoted CM 1 CM 2, if they have the same set of legal instances. A legal instance I 1 is included in a legal instance I 2 (I 1 is a sub-instance of I 2 ), if extensions of classes and associations in I 1 are included in their corresponding extensions in I 2. References [1] A. Maraee and M. Balaban. Inter-association Constraints in UML2: Comparative Analysis, Usage Recommendations, and Modeling Guidelines. In MoDELS 2012, 2012. [2] Object Management Group (OMG). OMG Unified Modeling Language. Specification Version 2.5, 2015. 13