The object constraint language : precise modeling with UML

書誌事項

The object constraint language : precise modeling with UML

Jos B. Warmer, Anneke G. Kleppe

(The Addison-Wesley object technology series / Grady Booch, Ivan Jacobson, James Rumbaugh)

Addison Wesley Longman, c1999

大学図書館所蔵 件 / 7

この図書・雑誌をさがす

注記

Includes bibliographical references (p. 107-108) and index

内容説明・目次

内容説明

OCL complements the UML by providing a language for formally expressing the constraints of a model, a facility useful in user models as well as in the definition of the UML itself. Jos and Anneke provide a comprehensive and much-needed reference to this formalism.--Grady Booch, Ivar Jacobson, James Rumbaugh The Object Constraint Language (OCL) is a new notational language, a subset of the industry standard Unified Modeling Language, that allows software developers to write constraints over object models. These constraints are particularly useful, as they allow a developer to create a highly specific set of rules that governs the aspect of an individual object. As many software projects today require unique and complex rules that are written specifically for business models, OCL is fast becoming an integral facet of object development. This book is a practical guide to OCL for software architects, designers, and developers. Because it is designed for ease and usability, OCL is likely to gain broad acceptance. Much care has been taken during the design of OCL to ensure that the syntax is readable and writable by the average software modeler. The straightforward nature of OCL makes it a natural candidate to supersede current constraint languages. The authors' pragmatic approach and illustrative use of examples will help application developers to get up to speed quickly with this important object modeling method. Other highlights: *Detailed instruction explains how and why to use OCL, showing its relation to UML *Illuminating case study demonstrates several UML diagrams and corresponding constraints *Provides keen insight from the primary author of the OCL standard portion of the UML 1.1 standard of the OMG 0201379406B04062001

目次

(All chapters conclude with "Summary".) Foreword. Preface. Acknowledgments. Introduction. Who Should Read This Book. How This Book Should Be Used. Typeface Conventions. Information on Related Subjects. 1. Why Write Constraints? Definition of Constraint. Use of Constraints in Other Techniques. Design by Contract. Definition of Contract. Contents of a Contract. Advantages of Contracts. Preconditions and Postconditions. Invariants. Advantages of Constraints. Better Documentation. Improved Precision. Communication without Misunderstanding. Declarative or Operational Constraints. Advantages of a Declarative Language. Notation: Natural Language or Mathematical Expressions. Summary: Requirements for OCL. 2. OCL Basics. The "Royal and Loyal" System Example. Putting Invariants on Attributes. Putting Invariants on Associated Classes. Dealing with Collections of Objects. Sets, Bags, and Sequences. Inheritance. Working with Enumerations. Writing Preconditions and Postconditions. Where to Start Writing Invariants. Broken Constraints. Summary. 3. The Complete Overview of OCL Constructs. Types and Instances. Value Types and Object Types. OCL Expressions and OCL Constraints. The Context of an OCL Expression. The Context of an Invariant. The Context of a Pre- or Postcondition. The self Keyword. Basic Types and Operators. The Boolean Type. The Integer and Real Types. The String Type. Model Types. Attributes from the UML Model. Operations from the UML Model. Class Operations and Attributes from the UML Model. Associations and Aggregations from the UML Model. Association Classes from the UML Model. Qualified Associations from the UML Model. Using Package Names in Navigations. Using Pathnames in Inheritance Relations. Enumeration Types. The Set, Bag, and Sequence Types. Treating Instances as Collections. Flattening Collections. Operations on All Collection Types. Operations with Variant Meaning. Operations for the Set Type. Operations for the Sequence Type. Operations That Iterate over Collection Elements. The select Operation. The reject Operation. The collect Operation. Shorthand Notation for collect. The forAll Operation. The exists Operation. The iterate Operation. Constructs for Postconditions. Operations Defined on Every OCL Type. Types as Objects. Type Conformance Rules. Precedence Rules. Comments. Undefined. Summary. 4. Modeling with Constraints. Constraints in a UML Model. Invariants. Invariants for Derived Attributes or Associations. Preconditions and Postconditions. Guards in State Transition Diagrams. Using Guards and Events in Pre- and Postconditions. Change Events in State Transition Diagrams. Type Invariants for Stereotypes. Where OCL Expressions Can Be Used. Constraints and Inheritance. Styles for Specifying Constraints. Avoiding Complex Navigation Expressions. Choice of Context Object. Use of allInstances. Splitting and Constraints. Adding Extra Operations or Attributes. Using the collect Shorthand. Solving Modeling Issues with Constraints. Abstract Classes. Specifying Uniqueness Constraints. Adding Details to the Model versus Adding Constraints. Cycles in Class Models. Constraints on Associations. Multiplicity Constraints. The Subset Constraint. The Or Constraint. Optional Multiplicity in Associations. Summary. 5. Extending OCL. A Word of Caution. Extending the Standard OCL Types. Adding New OCL Types. Operational Use of Constraints. Generating Code for Constraints. When to Check Constraints. What to Do When the Constraint Fails. Summary. Appendix A. OCL Basic Types and Collection Types. Basic Types. OclType. OclAny. OclExpression. Real. Integer. String. Boolean. Enumeration. Collection-Related Types. Collection. Set. Bag. Sequence. Appendix B. Formal Grammar. Bibliography. Index. 0201379406T04062001

「Nielsen BookData」 より

関連文献: 1件中  1-1を表示

詳細情報

ページトップへ