Difference between revisions of "OCL/FAQ"

From Eclipsepedia

< OCL
Jump to: navigation, search
(Does OCL 1.2 work with J2SE 1.4?)
m
Line 41: Line 41:
 
The OCL Abstract Syntax Model is, itself, actually a metamodel sitting at the M2 level.
 
The OCL Abstract Syntax Model is, itself, actually a metamodel sitting at the M2 level.
  
=== Does OCL 1.1 work with J2SE 1.4? ===
+
=== Does OCL 1.x work with J2SE 1.4? ===
  
No.  OCL 1.1 requires EMF 2.3 and J2SE 5.0 or greater.  For J2SE 1.4 support, use the 1.0.x release of MDT OCL with [http://www.eclipse.org/modeling/emf/downloads/?project=emf EMF 2.2.x].
+
Because OCL extends EMF's Ecore, OCL's dependencies are the same as those of EMF.
  
=== Does OCL 1.2 work with J2SE 1.4? ===
+
<table border="1"><tr><th>OCL</th><th>EMF</th><th>Minimim JVM</th></tr>
  
No.  OCL 1.2 requires EMF 2.4 and J2SE 5.0 or greater.  For J2SE 1.4 support, use the 1.0.x release of MDT OCL with [http://www.eclipse.org/modeling/emf/downloads/?project=emf EMF 2.2.x].
+
<tr align="center">
 +
<td>1.0</td>
 +
<td>2.2</td>
 +
<td>1.4.2</td>
 +
</tr>
  
 +
<tr align="center">
 +
<td>1.1</td>
 +
<td>2.3</td>
 +
<td>1.5</td>
 +
</tr>
 +
 +
<tr align="center">
 +
<td>1.2</td>
 +
<td>2.4</td>
 +
<td>1.5</td>
 +
</tr>
 +
 +
</table>
 +
 +
See also [[EMF/EMF 2.3/JVM Requirements|EMF 2.3 JVM Requirements]].
  
 
[[Category:FAQ]]
 
[[Category:FAQ]]
 
[[Category:Modeling]]
 
[[Category:Modeling]]
 
[[Category:MDT]]
 
[[Category:MDT]]

Revision as of 16:34, 5 June 2008

In addition to the FAQ below, see also the OCL Developer Guide documentation included in the OCL SDK.

Contents


Newbie / General

What is MDT OCL?

MDT OCL provides a parser and interpreter for OCL constraints and expressions on any EMF-based metamodel. By that is meant any metamodel whose meta-metamodel is Ecore, and which (in being a metamodel) provides an EMF importer to create GenModels that generate a Java implementation.

So far, the Eclipse Modeling Project has two such metamodels: Ecore and UML (Ecore being its own meta-metamodel). Hence, the OCL component provides an OCL binding for each of these metamodels. OCL can parse constraints in either Ecore or UML models, and can evaluate them on the instances of Java classes generated from these models.

In terms of the OMG's modeling "stack", then, we have in the Eclipse Modeling Project

OCL's relation to the OMG modeling stack
Modeling Level Artifacts OCL's Role
M3 Ecore This is the metamodel for the OCL Abstract Syntax Model
M2 Ecore, UML OCL's generic AST model binds to these metamodels
M1 *.ecore and *.uml models OCL parses constraints on these models
generated Java code
M0 instances of generated Java classes OCL evaluates constraints on these objects
dynamic EMF objects

The OCL Abstract Syntax Model is, itself, actually a metamodel sitting at the M2 level.

Does OCL 1.x work with J2SE 1.4?

Because OCL extends EMF's Ecore, OCL's dependencies are the same as those of EMF.

OCLEMFMinimim JVM
1.0 2.2 1.4.2
1.1 2.3 1.5
1.2 2.4 1.5

See also EMF 2.3 JVM Requirements.