Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

OCL/Compliance

< OCL
Revision as of 08:18, 18 March 2013 by Ed.willink.me.uk (Talk | contribs) (Detailed Functionality)

Major Facilities

Topic OMG OCL 2.3.1 Ecore binding UML binding Pivot binding
OCL Standard Library textual hard coded hard coded modeled as a prototype for OCL 2.5 in OCL-2.4.oclstdlib, code generated to OCLstdlib.java, extensible/replaceable
XMI interchange under-specified Proprietary Ecore-based Proprietary UML and Ecore-based Prototype for OCL 2.5
Editors n/a none none Essential OCL, Complete OCL, OCLinEcore, OCLstdlib
Evaluation n/a on Ecore models on Ecore models on Ecore models
Impact Analyzer n/a supported none none

Library

Topic OMG OCL 2.3 Ecore binding UML binding Pivot binding
'container' no operation eContainer() if EObject as Ecore oclContainer()
'contents' no operation eContents() if EObject as Ecore oclContents()
oclIsNew()  ? supported dummy operation
oclType() unclear identity at most as Ecore fully reflective
String::toLowerCase String::toLowerCase String::toLower or String::toLower as Ecore String::toLowerCase or String::toLower
String::toUpperCase String::toUpperCase String::toUpper or String::toUpper as Ecore String::toUpperCase or String::toUpper
Collection::selectByKind n/a Collection::selectByKind as Ecore Collection::selectByKind
Collection::selectByType n/a Collection::selectByType as Ecore Collection::selectByType

Detailed Functionality

Topic OMG OCL 2.3.1 Ecore binding UML binding Pivot binding
Integer unlimited range Indigo: Integer, Juno: Integer or Long as Ecore Indigo: BigInteger, Juno: Integer or Long or BigInteger
Real unlimited range Double as Ecore BigDecimal
Nested Collections as Ecore fully supported
null as Ecore fully supported
invalid as Ecore fully supported
unlimited as Ecore fully supported
@pre not EssentialOCL n/a parsed and ? evaluated parsed only
pre-conditions not EssentialOCL parsed only parsed only parsed only
post-conditions not EssentialOCL parsed only parsed only parsed only
Associations not EssentialOCL n/a supported work in progress
Non-navigable opposites optional configurable supported supported
Package names name-only name-only as Ecore name or URI
Package import unspecified programmatic as Ecore import declarations/URI names
OclMessage not EssentialOCL n/a supported parsed
OclState not EssentialOCL n/a supported parsed
Numeric equality unclear 1 <> 1.0 asEcore 1 = 1.0
Implicit as set unclear null is Set{null} asEcore uses OclAny::oclAsSet()
Collection::any() non-result ambiguous Juno: null, Kepler: configurable asEcore Juno: null, Kepler: invalid
null.oclIsKindOf(X) ambiguous true asEcore Juno: true, Kepler: invalid

Prototype Functionality

The Pivot support adds

  • Type Constructors
  • Metaclass Types for reflecyive declarations
  • OclSelf for stronger static type declarations
  • Template Types for (parameterized classes/functions)
  • Lambda Types (for iterator bodies)
  • Unified Nested/Bounded Collections
  • Static Properties for UML stereotypes, Collection properties

Back to the top