Conference Paper

On the Evolution of OCL for Capturing Structural Constraints in Modelling Languages

DOI: 10.1007/978-3-642-11447-2_13 Conference: Rigorous Methods for Software Construction and Analysis, Essays Dedicated to Egon Börger on the Occasion of His 60th Birthday
Source: DBLP


The Object Constraint Language (OCL) can be used to capture structural constraints in the context of the abstract syntax of
modelling languages (metamodels) defined in the MOF metamodelling architecture. While the expression language of OCL has been
revised and updated a number of times since its inception, the constructs used for capturing constraints (invariants) have
remained unchanged. In this paper we argue that the abstract and concrete syntax of OCL invariants should also be updated
to address a number of shortcomings and render OCL more usable in a contemporary modelling environment. To support our arguments
we have implemented the proposed extensions in the prototype Epsilon Validation Language (EVL). To demonstrate the benefits
delivered, we present and discuss a concrete example.

Download full-text


Available from: Fiona A. C. Polack
  • Source
    • "There are numerous problems with these invariants constructs offered by OCL. In [13], Kolovos et al. gives a detailed overview of these issues, namely: support for user feedback; for warning critiques; support for dependent constraints; flexibility in context definition; support for repairing inconsistencies. To their list we would only add invariant reuse across different contexts and different models, so they do not have to be copy and paste. "
    [Show abstract] [Hide abstract]
    ABSTRACT: The Object Constraint Language (OCL) is widely used to enrich modeling languages with structural constraints, side effect free que-ry operations implementation and contracts. OCL was designed to be small and compact language with appealing short "to-the-point" expressions. When trying to apply it to larger EMF models some shortcomings appear in the language expressions, the invariant con-structs as well as in the supporting tools. In this paper we argue that some of these shortcomings are mainly related to the scalability of the OCL language and its trade-offs be-tween domain-specificity and general-purpose. We present an al-ternative approach based on an internal DSL in Scala. By using this modern multi-paradigm programing language we can realize an internal DSL with similar features found in OCL while taking full advantage of the host language including state-of-the-art tool support. In particular, we discuss the mapping between the OCL and Scala concepts together with some additional constructs for better scalability in both expressiveness and reusability of the ex-pressions.
    Full-text · Conference Paper · Sep 2012
    • "We have constructed the feature model in Section II in a principled manner, using MDE tools and techniques. For example, model validation [3] has been applied to construct domain-specific tool support for instantiating the feature model (Section III). The secondary contribution of the paper is along these lines; in Section IV we present the ways in which we anticipate that the feature model in Section II might be used – along with appropriate model management operations – to provide tool support that, for example, assists in the selection and comparison of M2T languages. "
    [Show abstract] [Hide abstract]
    ABSTRACT: Model-to-text (M2T) transformation is an important model management operation, as it is used to implement code and documentation generation; model serialisation (enabling model interchange); and model visualisation and exploration. Despite the creation of the MOF Model-To-Text Transformation Language (MOFM2T) in 2008, many very different M2T languages exist today. Because there is little interoperability between M2T languages and rewriting an existing M2T transformation in a new language is costly, developers face a difficult choice when selecting a M2T language. In this paper, we use domain analysis to identify a preliminary feature model for M2T languages. We demonstrate the appropriateness of the feature model by describing two different M2T languages, and discuss potential applications for a tool-supported and model-driven approach to describing the features of M2T languages.
    No preview · Conference Paper · Jun 2012
  • Source
    • "Many OCL constraints for MD-JPA have been defined in [18]. For structural description, we also consider [7], [8]. Most of stereotypes are applicable to specific attribute types. "
    [Show abstract] [Hide abstract]
    ABSTRACT: The Model Driven Development (MDD) has provided a new way of engineering today's rapidly changing requirements into the implementation. However, the development of user interface (UI) part of an application has not benefit much from MDD although today's UIs are complex software components and they play an essential role in the usability of an application. As one of the most common UI examples, consider view forms that are used for collecting data from the user. View forms are usually generated with a lot of manual efforts after the implementation. For example, in case of Java 2 Enterprise Edition (Java EE) web applications, developers create all view forms manually by referring to entity beans to determine the content of forms, but such manual creation is pretty tedious and certainly very much error-prone and makes the system maintenance difficult. One promise in MDD is that we can generate code from UML models. Existing design models in MDD, however, cannot provide all class attributes that are required to generate the practical code of UI fragments. In this paper, we propose a UML profile for view form generation as an extension of the object relational mapping (ORM) profile. A profile form of hibernate validator is also introduced to implement the practical view form generation that includes an user input validation.
    Full-text · Conference Paper · May 2010
Show more