BookRags.com Literature Guides Literature
Guides
Criticism & Essays Criticism &
Essays
Questions & Answers Questions &
Answers
Lesson Plans Lesson
Plans
My Bibliography Periodic Table U.S. Presidents Shakespeare Sonnet Shake-Up
Research Anything:        
History | Encyclopedias | Films | News | Create a Bibliography | More... Login | Register | Help

Not What You Meant?  There are 7 definitions for OCL.

Ocl (Object Constraint Language)

Print-Friendly  Order the PDF version  Order the RTF version
About 1 pages (420 words)
Object Constraint Language Summary

Bookmark and Share Know this topic well? Help others and get FREE products!

Ocl (Object Constraint Language)

The Object Constraint Language (OCL) is not a programming language; it is a formal expression language used to express constraints and conditions on object-oriented models. The evaluation of an OCL expression always delivers a value. It does not change anything in the system model. As an expression language OCL is also neutral about implementation decisions. This means that the usage of OCL is not tied to any specific platform or programming language.

The OCL is a subset of the UML (Unified Modeling Language), which is mainly used for documentation. Based on the Syntropy object-oriented analysis and design method, the OCL was originally developed within IBM as a language for business modeling. One of the guidelines of the OCL was that an easy-to-use standard was needed to document constraints. It was incorporated into the UML 1.1 specification in 1997 and is considered the standard notation for constraints on object-oriented systems.

A constraint is a restriction or set of rules that governs an object. The context of the constraint is the attribute, method, class, or other object that is being constrained. These constraints may be noted within the UML diagram or documented separately.

Constraints and conditions provide an additional level of detail not provided by standard UML diagrams. This additional detail helps formalize system requirements. Without the OCL, additional information to clarify models could be written in natural language. However, as natural language varies between modelers, it is prone to ambiguity and misinterpretation. The OCL provides a textual description of constraints on attributes, methods, and classes within object-oriented models. As a formal language for constraint notation, the OCL reduces ambiguity and increases precision of the system descriptions.

Specific types of constraints include invariants, preconditions, postconditions, and guards. An invariant is a condition that must be met at all times by all instances of the class or type. A precondition is a condition that must be true at the moment of execution of an operation. A postcondition is a condition that must be true at the moment after execution of an operation. A guard is a constraint that must be true before a state transition occurs.

OCL is a typed language, meaning that part of the definition of the OCL includes value types. The basic predefined types are Boolean, integer, string, and real. Additionally there are more advanced types, including collection types, meta types, and user-defined types. Various operations can be performed on each value types as part of evaluating an OCL expression. For example, operations for the integer and real types include mathematical functions.

This is the complete article, containing 420 words (approx. 1 page at 300 words per page).

More Information
  • View Ocl (Object Constraint Language) Study Pack
  • 7 Alternative Definitions
  • Search Results for "Ocl (Object Constraint Language)"
  • Add This to Your Bibliography
  • More Products on This Subject
    Object Constraint Language
    The Object Constraint Language is a declarative language for describing rules that apply to UML mode... more


     
    Ask any question on Object Constraint Language and get it answered FAST!
    Answer questions in BookRags Q&A and earn points toward
    discounted or even FREE Study Guides and other BookRags products!
    Learn more about BookRags Q&A
    Copyrights
    Ocl (Object Constraint Language) from World of Computer Science. ©2005-2006 Thomson Gale, a part of the Thomson Corporation. All rights reserved.

    Join BookRagslearn moreJoin BookRags




    About BookRags | Customer Service | Report an Error | Terms of Use | Privacy Policy