Modeling OCL Collection Types and Type Casting Using Constraint Programming

In Model-Driven Engineering (MDE), the Unified Modeling Language (UML) is often combined with the Object Constraint Language (OCL) to express constraints on models. While these constraints are typically used for validation, certain tasks-such as model search, completion, repair, or exploration–require the automatic generation of models that satisfy them. Due to the combinatorial nature of these tasks, even small models can lead to computationally complex problems. Constraint Programming (CP) offers a powerful paradigm for modeling and solving such combinatorial challenges, notably through the use of global constraints, which enable concise models supported by efficient algorithms. Although previous approaches have tackled model search using tools like Alloy or ATLc, they often rely on simplified subsets or avoid the use of global constraints. In this paper, we extend the ATLc approach by leveraging CP to the expressiveness and coverage of UML/OCL. We introduce a CP model for representing UML instances and evaluating queries, along with global constraint formulations for UML collection types (Sequence, Bag, Set, OrderedSet) and their corresponding OCL type casting operations (asSequence, asBag, asSet and asOrderedSet). Finally we provide an implementation allowing us to test our model for this subset of OCL and compare with related work.

Authors

Institutions

Publication Details

Published
2025-11-03
DOI
https://doi.org/10.1109/ictai66417.2025.00206
Primary Topic
Model-Driven Software Engineering Techniques
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Modeling OCL Collection Types and Type Casting Using Constraint Programming

Samir Loudni, Massimo Tisi, Théo Le Calvar, Matthew Coyle
Model-Driven Software Engineering Techniques
article

Modeling OCL Collection Types and Type Casting Using Constraint Programming

Samir Loudni, Massimo Tisi, Théo Le Calvar, Matthew Coyle
article en

Abstract

In Model-Driven Engineering (MDE), the Unified Modeling Language (UML) is often combined with the Object Constraint Language (OCL) to express constraints on models. While these constraints are typically used for validation, certain tasks-such as model search, completion, repair, or exploration–require the automatic generation of models that satisfy them. Due to the combinatorial nature of these tasks, even small models can lead to computationally complex problems. Constraint Programming (CP) offers a powerful paradigm for modeling and solving such combinatorial challenges, notably through the use of global constraints, which enable concise models supported by efficient algorithms. Although previous approaches have tackled model search using tools like Alloy or ATLc, they often rely on simplified subsets or avoid the use of global constraints. In this paper, we extend the ATLc approach by leveraging CP to the expressiveness and coverage of UML/OCL. We introduce a CP model for representing UML instances and evaluating queries, along with global constraint formulations for UML collection types (Sequence, Bag, Set, OrderedSet) and their corresponding OCL type casting operations (asSequence, asBag, asSet and asOrderedSet). Finally we provide an implementation allowing us to test our model for this subset of OCL and compare with related work.

Centre National de la Recherche Scientifique (FR), Laboratoire des Sciences du Numérique de Nantes (FR), IMT Atlantique (FR)
Openalex Percentile: Top 59%
Model-Driven Software Engineering Techniques
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.