Some notes/summaries of the papers presented at the OCL Workshop 2012 (unless explicitly stated otherwise the notes refer to (my understanding of) the the presenter´s opinions, not mine, I can´t do both at the same time!)
Tool Supported OCL Refactoring Catalogue (Preproceeding PDF)
By: Jan Reimann, Claas Wilke, Birgit Demuth, Michael Muck, and Uwe Aßmann
Semantic preserving transformations for OCL. Goal: to improve reusability, readability,… OCL refactoring is one of the most requested features in the survey about OCL IDEs (by Joanna Chimiak-Opoka et al). 4 categories of refactorings: renamings, removals/materialisations, extractions/inlinings and separations/merges. Full catalogue at dresden-ocl.org/refactoring. 28 refactorings included. Refactorings implemented as part of the Dresden OCL toolkit. Process to apply the refactorings same as when you refactor code.
An extensible OCL Virtual Machine and Code Generator (Preproceeding PDF)
By: Ed Willink
In 2010 Wilke/Demuth shown that the most OCL constraints in the UML 2.4.1 metamodel definition are wrong. In UML 2.5 is a major simplification: less OCL missing and 0% is syntactically/semantically wrong. Claims that researchers cannot write “easy” papers criticizing UML / OCL standard, we will need to work harder. Eclipse OCL execution performance is not bad but it is interpreted: unsuitable for heavy usage. Code-generation could be better. He shows a simple example where a naïve code generation approach is four times faster. If the code generator “just” translates OCL to Java, then we have an improvement of a factor of 100. But of course, this generation has a number of challenges. Having a transformation that is semantically unsound and fast is easy, the difficulty is having a sound and efficient transformation (problems with data types, message dispatch, …). As a side note, the same OCL virtual machine extended with imperative constructs could be used to efficiently implement QVT.
Featherweight OCL: A study for the consistent semantics of OCL 2.3 in HOL (Preproceeding PDF)
By: Achim D. Brucker and Burkhart Wolff
The semantics of OCL 2.3 is spread over several places (ch.7 informal description, ch.10 semantics described using UML, ch.11 standard library, app. A formal semantics not normative) and all should be aligned with all the other UML (sub)standards. The work focuses on the problems of the “undefidness” semantics of OCL (first we had only the invalid value to signal exceptional situations, later the null value was introduced). Featherweight OCL formalizes the core OCL with a special emphasis on the formalization (and check of the consistency) of the integration of the null value (and its combination with the invalid one) in the OCL language. Right now, the way the standard is defined we had some funny things like “not (not X) = X” does not hold for all values of X or similary you have that “null and null= invalid”. Formalization is done with Isabelle/HOL. Their work could be used to update the Appendix A in the OCL standard.
On the Use of an Internal DSL for Enriching EMF Models (Preproceeding PDF)
By: Filip Křikava and Philippe Collet
Context of his work: applying MDE into self-adaptative software systems. Due to the limit expressiveness of structural constraints the started enriching EMF with OCL. When started using OCL, they detect some shortcomings and since their work was based on Scala they started enriching EMF with Scala. About the OCL shortcomings: hard to write, side-effect free expressions, porr support for user feedback, no support for warning/critiques, limited flexibility in context definition, no support for repairing inconsistencies,… (all them can be fixed but there is no one single solution that solves all). All these problems are linked to scalability (not in terms of performance but in terms of number and size of the expressions). Their solution is to use Scala to define an internal OCL-like DSL. As drawbacks of their approach, they mention the loss of formal reasoning and anaysis, difficulty to ensure side-effect free expressions and they are still missing constructs to express postconditions.
Library for Model Querying – lQuery (Preproceeding PDF)
By: Renārs Liepiņš
Defining model queries in a general-purpose programming language. Their IQuery extension for C++ allows to apply a selector on a collection of objects. There are number of primitive selectors predefined (e.g. to select objects of a given type, with a given attribute value…). These primitive selectors can be combined (with union of the results, chain, intersection, etc). These combinations can also be stored as selector patterns and reused afterwards. No query optimization available. The choice of the patterns was based on their own needs.
Ontology Driven Design of EMF Metamodels and Well-formedness Constraints (Preproceeding PDF)
By: Benedek Izsó, Zoltán Szatmári, Gábor Bergmann, Ákos Horváth, István Ráth and Dániel Varró
From textual requirements (in controlled english or protege) to DSML editors only allowing DSM models satisfiying the constraints of the requirements. Process: from requirements to ontologies and from ontologies to DSL editors. This inlcudes a OWL2 to Ecore and a OWL2 to IQPL (IncQuery pattern language, i.e. constraints expressed as graph patterns) mapping. Limited subset of SWRL to express rules can also be translated to IQPL. Mismatch due to the difference in the open world /closed world assumption exists. Transformation is implemented in the VIATRA2 framework. An Eclipse plug-in can be used to execute the transformation.
Modeling and Executing ConcurTaskTrees using a UML-and SOIL-based Metamodel (Preproceeding PDF)
By: Jens Brüning, Martin Kunert and Birger Lantow
ConcurTaskTrees is a hierarchy-oriented workflow-based modeling language. They have created a metamodel for it. CTT models are not sound by construction, some of the problems may be detected/prevented using OCL constraints. Modeling CTT with USE can provide some some soundness analysis. Operational semantics are implemented with SOIL. A USE plug-in to let users execute CTT models is also available. Interesting question for future work: can soundness properties for workflow nets defined by van der Aalst be expressed with OCL?
Automatic Generation of Test Models and Properties from UML Models with OCL Constraints(Preproceeding PDF)
By: Miguel A. Francisco and Laura M. Castro
Black-box testing approach with the goal of write less and test more. Approach is a combination of property-based testing (declarative statements about properties that the system must hold from which tests are generated) and model-based testing. they use Dresden OCL to parse the UML model + pre/postconditions in OCL and generate a set of abstract properties. QuickCheck use these properties to generate the tests for the system implementing the model.
Transformation rules from UML4MBT meta-model to SMT meta-model for model animation(Preproceeding PDF)
By: Jérôme Cantenot, Fabrice Ambert and Fabrice Bouquet
Goal: generation of tests using a SMT solver. UML4MBT is a subset of UML specific for model-based testing (only 3 digrams, inheritance not allowed). OCL4MBT language same for OCL (strings not allowed, real and integer variables bounded). Systems expressed with these sublanguages are transformed into a SMT meta-model (based on the standard SMT-libs representation of SMT problems). Then, this infformation can be used as input of a SMT solver to animate the model.
Model-based formal specification of a DSL library for a qualified code generator (short paper)(Preproceeding PDF)
By: Arnaud Dieumegard, Andres Toom and Marc Pantel
Domain of critical embedded systems. Most people in the domain uses simulink/scicos. OSS GeneAuto code generator takes simulink models and outputs C and Ada code. There´s a need of a formal specification of the code generator input language semantics, preferably suited for use by industry system and SW engineers. Main challenge is the semantics of the “block”s primitive due to the huge variability of most of them. E.g the “simple” sum block has 19 pages in the original documentation explaining the meaning of parameters.
The Secret Life of OCL Constraints (short paper) (Preproceeding PDF)
By: Oliver Hofrichter, Lars Hamann and Martin Gogolla
Identification of manifestation of OCL constraints beyond the expected (formal) use: informal descriptions of constraints, feedback (help to understand the errors in the model), implicit assumptions for model transformation (invariants are implicitly assumed to be kept by the transformations). Context project is an initiative of the german government to standardize IT for e-government.
Experiences using OCL for Business Rules on Financial Messaging (short paper) (Preproceeding PDF)
By: David Garry
They have built their own OCL implementation to execute OCL rules over XML data (their implementation generates Java from OCL). Problems they have encountered in the process: – Identifying exact error locations to proivde appropriate feedback, – supporting additional data type and functions and 3 – access to check data against external sources.
We all agreed that two key trends in this workshop edition were:
- Many people use variants of the standard OCL. These variants usually involve (at the same time) restricting the language so that only a core OCL is used and extending it with new types/functions needed for the domain they are using for. Clearly, there´s a need to add a modularization mechanism to OCL that allow people to import (domain-specific) libraries on top a core OCL language. The new version of OCL (to appear in 2013) will advance in this direction
- Several types of formalisms are used to analyze/reason on OCL expressions (CSPs, SAT, SMT, HOL,…). The choice of a formalisms seems to be closely related to the available expertise on the research group. A comparison between the trade-offs of the different formalisms when reasoning on OCL expressions could be very useful. Martin Gogolla and Fabian Büttner agreed to take the lead on creating a working group on this, involving representants of the different OCL-to-X tools available.
If you liked this post, you should subscribe to the blog feed or facebook page and follow my thoughts on twitter about software development or web design and social media .