API Changes in EMFT OCL This Week [message #30215] |
Tue, 04 April 2006 13:45 |
Eclipse User |
|
|
|
Originally posted by: cdamus.ca.ibm.com
Hi, all,
This week's integration build of OCL will have a number of API changes for
the implementation of the OMG's OCL 2.0 Adopted Specification. These
include:
- restructuring of the AST model to account for changes in the OCL spec
to align with UML 2.0. e.g., AttributeCallExp and AssociationEndCallExp
are merged as a single PropertyCallExp type
- changed Visitor methods to adapt to the AST model changes
- new Visitor methods to handle new AST constructs, such as StateExp,
MessageExp, TypeExp. These are also implemented by the
AbstractVisitorImpl class
- the ocl.uml package no longer models UML constructs such as Signal,
Operation, and AssociationClass. The parser now uses the Environment
interface to query for UML aspects of Ecore elements
- new EnvironmentFactory methods for creating Environments on a Property
context (to support init: and derive: expressions)
- new Environment methods to support property context and the UML
constructs not implemented by Ecore
Other changes include:
- the IOCLHelper and ExpressionsUtil convenience APIs support expressions
in property context, such as init: and derive:
- IOCLHelper and ExpressionsUtil add define() methods to define additional
properties and operations (def: expressions)
- EvaluationEnvironment supports the evaluation of expressions using
additional (def:) properties and operations
If you only use the IOCLHelper/ExpressionsUtil/Query APIs for parsing and
evaluating OCL expressions, you should not be affected by these changes
(except for ExpressionsUtil no longer throwing ANTLR exceptions; see
below). If you work with the AST or provide custom Environments, then
these changes are significant but quite straight-forward to adopt.
Finally, this week's build will remove the dependency on the ANTLR parser
generator and the awkward installation procedure. It uses instead a
bottom-up parser from the LALR Parser Generator project in SourceForge.
Cheers,
Christian
|
|
|
|
|
|
|
Re: API Changes in EMFT OCL This Week [message #30821 is a reply to message #30678] |
Mon, 10 April 2006 22:29 |
Eclipse User |
|
|
|
Originally posted by: cdamus.ca.ibm.com
Hi, Ed,
Yes, the names are unfortunate; I never understood why the UML family of
specification chose this singular (in both senses!) naming convention for
multivalued features. Perhaps if/when the OCL and UML2 projects come
together, we can use their fancy code generator to automagically pluralize
the API names.
Cheers,
Christian
Ed Willink wrote:
>> This week's integration build of OCL will have a number of API changes
>> for
>> the implementation of the OMG's OCL 2.0 Adopted Specification. These
>> include:
>
> and also a change of usage from plural to singular, thus LoopExp now
> has an "iterator" field (which is a list) rather an "iterators" field.
>
> This seems to be an unfortunate change and is not really consistent with
> Ecore which provides plural names for MOF concepts.
>
> Regards
>
> Ed Willink
|
|
|
|
|
|
|
Re: API Changes in EMFT OCL This Week [message #574099 is a reply to message #30678] |
Mon, 10 April 2006 22:29 |
Eclipse User |
|
|
|
Originally posted by: cdamus.ca.ibm.com
Hi, Ed,
Yes, the names are unfortunate; I never understood why the UML family of
specification chose this singular (in both senses!) naming convention for
multivalued features. Perhaps if/when the OCL and UML2 projects come
together, we can use their fancy code generator to automagically pluralize
the API names.
Cheers,
Christian
Ed Willink wrote:
>> This week's integration build of OCL will have a number of API changes
>> for
>> the implementation of the OMG's OCL 2.0 Adopted Specification. These
>> include:
>
> and also a change of usage from plural to singular, thus LoopExp now
> has an "iterator" field (which is a list) rather an "iterators" field.
>
> This seems to be an unfortunate change and is not really consistent with
> Ecore which provides plural names for MOF concepts.
>
> Regards
>
> Ed Willink
|
|
|
Powered by
FUDForum. Page generated in 0.03851 seconds