All Topics  
Object Constraint Language

 

   Email Print
   Bookmark   Link






 

Object Constraint Language



 
 
The Object Constraint Language (OCL) is a declarative language for describing rules that apply to Unified Modeling Language
Unified Modeling Language

Unified Modeling Language is a standardized general-purpose modeling language in the field of software engineering.UML includes a set of graphical notation techniques to create abstract models of specific systems....
 (UML) models developed at IBM
IBM

International Business Machines Corporation, abbreviated IBM and nicknamed "Big Blue" , is a multinational corporation computer technology and consulting corporation headquartered in Armonk, New York, New York, United States....
 and now part of the UML standard. Initially, OCL was only a formal specification language extension to UML. OCL may now be used with any Meta-Object Facility
Meta-Object Facility

The Meta-Object Facility is an Object Management Group standard for model-driven engineering. The official reference page may be found at OMG's website....
 (MOF) Object Management Group
Object Management Group

Object Management Group is a consortium, originally aimed at setting standardization for distributed object-oriented systems, and is now focused on modeling and model-based standards....
 (OMG) meta-model, including UML. The Object Constraint Language is a precise text language that provides constraint and object query expressions on any MOF model or meta-model that cannot otherwise be expressed by diagrammatic notation.






Discussion
Ask a question about 'Object Constraint Language'
Start a new discussion about 'Object Constraint Language'
Answer questions from other users
Full Discussion Forum



Encyclopedia


The Object Constraint Language (OCL) is a declarative language for describing rules that apply to Unified Modeling Language
Unified Modeling Language

Unified Modeling Language is a standardized general-purpose modeling language in the field of software engineering.UML includes a set of graphical notation techniques to create abstract models of specific systems....
 (UML) models developed at IBM
IBM

International Business Machines Corporation, abbreviated IBM and nicknamed "Big Blue" , is a multinational corporation computer technology and consulting corporation headquartered in Armonk, New York, New York, United States....
 and now part of the UML standard. Initially, OCL was only a formal specification language extension to UML. OCL may now be used with any Meta-Object Facility
Meta-Object Facility

The Meta-Object Facility is an Object Management Group standard for model-driven engineering. The official reference page may be found at OMG's website....
 (MOF) Object Management Group
Object Management Group

Object Management Group is a consortium, originally aimed at setting standardization for distributed object-oriented systems, and is now focused on modeling and model-based standards....
 (OMG) meta-model, including UML. The Object Constraint Language is a precise text language that provides constraint and object query expressions on any MOF model or meta-model that cannot otherwise be expressed by diagrammatic notation. OCL is a key component of the new OMG standard recommendation for transforming models, the Queries/Views/Transformations (QVT
QVT

QVT , in the model-driven architecture, is a standard for model transformation defined by the Object Management Group....
) specification.

Description

OCL is a descendant of Syntropy
Syntropy

Syntropy is a second-generation object-oriented analysis and software design method developed at Object Designers Limited in the UK during the early 1990s....
, a second-generation object-oriented analysis and design method. The OCL 1.4 definition specified a constraint language. In OCL 2.0, the definition has been extended to include general object query language definitions.

OCL language statements are constructed in four parts:

  1. a context that defines the limited situation in which the statement is valid
  2. a property that represents some characteristics of the context (e.g., if the context is a class, a property might be an attribute)
  3. an operation (e.g., arithmetic, set-oriented) that manipulates or qualifies a property, and
  4. keywords (e.g., if, then, else, and, or, not, implies) that are used to specify conditional expressions.


OCL and UML

OCL supplements UML
Unified Modeling Language

Unified Modeling Language is a standardized general-purpose modeling language in the field of software engineering.UML includes a set of graphical notation techniques to create abstract models of specific systems....
 by providing expressions that have neither the ambiguities of natural language nor the inherent difficulty of using complex mathematics. OCL is also a navigation language for graph-based models.

OCL and MOF

OCL makes a Meta-Object Facility
Meta-Object Facility

The Meta-Object Facility is an Object Management Group standard for model-driven engineering. The official reference page may be found at OMG's website....
 model more precise by associating assertions with its meta-elements.

OCL and QVT

Of particular importance to Model Driven Engineering (MDE) or model-driven architecture
Model-driven architecture

Model-driven architecture is a software design approach for the development of software systems. It provides a set of guidelines for the structuring of specifications, which are expressed as computer models....
 is the notion of Model transformation
Model transformation

The notion of model transformation is central to Model Driven Engineering.A model transformation takes as input a model conforming to a given metamodel and produces as output another model conforming to a given metamodel....
. The OMG
Object Management Group

Object Management Group is a consortium, originally aimed at setting standardization for distributed object-oriented systems, and is now focused on modeling and model-based standards....
 has defined a specific standard for model transformation called MOF/QVT or in short QVT
QVT

QVT , in the model-driven architecture, is a standard for model transformation defined by the Object Management Group....
. Several model transformation languages like GReAT
Great

Great may refer to:* Greatness, being superior, majestic, transcendent, or divine* GReAT, Graph Rewriting and Transformation, a Model Transformation Language...
, VIATRA
VIATRA

The VIATRA framework is the core of a transformation-based verification and validation environment for improving the quality of systems designed using the Unified Modeling Language by automatically checking consistency, completeness, and dependability requirements....
, or Tefkat
Tefkat

Tefkat is a Model Transformation Language and a model transformation engine. The language is based on F-logic and the theory of stratified logic programs....
 are presently available, with different levels of compliance with the QVT standard. Many of these languages are built on top of OCL, which is the main part of the QVT
QVT

QVT , in the model-driven architecture, is a standard for model transformation defined by the Object Management Group....
-compliance.

Alternatives

As a rule-based validation language, Schematron
Schematron

In List of XML markup languages, Schematron is a rule-based XML validation language for making assertions about the presence or absence of patterns in XML trees....
 may be considered as an alternative to OCL. However Schematron works for Extensible Markup Language (XML) tree
XML tree

XML documents have a hierarchical structure and can conceptually be interpreted as a tree structure, called an XML tree.This tree structure can not be divided into just root, nodes and leaves as normal tree structures....
s while OCL makes it possible to navigate MOF
Meta-Object Facility

The Meta-Object Facility is an Object Management Group standard for model-driven engineering. The official reference page may be found at OMG's website....
-based models and meta-models (i.e. XML Metadata Interchange (XMI) trees). In other words, OCL has a similar relation to UML
Unified Modeling Language

Unified Modeling Language is a standardized general-purpose modeling language in the field of software engineering.UML includes a set of graphical notation techniques to create abstract models of specific systems....
 or MOF as Schematron has to XML. (Note that Schematron uses XPath
XPath

XPath is a language for selecting nodes from an XML document. In addition, XPath may be used to compute values from the content of an XML document....
 to navigate inside the XML trees.)
As a model specification language permitting designers to decorate a model or a meta-model with side-effect-free annotations, OCL could be replaced by languages like Alloy
Alloy language

In computer science and software engineering, the Alloy Analyzer is a software tool which can be used to analyze specifications written in the Alloy specification language....
.

See also

  • Computer model
  • Data mapping
    Data mapping

    Data mapping is the process of creating data element Map s between two distinct data models. Data mapping is used as a first step for a wide variety of data integration tasks including:...
  • Domain Specific Language (DSL)
  • Domain-specific modelling (DSM)
  • Eclipse
    Eclipse (software)

    Eclipse is a multi-language software development environment comprising an Integrated development environment and a plug-in system to extend it....
     
  • Glossary of Unified Modeling Language terms
    Glossary of Unified Modeling Language terms

    This glossary of Unified Modeling Language terms covers all versions of UML. Individual entries will point out any distinctions that exist between versions....
  • Intentional Programming
    Intentional Programming

    In computer programming, intentional programming is a collection of concepts which enable software source code to reflect the precise information, called intention, which programmers had in mind when conceiving their work....
     (IP)
  • List of UML tools
    List of UML tools

    This article lists Unified Modeling Language UML tools, classified by their Proprietary software or non-proprietary status....
  • Meta-model
  • Meta-modeling
  • Meta-modeling technique
  • Meta-Object Facility
    Meta-Object Facility

    The Meta-Object Facility is an Object Management Group standard for model-driven engineering. The official reference page may be found at OMG's website....
     (MOF)
  • Metadata
    Metadata

    Metadata is "data about other data", of any sort in any media. An item of metadata may describe an individual datum, or content item, or a collection of data including multiple content items and hierarchical levels, for example a database schema....
  • Model-based testing
    Model-based testing

    Model-based testing is software testing in which test cases are derived in whole or in part from a model that describes some aspects of the system under test ....
     (MBT)
  • Model-driven architecture
    Model-driven architecture

    Model-driven architecture is a software design approach for the development of software systems. It provides a set of guidelines for the structuring of specifications, which are expressed as computer models....
     (MDA)
  • Model Driven Engineering (MDE)
  • Model Transformation Language
    Model Transformation Language

    Presentation...
     (MTL)
  • Modeling language
    Modeling language

    A modeling language is any artificial language that can be used to express information or knowledge or systems in a structure that is defined by a consistent set of rules....
  • Modeling perspectives
    Modeling perspectives

    A modeling perspective in information systems is a particular way to represent pre-selected aspects of a system. Any perspective has a different focus, conceptualization, dedication and visualization of what the model is representing....
  • Object-oriented analysis and design
    Object-oriented analysis and design

    Object-oriented analysis and design is a software engineering approach that models a system as a group of interacting object s. Each object represents some entity of interest in the system being modeled, and is characterised by its class, its state , and its behavior....
     (OOAD)
  • MOF Queries/Views/Transformations
    QVT

    QVT , in the model-driven architecture, is a standard for model transformation defined by the Object Management Group....
     (QVT)
  • Semantic translation
    Semantic translation

    Semantic translation is the process of using semantic information to aid in the translation of data in one representation or data model to another representation or data model....
  • Transformation language
    Transformation language

    A transformation language is a computer language designed to transform some input text in a certain formal language into a modified output text that meets some specific goal....
     (TL)
  • UML tool
    UML tool

    A UML tool or UML modeling tool is a application software that supports some or all of the notation and semantics associated with the Unified Modeling Language , which is the industry standard general purpose modeling language for software engineering....
  • Vocabulary-based transformation
    Vocabulary-based transformation

    In metadata, a vocabulary-based transformation is a transformation aided by the use of a semantic equivalence statements within a controlled vocabulary....
  • XMI
  • XML transformation language
    XML transformation language

    An XML transformation language is a computer language designed specifically to transform an input XML document into an output XML document which satisfies some specific goal....
     (XTL)


External links


  • (brief OCL 2.0 syntax)
  • (Octopus OCL checker & Java code generator, book on OCL)
  • (OCL Toolkit, various OCL related publications)
  • (An interactive theorem proof environment for OCL, various OCL related publications)