did-you-know? rent-now

Amazon no longer offers textbook rentals. We do!

did-you-know? rent-now

Amazon no longer offers textbook rentals. We do!

We're the #1 textbook rental company. Let us show you why.

9780321179364

The Object Constraint Language Getting Your Models Ready for MDA

by ;
  • ISBN13:

    9780321179364

  • ISBN10:

    0321179366

  • Edition: 2nd
  • Format: Paperback
  • Copyright: 2003-08-27
  • Publisher: Addison-Wesley Professional

Note: Supplemental materials are not guaranteed with Rental or Used book purchases.

Purchase Benefits

  • Free Shipping Icon Free Shipping On Orders Over $35!
    Your order must be $35 or more to qualify for free economy shipping. Bulk sales, PO's, Marketplace items, eBooks and apparel do not qualify for this offer.
  • eCampus.com Logo Get Rewarded for Ordering Your Textbooks! Enroll Now
List Price: $44.99 Save up to $17.21
  • Rent Book $27.78
    Add to Cart Free Shipping Icon Free Shipping

    TERM
    PRICE
    DUE
    USUALLY SHIPS IN 24-48 HOURS
    *This item is part of an exclusive publisher rental program and requires an additional convenience fee. This fee will be reflected in the shopping cart.

Supplemental Materials

What is included with this book?

Summary

bull; Learn to better leverage the siginificant power of UML 2.0 and the Model-Driven Architecture standard bull; The OCL helps developers produce better software by adding vital definition to their designs bull; Updated to reflect the latest version of the standard - OCL 2.0

Author Biography

Jos Warmer is the primary author of the OCL standard. He is an active member of the Unified Modeling Language (UML) Revision Task Force Anneke Kleppe is a consultant and adviser at Klasse Objecten, which she founded in 1995

Table of Contents

List of Figures xv
List of Tables xvii
Foreword to the First Edition xix
Foreword to the Second Edition xx
Preface and Introduction xxiii
Who Should Read This Book
xxiv
How This Book Should Be Used
xxiv
Typeface Conventions
xxiv
Information on Related Subjects
xxv
Acknowledgments
xxv
Part 1 User Manual 1(104)
Chapter 1 MDA and the Use of OCL
3(18)
1.1 Introducing OCL
3(1)
1.2 Model Driven Architecture
4(5)
1.2.1 PIMs and PSMs
4(1)
1.2.2 Automation of Transformations
5(1)
1.2.3 MDA Building Blocks
5(2)
1.2.4 MDA Benefits
7(1)
1.2.5 The Silver Bullet?
8(1)
1.3 Modeling Maturity Levels
9(3)
1.3.1 Level 0: No Specification
9(1)
1.3.2 Level 1: Textual
10(1)
1.3.3 Level 2: Text with Diagrams
11(1)
1.3.4 Level 3: Models with Text
11(1)
1.3.5 Level 4: Precise Models
11(1)
1.3.6 Level 5: Models Only
12(1)
1.4 Building Better Models
12(3)
1.4.1 Why Combine UML and OCL?
12(2)
1.4.2 Value Added by OCL
14(1)
1.5 Characteristics of OCL
15(3)
1.5.1 Both Query and Constraint Language
16(1)
1.5.2 Mathematical Foundation, But No Mathematical Symbols
17(1)
1.5.3 Strongly Typed Language
17(1)
1.5.4 Declarative Language
18(1)
1.6 Summary
18(3)
Chapter 2 OCL By Example
21(16)
2.1 The "Royal and Loyal" System Example
21(3)
2.2 Adding Extra Information
24(3)
2.2.1 Initial Values and Derivation Rules
24(1)
2.2.2 Query Operations
25(1)
2.2.3 Defining New Attributes and Operations
26(1)
2.3 Adding Invariants
27(2)
2.3.1 Invariants on Attributes
27(1)
2.3.2 The Type of the Attribute Is a Class
27(1)
2.3.3 Invariants on Associated Objects
27(1)
2.3.4 Using Association Classes
28(1)
2.3.5 Using Enumerations
29(1)
2.4 Working with Collections of Objects
29(4)
2.4.1 Using Collections Operations
29(3)
2.4.2 Sets, Bags, OrderedSets, and Sequences
32(1)
2.5 Adding Preconditions and Postconditions
33(2)
2.5.1 Simple Preconditions and Postconditions
33(1)
2.5.2 Previous Values in Postconditions
34(1)
2.5.3 Messaging in Postconditions
34(1)
2.6 Taking Inheritance into Account
35(1)
2.7 Comments
35(1)
2.8 Let Expressions
36(1)
2.9 Summary
36(1)
Chapter 3 Building Models with OCL
37(34)
3.1 What Is a Model?
37(3)
3.1.1 Definitions
37(1)
3.1.2 A Model Is a Consistent, Coherent Unit
38(1)
3.1.3 The Context of an OCL Expression
38(2)
3.2 Use UML Diagrams as a Base
40(1)
3.3 Completing Class Diagrams
40(10)
3.3.1 Derivation Rules
40(1)
3.3.2 Initial Values
41(1)
3.3.3 Body of Query Operations
41(1)
3.3.4Invariants
41(1)
3.3.5 Preconditions and Postconditions
42(3)
3.3.6 Messaging in Postconditions
45(1)
3.3.7 Cycles in Class Models
46(1)
3.3.8 Defining Derived Classes
47(2)
3.3.9 Dynamic Multiplicity
49(1)
3.3.10 Optional Multiplicity
49(1)
3.3.11 Or Constraints
49(1)
3.4 Completing Interaction Diagrams
50(4)
3.4.1 Instances
51(2)
3.4.2 Conditions
53(1)
3.4.3 Actual Parameter Values
54(1)
3.5 Completing Statecharts
54(3)
3.5.1 Guards
54(2)
3.5.2 Target of Actions
56(1)
3.5.3 Actual Parameter Values
56(1)
3.5.4 Change Events
57(1)
3.5.5 Restrictions on States
57(1)
3.6 Completing Activity Diagrams
57(2)
3.7 Completing Component Diagrams
59(1)
3.8 Completing Use Cases
59(2)
3.8.1 Preconditions and Postconditions
59(2)
3.9 Modeling Styles
61(4)
3.9.1 Definitions of Attributes or Operations
61(1)
3.9.2 The Subset Constraint
62(1)
3.9.3 Adding Inheritance Versus Invariants
63(2)
3.10 Tips and Hints
65(5)
3.10.1 Avoid Complex Navigation Expressions
65(1)
3.10.2 Choose Context Wisely
66(1)
3.10.3 Avoid allInstances
67(1)
3.10.4 Split and Constraints
68(1)
3.10.5 Use the collect Shorthand
69(1)
3.10.6 Always Name Association Ends
69(1)
3.11 Summary
70(1)
Chapter 4 Implementing OCL
71(22)
4.1 Implementation Process
71(1)
4.2 Implementing UML Model Elements
72(2)
4.3 Implementing the OCL Standard Library
74(8)
4.3.1 OCL Basic Types
74(3)
4.3.2 OCL Tuples
77(1)
4.3.3 OCL Collection Types
77(5)
4.4 Implementing OCL Expressions
82(3)
4.4.1 Evaluation Order
82(1)
4.4.2 No Side Effects
83(1)
4.4.3 Getting Attribute and AssociationEnd Values
83(1)
4.4.4 Let Expressions
84(1)
4.4.5 Treating Instances as Collections
84(1)
4.5 Merging Code Fragments
85(5)
4.5.1 Derivation Rules
85(1)
4.5.2 Invariants
86(1)
4.5.3 Preconditions and Postconditions
86(1)
4.5.4 Guards and Change Events in Statecharts
87(2)
4.5.5 Code for Interaction Diagrams
89(1)
4.6 Considerations for Constraints
90(1)
4.6.1 When to Check Constraints
90(1)
4.6.2 What to Do When a Constraint Fails
91(1)
4.7 Summary
91(2)
Chapter 5 Using OCL for MDA
93(12)
5.1 Relation of OCL to MDA
93(1)
5.2 Metamodels
93(3)
5.3 The OCL and UML Metamodels
96(3)
5.3.1 The UML Metamodel
96(1)
5.3.2 The OCL Metamodel
97(1)
5.3.3 The Relationship Between the UML and OCL Metamodels
98(1)
5.4 Using OCL to Define Languages
99(1)
5.5 Using OCL to Define Transformations
100(3)
5.5.1 Example Transformation Definition
101(2)
5.6 Summary
103(2)
Part 2 Reference Manual 105(66)
Chapter 6 The Context of OCL Expressions
107(14)
6.1 A Combined Model
107(3)
6.1.1 The Context of an OCL Expression
108(1)
6.1.2 The self Keyword
109(1)
6.1.3 More Than One Expression to a Context
109(1)
6.2 Classes and Other Types
110(1)
6.2.1 Invariants
110(1)
6.2.2 Definitions of Attributes or Operations
111(1)
6.3 Attributes and Association Ends
111(1)
6.3.1 Derivation Rules
111(1)
6.3.2 Initial Values
112(1)
6.4 Operations
112(2)
6.4.1 Preconditions and Postconditions
113(1)
6.4.2 Body of Query Operations
113(1)
6.5 Expressions in Behavior Diagrams
114(2)
6.5.1 Instances
114(1)
6.5.2 Conditions
114(1)
6.5.3 Guards
114(1)
6.5.4 Actual Parameter Values
114(1)
6.5.5 Target to Actions or Activities
115(1)
6.5.6 Change Events
115(1)
6.6 Use Cases
116(1)
6.6.1 Preconditions and Postconditions
116(1)
6.7 Constraints and Inheritance
116(5)
6.7.1 Consequences for Invariants
117(1)
6.7.2 Consequences for Preconditions and Postconditions
118(3)
Chapter 7 Basic OCL Elements
121(8)
7.1 Expressions, Types, and Values
121(1)
7.1.1 Value Types and Object Types
122(1)
7.2 Basic Types and Operators
122(4)
7.2.1 The Boolean Type
122(2)
7.2.2 The Integer and Real Types
124(2)
7.2.3 The String Type
126(1)
7.3 Precedence Rules
126(1)
7.4 Use of Infix Operators
127(1)
7.5 Comments
127(2)
Chapter 8 User-defined Types
129(8)
8.1 Features of User-defined Types
129(1)
8.1.1 Attributes and Operations
129(1)
8.1.2 Class Operations and Attributes
130(1)
8.2 Associations and Aggregations
130(4)
8.2.1 Association Classes
132(1)
8.2.2 Qualified Associations
133(1)
8.3 Enumeration Types
134(3)
Chapter 9 Collection Types
137(18)
9.1 The Collection Types
137(3)
9.1.1 Collection Constants
138(1)
9.1.2 Collection Type Expressions
138(1)
9.1.3 Collections Operations
139(1)
9.1.4 Treating Instances as Collections
139(1)
9.1.5 Collections of Collections
140(1)
9.2 Operations on Collection Types
140(6)
9.2.1 Operations with Variant Meaning
140(5)
9.2.2 Operations on OrderedSets and Sequences Only
145(1)
9.3 Loop Operations or Iterators
146(9)
9.3.1 Iterator Variables
146(2)
9.3.2 The isUnique Operation
148(1)
9.3.3 The sortedBy Operation
148(1)
9.3.4 The select Operation
149(1)
9.3.5 The reject Operation
149(1)
9.3.6 The any Operation
150(1)
9.3.7 The for All Operation
150(1)
9.3.8 The exists Operation
151(1)
9.3.9 The one Operation
151(1)
9.3.10 The collect Operation
152(1)
9.3.11 Shorthand Notation for collect
152(1)
9.3.12 The collectNested Operation
153(1)
9.3.1 The Iterate Operation
153(2)
Chapter 10 Advanced Constructs
155(20)
10.1 Constructs for Postconditions
155(3)
10.1.1 The @pre Keyword
155(1)
10.1.2 The result Keyword
156(1)
10.1.3 The ocllsNew Operation
156(1)
10.1.4 The isSent Operator
156(1)
10.1.5 The message Operator
157(1)
10.2 Operations of the OclMessage Type
158(2)
10.2.1 The hasReturned and result Operations
158(1)
10.2.2 The isSignalCall and isOperationCall operations
159(1)
10.3 Packaging Expressions
160(1)
10.4 Local Variables
161(1)
10.5 Tuples and Tuple Types
162(1)
10.6 Undefined Values, the OclVoidType
163(1)
10.7 Retyping or Casting
164(1)
10.8 Type Conformance Rules
164(1)
10.9 Accessing Overriden Features
165(1)
10.10 The OclAny Type
166(16)
10.10.1 Operations on OclAny
166(3)
10.10.2 The allInstances Operation
169(2)
Appendix A Glossary 171(4)
Appendix B OCL Grammar Rules 175(6)
B.1 EBNF Rules for Context Declaration
175(1)
B.2 EBNF Rules for Expression
176(5)
Appendix C A Business Modeling Syntax for OCL 181(10)
C.1 Introduction
181(1)
C.2 Informal Definition
182(6)
C.2.1 Iterators
182(4)
C.2.2 Collection Operations
186(2)
C.2.3 Other Differences
188(1)
C.3 Some Remarks on the Resemblance to SQL
188(1)
C.4 More Elaborate Examples
189(2)
Appendix D Example Implementation 191(6)
Appendix E Differences Between OCL Versions 1.1 and 2.0 197(4)
E.1 Syntax Changes
197(1)
E.1.1 Context Declaration
197(1)
E.1.2 Enumerations and Class Attributes and Operations
197(1)
E.1.3 Missing Rolenames and Using Association Classes
198(1)
E.1.4 Operations
198(1)
E.2 New Types
198(1)
E.3 Extra Predefined Operations
198(1)
E.4 New Options in Postconditions
199(1)
E.5 Other Changes
199(2)
Bibliography 201(2)
Index 203

Supplemental Materials

What is included with this book?

The New copy of this book will include any supplemental materials advertised. Please check the title of the book to determine if it should include any access cards, study guides, lab manuals, CDs, etc.

The Used, Rental and eBook copies of this book are not guaranteed to include any supplemental materials. Typically, only the book itself is included. This is true even if the title states it includes any access cards, study guides, lab manuals, CDs, etc.

Excerpts

In November 1997, the Object Management Group (OMG) set a standard for object-oriented analysis and design facilities. The standard, known as the Unified Modeling Language (UML), includes model diagrams, their seman-tics, and an interchange format between CASE tools. Within UML, the Object Constraint Language (OCL) is the standard for specifying expressions that add vital information to object-oriented models and other object modeling artifacts. In UML version 1.1, this information was thought to be limited to con-straints, where a constraint is defined as a restriction on one or more values of (part of) an object-oriented model or system. In UML version 2 the under-standing is that there is far more additional information that should be included in a model than constraints alone. Defining queries, referencing values, or stating conditions and business rules in a model, is all done by writing expressions, i.e. these are all expressed in OCL. OCL has evolved from an expression language in the Syntropy method through a business modeling language used within IBM until it was included in UML in 1997. At that point in time it received its current name. This name is currently well established and therefore it is not expedient to change it to, for instance,Object Expression Language, although this name would currently be more appropriate. OCL has been used as an expression language for object-oriented model-ing during the last six years. Today, a large number of tools support the lan-guage. Since OCL was first conceived there have been many changes and additions to the language. Lately this has led to a new version of OCL, ver-sion 2.0, to accompany the new version of UML. OCL version 2.0 is formally defined in theObject Constraint Language SpecificationOCL2002. This book explains all features of this version of OCL. Recently, the OMG has launched an initiative called the Model Driven Architecture (MDA). The essence of the MDA approach is that models are the basis for software development. To be able to work with this architecture good, solid, consistent, and coherent models are a neccesity. Using the com-bination of UML and OCL you are able to build such models. In the many books that have been published on the subject of UML, its expression language has not received the attention it deserves. A first aim of this book is to fill this gap and to explain UML's expression language, which supports the task of modeling object-oriented software as much as the UML dia-grams. The second aim of this book is to introduce OCL version 2.0 to a wider audience. Not everyone is pleased with reading a formal standard, the informa-tion should be available in a more easy to read book. The last aim of this book is to explain why the use of OCL is essential to the application of MDA. Without OCL and the languages, transformations, etc. that are all enabled by OCL, application of MDA is bound to fail. WHO SHOULD READ THIS BOOK The book is meant to be a textbook and reference manual for practitioners of object technology who find a need for more precise modeling. This certainly includes persons that want to apply MDA principles. These people will want to use OCL in their analysis and design tasks, most probably within the context of UML but potentially with other graphical object modeling languages. This book assumes that you have general knowledge of object-oriented modeling, preferably UML. If you lack this knowledge, there are many books on UML that you can read first. HOW THIS BOOK SHOULD BE USED Part 1 of this book explains how OCL can be put to use. Anyone unfamiliar with OCL should read this part. An introduction to the Model Driven Architecture is given and the key role OCL plays in that framework is described. In this part OCL is explained in a relatively informal way

Rewards Program