Object Constraint Language

Object Constraint Language

The Object Constraint Language (OCL) is a declarative language for describing rules that apply to Unified Modeling Language (UML) models developed at IBM and now part of the UML standard. Initially, OCL was only a formal specification language extension to UML.[1] OCL may now be used with any Meta-Object Facility (MOF) Object Management Group (OMG) meta-model, including UML.[2] 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) specification.

Contents

Description

OCL is a descendant of Syntropy, 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 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.

Relation

OCL and UML

OCL supplements UML 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 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 is the notion of Model transformation. The OMG has defined a specific standard for model transformation called MOF/QVT or in short QVT. Several model transformation languages like GReAT, VIATRA, or Tefkat 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-compliance.

Alternatives

As a rule-based validation language, Schematron may be considered as an alternative to OCL. However Schematron works for Extensible Markup Language (XML) trees while OCL makes it possible to navigate MOF-based models and meta-models (i.e. XML Metadata Interchange (XMI) trees). In other words, OCL has a similar relation to UML or MOF as Schematron has to XML. (Note that Schematron uses XPath 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.

See also

References

  1. ^ Object Management Group (OMG); Object Constraint Language Specification, Chapter 7 of OMG Unified Modeling Language Specification, Version 1.3, March 2000 (first edition)
  2. ^ Object Management Group (OMG); Object Constraint Language OMG Available Specification Version 2.0, May 2006

External links

This article was originally based on material from the Free On-line Dictionary of Computing, which is licensed under the GFDL.


Wikimedia Foundation. 2010.

Игры ⚽ Поможем сделать НИР

Look at other dictionaries:

  • Object Constraint Language — OCL (Object Constraint Language) est un langage informatique d expression des contraintes utilisé par UML. C est une contribution d IBM à UML 1.1. Ce langage formel est volontairement simple d accès et représente un juste milieu entre langage… …   Wikipédia en Français

  • Object Constraint Language — Die Object Constraint Language (OCL) ist Bestandteil der Unified Modeling Language (UML) und dient unter anderem der textuellen Spezifikation von Invarianten in Klassendiagrammen, von Bedingungen in Sequenzdiagrammen oder der Formulierung von Vor …   Deutsch Wikipedia

  • Object-oriented programming — Programming paradigms Agent oriented Automata based Component based Flow based Pipelined Concatenative Concurrent computing …   Wikipedia

  • Constraint programming — Programming paradigms Agent oriented Automata based Component based Flow based Pipelined Concatenative Concurrent computin …   Wikipedia

  • Constraint logic programming — Programming paradigms Agent oriented Automata based Component based Flow based Pipelined Concatenative Concurrent computing …   Wikipedia

  • Object database — Example of an object oriented model.[1] An object database (also object oriented database management system) is a database management system in which information is represented in the form of objects as used in object oriented programming. Object …   Wikipedia

  • 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.A* Abstract An indicator applied to a classifier (e.g., actor, class, use case) or to some …   Wikipedia

  • Unified Modeling Language — Die Unified Modeling Language (Vereinheitlichte Modellierungssprache), kurz UML, ist eine graphische Modellierungssprache zur Spezifikation, Konstruktion und Dokumentation von Software Teilen und anderen Systemen[1]. Sie wird von der Object… …   Deutsch Wikipedia

  • Unified Modeling Language — (UML) 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, referred to as UML model. Overview The Unified… …   Wikipedia

  • Query language — Query languages are computer languages used to make queries into databases and information systems. Broadly, query languages can be classified according to whether they are database query languages or information retrieval query languages. The… …   Wikipedia

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”