scispace - formally typeset
Open AccessBook

The object constraint language : precise modeling with UML

Reads0
Chats0
TLDR
This book discusses modeling with Constraints in a UML Model, using Package Names in Navigations, using Pathnames in Inheritance Relations, and treating Instances as Collections.
Abstract
(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

read more

Citations
More filters

The unified modelling language reference manual

TL;DR: The Unified Modeling Language Reference Manual as discussed by the authors provides an excellent real-world guide to working with UML, from structured design methods of the '60s and '70s to the competing object-oriented design standards that were unified to create UML.
Journal ArticleDOI

Smart Dust: communicating with a cubic-millimeter computer

TL;DR: Model-integrated computing (MIC), an approach to model-based engineering that helps compose domain-specific design environments rapidly and cost effectively, is particularly relevant for specialized computer-based systems domains-perhaps even single projects.
Journal ArticleDOI

Alloy: a lightweight object modelling notation

TL;DR: This paper presents the Alloy language in its entirety, and explains its motivation, contributions and deficiencies.
Journal ArticleDOI

Model transformation: the heart and soul of model-driven software development

TL;DR: This article examines different approaches to model transformations and recommends desirable language characteristics for describing them and helps clarify the role of language in model transformations.