On the Evolution of OCL for Capturing Structural Constraints in Modelling Languages Dimitrios S. Kolovos, Richard F. Paige, and Fiona A.C. Polack Department of Computer Science, University of York, Heslington, York, YO10 5DD, UK. [dkolovos,paige,fiona]@cs.york.ac.uk Abstract. The Object Constraint Language (OCL) can be used to capture struc- tural constraints in the context of the abstract syntax of modelling languages (metamodels) defined in the MOF metamodelling architecture. While the expres- sion 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 ar- guments 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. 1 Introduction The Meta Object Facility (MOF) [1] is a self-defining language for specifying the ab- stract syntax of modelling languages such as UML. MOF enables capturing the con- cepts of a language and, to an extent, also expresses how they can be legitimately combined to form valid models. By design, MOF can only express a limited range of structural constraints, mainly with respect to containment and type conformance [1]. For more complex structural constraints that MOF cannot capture by itself, the Object Constraint Language (OCL) [2] is used. In OCL, structural constraints are captured in the form of invariants attached to MOF meta-classes. To enable users to specify precise and concise constraints, OCL provides an ex- pression language with powerful model querying and navigation facilities. Since its inception, the expression language and the type system of OCL have undergone sev- eral revisions and as a result they have been radically improved. By contrast, the syntax and semantics of invariants have remained almost unchanged since the early versions of the language. In this paper, we identify some of the shortcomings of the syntax and semantics of OCL invariants for capturing structural constraints and stress the need for evolving the standard. Our views on OCL modernization range from adding simple fea- tures such as support for detailed user feedback, to advanced features such as support for semi-automatically repairing inconsistent model elements. The focus in this paper is on improving support for OCL (and OCL-like languages), in terms of supporting richer structures for encoding constraints, checking constraints, and obtaining feedback from the checking process. As such, we work in the domain