15 research outputs found
Target oriented relational model finding
Lecture Notes in Computer Science 8411, 2014Model finders are becoming useful in many software engineering problems. Kodkod is one of the most popular, due to its support for relational logic (a combination of first order logic with relational algebra operators and transitive closure), allowing a simpler specification of constraints, and support for partial instances, allowing the specification of a priori (exact, but potentially partial) knowledge about a problem's solution. However, in some software engineering problems, such as model repair or bidirectional model transformation, knowledge about the solution is not exact, but instead there is a known target that the solution should approximate. In this paper we extend Kodkod's partial instances to allow the specification of such targets, and show how its model finding procedure can be adapted to support them (using both PMax-SAT solvers or SAT solvers with cardinality constraints). Two case studies are also presented, including a careful performance evaluation to assess the effectiveness of the proposed extension.(undefined
Exploring scenario exploration
Model finders are very popular for exploring scenarios, helping users validate specifications by navigating through conforming model instances. To be practical, the semantics of such scenario exploration operations should be formally defined and, ideally, controlled by the users, so that they are able to quickly reach interesting scenarios. This paper explores the landscape of scenario exploration operations, by formalizing them with a relational model finder. Several scenario exploration operations provided by existing tools are formalized, and new ones are proposed, namely to allow the user to easily explore very similar (or different) scenarios, by attaching preferences to model elements. As a proof-of-concept, such operations were implemented in the popular Alloy Analyzer, further increasing its usefulness for (user-guided) scenario exploration.North Portugal Regional Operational Programme (ON.2 – O Novo Norte), under the National Strategic Reference Framework (NSRF), through the European Regional Development Fund (ERDF), within project NORTE-07-0124-FEDER-000062
Employing Classifying Terms for Testing Model Transformations
This contribution proposes a new technique for developing test cases for UML and OCL models. The technique is based on an approach that automatically constructs object
models for class models enriched by OCL constraints. By guiding the construction process through so-called classifying terms, the built test cases in form of object models are classified into equivalence classes. A classifying term can be an arbitrary OCL term on the class model that calculates for an object model a characteristic value. From each equivalence class of object models with identical characteristic values one representative is chosen. The constructed test cases behave significantly different with regard to the selected classifying term. By building few diverse object models, properties of the UML and OCL model can be explored effectively. The technique is applied for automatically constructing relevant source model test cases for model transformations between a source and target metamodel.Universidad de Málaga. Campus de Excelencia Internacional Andalucía Tech
Constraint-based Run-time State Migration for Live Modeling
Live modeling enables modelers to incrementally update models as they are running and get immediate feedback about the impact of their changes. Changes introduced in a model may trigger inconsistencies between the model and its run-time state (e.g., deleting the current state in a statemachine); effectively requiring to migrate the run-time state to comply with the updated model. In this paper, we introduce an approach that enables to automatically migrate such runtime state based on declarative constraints defined by the language designer. We illustrate the approach using Nextep, a meta-modeling language for defining invariants and migration constraints on run-time state models. When a model changes, Nextep employs model finding techniques, backed by a solver, to automatically infer a new run-time model that satisfies the declared constraints. We apply Nextep to define migration strategies for two DSLs, and report on its expressiveness and performance
Constraint-based run-time state migration for live modeling
Live modeling enables modelers to incrementally update models as they are running and get immediate feedback about the impact of their changes. Changes introduced in a model may trigger inconsistencies between the model and its run-time state (e.g., deleting the current state in a statemachine); effectively requiring to migrate the run-time state to comply with the updated model. In this paper, we introduce an approach that enables to automatically migrate such runtime state based on declarative constraints defined by the language designer. We illustrate the approach using Nextep, a meta-modeling language for defining invariants and migration constraints on run-time state models. When a model changes, Nextep employs model finding techniques, backed by a solver, to automatically infer a new run-time model that satisfies the declared constraints. We apply Nextep to define migration strategies for two DSLs, and report on its expressiveness and performance
Least - change bidirectional model transformation With QVT- R and ATL
QVT Relations (QVT-R) is the standard language proposed by the OMG to specify bidirectional model transformations. Unfortunately, in part due to ambiguities and omissions in the original semantics, acceptance and development of effective tool support has been slow. Recently, the checking semantics of QVTR has been clarified and formalized. In this article we propose a QVT-R tool that complies to such semantics. Unlike any other existing tool, it also supports metamodels enriched with OCL constraints (thus avoiding returning ill-formed models), and proposes an alternative enforcement semantics that works according to
the simple and predictable “principle of least change”. The implementation is based on an embedding of both QVT-R transformations and UML class diagrams (annotated with OCL) in Alloy, a lightweight formal specification language with support for automatic model finding
via SAT solving. We also show how this technique can be applied to bidirectionalize ATL, a popular (but unidirectional) model transformation language.This work is funded by ERDF-European Regional Development Fund through the COMPETE Programme (operational programme for competitiveness) and by national funds through the FCT-Fundacao para a Ciencia e a Tecnologia (Portuguese Foundation for Science and Technology) within project FCOMP-01-0124-FEDER-020532. The first author is also sponsored by FCT grant SFRH/BD/69585/2010. The authors would also like to thank all anonymous reviewers for the valuable comments and suggestions
A model repair application scenario with PROVA
Dissertação de mestrado em Engenharia InformáticaModel-Driven Engineering (MDE) is a well known approach to software development that
promotes the use of structured specifications, referred to as models, as the primary development
artifact. One of the main challenges in MDE is to deal with a wide diversity of evolving
models, some of which developed and maintained in parallel. In this setting, a particular
point of attention is to manage the model inconsistencies that become inevitable, since it is
too easy to make contradictory design decisions and hard to recognise them. In fact, during
the development process, user updates will undoubtedly produce inconsistencies which must
eventually be repaired. Tool support for this task is then essential in order to automate model
repair, so consistency can be easily recovered. However, one of the main challenges in this
domain is that for any given set of inconsistencies, there exists an infinite number of possible
ways of fixing it. While much of researchers recognise this fact, the way in which this problem
should be resolved is far from being agreed upon, and methods on how to detect and fix
inconsistencies vary widely. In this master dissertation a comparison between different approaches
is done and an application scenario is explored in close collaboration with industry.
An off-the-shelf model repair tool leveraging the power of satisfiability (SAT) solving is put
to test, while an incremental technique of complex repair trees is implemented and evaluated
as a promising, yet very distinctive competitor.A engenharia orientada aos modelos (MDE), uma abordagem bem conhecida no desenvolvimento
de software, promove a utilização de especificações estruturadas, denominadas modelos,
como o artefacto primário de desenvolvimento. Um dos principais desafios neste domínio é
lidar com a grande diversidade de modelos em evolução, muitas vezes desenvolvidos e mantidos
em paralelo. Neste cenário é essencial gerir as inconsistências dos modelos, que se tornam
inevitáveis uma vez que facilmente se tomam decisões contraditórias e de difícil reconhecimento.
De facto, durante o processo de modelação, atualizações aos modelos por parte do
utilizador irão sem dúvida produzir inconsistências que devem ser reparadas. Ferramentas que
suportem este processo tornam-se essenciais para automatizar a reparação dos modelos, por
forma a que a consistência seja facilmente recuperada. No entanto, para qualquer conjunto
de inconsistências existe um número potencialmente infinito de possíveis formas de o corrigir,
facto que revela ser um dos principais problemas neste domínio. Embora grande parte dos
investigadores reconheça este desafio, a forma como esta problemática deve ser abordada está
longe de reunir consenso e as soluções propostas variam muito. Nesta dissertação de mestrado
é feita uma comparação entre diferentes abordagens à técnica de reparação de modelos, e um
cenário de aplicação é explorado em estreita colaboração com a indústria. Uma ferramenta
pronta a usar e que aproveita o poder do SAT solving é posta à prova, enquanto que uma
outra técnica, incremental e baseada em complexas árvores de reparação, é implementada e
avaliada como uma abordagem concorrente promissora e bastante distinta
Debugging Relational Declarative Models with Discriminating Examples
Models, especially those with mathematical or logical foundations, have proven valuable to engineering practice in a wide range of disciplines, including software engineering. Models, sometimes also referred to as logical specifications in this context, enable software engineers to focus on essential abstractions, while eliding less important details of their software design. Like any human-created artifact, a model might have imperfections at certain stages of the design process: it might have internal inconsistencies, or it might not properly express the engineer’s design intentions.
Validating that the model is a true expression of the engineer’s intent is an important and difficult problem. One of the key challenges is that there is typically no other written artifact to compare the model to: the engineer’s intention is a mental object. One successful approach to this challenge has been automated example-generation tools, such as the Alloy Analyzer. These tools produce examples (satisfying valuations of the model) for the engineer to accept or reject. These examples, along with the engineer’s judgment of them, serve as crucial written artifacts of the engineer’s true intentions.
Examples, like test-cases for programs, are more valuable if they reveal a discrepancy between the expressed model and the engineer’s design intentions. We propose the idea of discriminating examples for this purpose. A discriminating example is synthesized from a combination of the engineer’s expressed model and a machine-generated hypothesis of the engineer’s true intentions. A discriminating example either satisfies the model but not the hypothesis, or satisfies the hypothesis but not the model. It shows the difference between the model and the hypothesized alternative.
The key to producing high-quality discriminating examples is to generate high-quality hypotheses. This dissertation explores three general forms of such hypotheses: mistakes that happen near borders; the expressed model is stronger than the engineer intends; or the expressed model is weaker than the engineer intends. We additionally propose a number of heuristics to guide the hypothesis-generation process.
We demonstrate the usefulness of discriminating examples and our hypothesis-generation techniques through a case study of an Alloy model of Dijkstra’s Dining Philosophers problem. This model was written by Alloy experts and shipped with the Alloy Analyzer for several years. Previous researchers discovered the existence of a bug, but there has been no prior published account explaining how to fix it, nor has any prior tool been shown effective for assisting an engineer with this task.
Generating high-quality discriminating examples and their underlying hypotheses is computationally demanding. This dissertation shows how to make it feasible