Enrich Your Models with OCL

Session Type: 
Extended [55 minutes]

The utility of the Object Constraint Language for modeling within Eclipse has increased dramatically in the last few years, so that MDT/OCL is now useful for everyday modelers rather than just advanced Java programmers. This long talk is focused on both non-OCL users and advanced OCL users so that any kind of audience may learn how OCL can enhance your (meta-)model definitions and how OCL forms the foundation of advanced modeling technologies such as Acceleo and QVT.

In the first part of the talk, focused on modelers who have yet to discover OCL, you will get a short introduction to the OMG's OCL language and its main capabilities. Then you will learn how OCL can be embedded within Ecore to define constraints for validation, operation bodies for evaluation and derived features for initialization of EMF models (both dynamic instances and those from generated Java classes using "genmodel"). A presentation of the OCL Interactive Console will be used to help the user to alternatively write and validate their OCL constraints.

Finally, focusing on the advanced OCL audience, you will learn about ongoing work to exploit Xtext to provide an enhanced OCL development environment and of OCL to define its own editors and language semantics. Extensive use of OCL within OCL mandates a dramatic performance improvement requiring a flexible Java code generator for an efficient first evaluation of an OCL expression and an impact analysis to avoid redundant re-evaluation following a model change.