SlideShare a Scribd company logo
Towards Domain Refinement for
UML/OCL Bounded Verification
Robert Clarisó
Universitat Oberta de Catalunya - Spain
Carlos A. González
AtlanMod team - Inria, Mines Nantes, LINA - France
Jordi Cabot
ICREA - Spain
13th Int. Conf on SW Enginerering and Formal Methods
8-11 September 2015, York, UK
Motivation
Who? The reader
What?
Where?
Find Wally
Inside the page
Motivation
Who? The reader
What?
Where?
Find Wally
Inside the page
Motivation
Who? A solver
What?
Where?
Find faults
In a bounded
state space
1. Bounded verification
2. Related work
Outline
2. Related work
3. Solution: refinement
4. Experimental results
5. Conclusions
Model M
Model-Based Verification
A B
C
Consistent
No contradictions
A
1
2
Property P
UML
Class diagram
Non-redundant
Lack of duplicities
A B
C
context C inv:
self.a->
excludes(self)
OCL
Invariants
Does model M satisfy correctness property P?
VERIFICATION TOOL
Model-based verification: overview
?
Model
A B
C
Correctness
Formal Notation
SAT / CP
?Correctness
Property
Finite
Bounds
Designer
Feedback
Example or ?
Counterexample or ?
Reasoning Engine
Bound selection
Choose “suitable” verification
bounds for the solver
Goal
CONFIDENCE
EFFICIENCY
BOUNDSSmall Large
Fast Slow
Less More
Bound selection: heuristics
Small bounds are sufficient to
detect most faults
Small scope hypothesis
Repeat analysis progressively
increasing bounds
Incremental scoping
Our approach: bound refinement
VERIFICATION TOOL
Model
A B
C Formal Notation
SAT / CP
Correctness
Property
Finite
Bounds
Reasoning Engine
Feedback
Example or ?
Countexample or ?
Our approach: bound refinement
VERIFICATION TOOL
Model
A B
C Formal Notation
SAT / CP
Correctness
Property
Finite
Bounds
Reasoning Engine
Tighter
boundsBound
refinement
Feedback
Example or ?
Countexample or ?
Related work
Abstract size-related info to
reason about size properties
Size abstraction
Bound propagation
Yu et al (FSE’2007)
CP solvers e.g.
Remove improductive values
from verification bounds
CP solvers e.g.
Interval Constraint Solver in eCLiPSe
This work:
Size abstraction + Bound propagation
Size properties CP solvers
Arbitrary SAT
Running example: production facility
context Part inv UniqueSerials :
Part::allInstances()->isUnique(serial)
context Machine inv MachineAvailability :context Machine inv MachineAvailability :
Cutter::allInstances()->exists(c|c:idle) and
Grinder::allInstances()->exists(g|g:idle)
Property : Strong satisfiability
“It should be possible to populate of each non-abstract class
while satisfying all integrity constraints”
context Part inv UniqueSerials :
Part::allInstances()->isUnique(serial)
context Machine inv MachineAvailability :
Running example: size abstraction
context Machine inv MachineAvailability :
Cutter::allInstances()->exists(c|c:idle) and
Grinder::allInstances()->exists(g|g:idle)
Multiplicities
“4 Parts per Machine”
Generalizations
“All Cutters are
Machines”
Invariants
“There is at least one Grinder ”
Size abstraction for OCL
OCL Expression Abstract OCL Expression
Refers to the values in
an instance of the model
Refers to the size of the
model instance
OCL expression Abstraction
col->including( object ) Col <= Exp <= Col + 1
col->exists( var | cond ) (0 <= Exp <= 1) ∧
(Col = 0) -> (Exp = 0)
V = { x ∈ [0,5], y ∈ [0,7] }
C = { x + y = 7, x + 1 ≥ 2y }
y
(x ≤ 5) ∧ (x + 1 ≥ 2y)
Integer Bound Propagation
xz
=> y ≤ 3
(x ≤ 5) ∧ (x + y = 7)
=> y ≥ 2
(y ≤ 3) ∧ (x + y = 7)
=> x ≥ 4
context Part inv UniqueSerials :
Part::allInstances()->isUnique(serial)
context Machine inv MachineAvailability :
Cutter::allInstances()->exists(c|c:idle) and
Grinder::allInstances()->exists(g|g:idle)
Refinement (1/4)
Domain bounds Source
Machine
Cutter
Grinder
Part
Uses
Serial
Number of objects of type Machine
Number of objects of type Cutter
Number of objects of type Grinder
Number of objects of type Part
Number of links in association Uses
Number of distinct values of attribute Serial
context Part inv UniqueSerials :
Part::allInstances()->isUnique(serial)
context Machine inv MachineAvailability :
Cutter::allInstances()->exists(c|c:idle) and
Grinder::allInstances()->exists(g|g:idle)
Refinement (1/4)
Domain bounds Source
Machine
Cutter
Grinder
Part
Uses
Serial
Number of objects of type Machine
Number of objects of type Cutter
Number of objects of type Grinder
Number of objects of type Part
Number of links in association Uses
Number of distinct values of attribute Serial
Constraint Source
context Part inv UniqueSerials :
Part::allInstances()->isUnique(serial)
context Machine inv MachineAvailability :
Cutter::allInstances()->exists(c|c:idle) and
Grinder::allInstances()->exists(g|g:idle)
Refinement (2/4)
Constraint Source
Machine = Cutter + Grinder
Uses ≤ Part * Machine
Uses = 4 * Machine
Uses ≤ Part
Part ≤ Serial
Cutter ≥ 1
Grinder ≥ 1
Generalization + Abstract class
Associaton Uses
Association end pieces
Association end device
Invariant UniqueSerials
Invariant MachineAvailability
Invariant MachineAvailability
Constraint Source
context Part inv UniqueSerials :
Part::allInstances()->isUnique(serial)
context Machine inv MachineAvailability :
Cutter::allInstances()->exists(c|c:idle) and
Grinder::allInstances()->exists(g|g:idle)
Refinement (2/4)
Constraint Source
Machine = Cutter + Grinder
Uses ≤ Part * Machine
Uses = 4 * Machine
Uses ≤ Part
Part ≤ Serial
Cutter ≥ 1
Grinder ≥ 1
Generalization + Abstract class
Associaton Uses
Association end pieces
Association end device
Invariant UniqueSerials
Invariant MachineAvailability
Invariant MachineAvailability
Constraint Source
context Part inv UniqueSerials :
Part::allInstances()->isUnique(serial)
context Machine inv MachineAvailability :
Cutter::allInstances()->exists(c|c:idle) and
Grinder::allInstances()->exists(g|g:idle)
Refinement (2/4)
Constraint Source
Machine = Cutter + Grinder
Uses ≤ Part * Machine
Uses = 4 * Machine
Uses ≤ Part
Part ≤ Serial
Cutter ≥ 1
Grinder ≥ 1
Generalization + Abstract class
Associaton Uses
Association end pieces
Association end device
Invariant UniqueSerials
Invariant MachineAvailability
Invariant MachineAvailability
Constraint Source
context Part inv UniqueSerials :
Part::allInstances()->isUnique(serial)
context Machine inv MachineAvailability :
Cutter::allInstances()->exists(c|c:idle) and
Grinder::allInstances()->exists(g|g:idle)
Refinement (2/4)
Constraint Source
Machine = Cutter + Grinder
Uses ≤ Part * Machine
Uses = 4 * Machine
Uses ≤ Part
Part ≤ Serial
Cutter ≥ 1
Grinder ≥ 1
Generalization + Abstract class
Associaton Uses
Association end pieces
Association end device
Invariant UniqueSerials
Invariant MachineAvailability
Invariant MachineAvailability
Constraint Source
context Part inv UniqueSerials :
Part::allInstances()->isUnique(serial)
context Machine inv MachineAvailability :
Cutter::allInstances()->exists(c|c:idle) and
Grinder::allInstances()->exists(g|g:idle)
Refinement (2/4)
Constraint Source
Machine = Cutter + Grinder
Uses ≤ Part * Machine
Uses = 4 * Machine
Uses ≤ Part
Part ≤ Serial
Cutter ≥ 1
Grinder ≥ 1
Generalization + Abstract class
Associaton Uses
Association end pieces
Association end device
Invariant UniqueSerials
Invariant MachineAvailability
Invariant MachineAvailability
context Part inv UniqueSerials :
Part::allInstances()->isUnique(serial)
context Machine inv MachineAvailability :
Cutter::allInstances()->exists(c|c:idle) and
Grinder::allInstances()->exists(g|g:idle)
Refinement (3/4)
Domain bounds Initial Bound Inferred Bound
Machine
Cutter
Grinder
Part
Uses
Serial
[0, ∞)
[0, ∞)
[0, ∞)
[0, ∞)
[0, ∞)
[0, ∞)
context Part inv UniqueSerials :
Part::allInstances()->isUnique(serial)
context Machine inv MachineAvailability :
Cutter::allInstances()->exists(c|c:idle) and
Grinder::allInstances()->exists(g|g:idle)
Refinement (3/4)
Domain bounds Initial Bound Inferred Bound
Machine
Cutter
Grinder
Part
Uses
Serial
[0, ∞)
[0, ∞)
[0, ∞)
[0, ∞)
[0, ∞)
[0, ∞)
[2, ∞)
[1, ∞)
[1, ∞)
[8, ∞)
[8, ∞)
[8, ∞)
Inferred
bounds
with no
user input
context Part inv UniqueSerials :
Part::allInstances()->isUnique(serial)
context Machine inv MachineAvailability :
Cutter::allInstances()->exists(c|c:idle) and
Grinder::allInstances()->exists(g|g:idle)
Refinement (4/4)
Domain bounds Initial Bound Inferred Bound
Machine
Cutter
Grinder
Part
Uses
Serial
[0, ∞)
[0, ∞)
[0, ∞)
[0, ∞)
[0, ∞)
[0, 10]
[2, 2]
[1, 1]
[1, 1]
[8, 8]
[8, 8]
[8, 8]
context Part inv UniqueSerials :
Part::allInstances()->isUnique(serial)
context Machine inv MachineAvailability :
Cutter::allInstances()->exists(c|c:idle) and
Grinder::allInstances()->exists(g|g:idle)
Refinement (4/4)
Domain bounds Initial Bound Inferred Bound
Machine
Cutter
Grinder
Part
Uses
Serial
[0, ∞)
[0, ∞)
[0, ∞)
[0, ∞)
[0, ∞)
[0, 10]
[2, 2]
[1, 1]
[1, 1]
[8, 8]
[8, 8]
[8, 8]
One choice
is sufficient
to bind the
state space
Designer
UML Model
A B
C
Domain Bounds
X = [1,20], Y = [2, 15], ...
Experimental set-up
KodKod Model Finder
Sat4j SAT Solver
UML-based Specification
Environment (USE)
Designer
Domain Bounds
X = [1,20], Y = [2, 15], ...
UML Model
A B
C
Bound refinement
Experimental set-up
KodKod Model Finder
Sat4j SAT Solver
Bound refinement
UML-based Specification
Environment (USE)
Experimental results: Summary (1/2)
Lightly
constrained
(“Easy”)
Satisfiable Unsatisfiable
–
Seconds Seconds
(“Easy”)
Highly
constrained
(“Hard”)
Difficulty +–
+
Minutes Hours
Experimental results: Summary (1/2)
Lightly
constrained
(“Easy”)
Satisfiable Unsatisfiable
No improvement No improvement
(“Easy”)
Highly
constrained
(“Hard”)
Speed-ups from
1,7x to 11x
Speed-ups from
2x to 50x
Overhead of bound tightening: <1 second
Conclusions… in 140 chars
Quick preprocessing to
make SAT-based verification
faster and more usable
Target: UML/OCL
Up to 50x speed-up
TODO: further experiments
Tweet0
Thank you for
your attention!
Robert Clarisó
rclariso@uoc.edu
@robertclariso

More Related Content

PDF
JavaScript ES10 and React Js Introduction
PDF
A Spin-off: CryEngine 3 SDK Checked with CppCat
PDF
C++17 introduction - Meetup @EtixLabs
PDF
Fun with Lambdas: C++14 Style (part 1)
PPTX
Fun with Lambdas: C++14 Style (part 2)
PPTX
Lambda Expressions in C++
PPTX
Basic c++ programs
PPTX
MuVM: Higher Order Mutation Analysis Virtual Machine for C
JavaScript ES10 and React Js Introduction
A Spin-off: CryEngine 3 SDK Checked with CppCat
C++17 introduction - Meetup @EtixLabs
Fun with Lambdas: C++14 Style (part 1)
Fun with Lambdas: C++14 Style (part 2)
Lambda Expressions in C++
Basic c++ programs
MuVM: Higher Order Mutation Analysis Virtual Machine for C

What's hot (20)

PDF
Generic programming and concepts that should be in C++
PDF
The present and the future of functional programming in c++
PDF
Monadic parsers in C++
PDF
Functions
PDF
The Vanishing Pattern: from iterators to generators in Python
PDF
Anomalies in X-Ray Engine
PPTX
Operator Overloading & Type Conversions
PPTX
PDF
PVS-Studio vs Chromium - Continuation
PDF
Hot C++: New Style of Arguments Passing
PDF
[OLD VERSION, SEE DESCRIPTION FOR THE NEWER VERSION LINK] Hot С++: Universal ...
PDF
Exploring Koltin on Android
PPTX
C++ 11 Features
PDF
Modern c++ (C++ 11/14)
PDF
Gremlin's Graph Traversal Machinery
PDF
Modern C++
PDF
Comparing the general static analysis in Visual Studio 2010 and PVS-Studio by...
PPTX
Library functions in c++
PDF
The Ring programming language version 1.5.2 book - Part 175 of 181
PPTX
expression in cpp
Generic programming and concepts that should be in C++
The present and the future of functional programming in c++
Monadic parsers in C++
Functions
The Vanishing Pattern: from iterators to generators in Python
Anomalies in X-Ray Engine
Operator Overloading & Type Conversions
PVS-Studio vs Chromium - Continuation
Hot C++: New Style of Arguments Passing
[OLD VERSION, SEE DESCRIPTION FOR THE NEWER VERSION LINK] Hot С++: Universal ...
Exploring Koltin on Android
C++ 11 Features
Modern c++ (C++ 11/14)
Gremlin's Graph Traversal Machinery
Modern C++
Comparing the general static analysis in Visual Studio 2010 and PVS-Studio by...
Library functions in c++
The Ring programming language version 1.5.2 book - Part 175 of 181
expression in cpp
Ad

Viewers also liked (13)

PPT
Información Máster Universitario de Ingeniería Informática UOC
PPTX
Secudrive usb-office-slide1-setup-jp
PPTX
Secudrive usb-office-slide4-capture-jp
DOC
Anurag
PPTX
NrgEdge® Build Your Profile Today!
PDF
Mike Brubaker Receives "Essence of Humanity" Award
PPT
Figuras de linguagem
PDF
How To: Creating Your Career Passport
PPTX
How to calculate the value of UX with standard financial models
DOCX
William Maschinot-Resume-Process Engineer
PPTX
From Enterprise IA To Enterprise UX
PPTX
water conservation
PPS
難得的照片
Información Máster Universitario de Ingeniería Informática UOC
Secudrive usb-office-slide1-setup-jp
Secudrive usb-office-slide4-capture-jp
Anurag
NrgEdge® Build Your Profile Today!
Mike Brubaker Receives "Essence of Humanity" Award
Figuras de linguagem
How To: Creating Your Career Passport
How to calculate the value of UX with standard financial models
William Maschinot-Resume-Process Engineer
From Enterprise IA To Enterprise UX
water conservation
難得的照片
Ad

Similar to Towards Domain Refinement for UML/OCL Bounded Verification (20)

PPT
Ecmfa2013
PPT
Slides chapters 28-32
PDF
Marathon - RV2011
PDF
Pragmatic model checking: from theory to implementations
PDF
Formally Defining and Iterating Infinite Models (MODELS 2012)
PPT
03 How to Keep Domain Requirements Models Reasonably Sized
PDF
Formal methods 4 - Z notation
PPTX
UNIT-2 OOM.pptxUNIT-2 OOM.pptxUNIT-2 OOM.pptx
PPT
UML-class diagram for beginners to adance.ppt
PPT
cse 355 UML class diagram software engineering.ppt
PPT
UML-class_diagram.ppt
PPT
UML-class_diagram.ppt diagrams ppt download
PPTX
20100522 software verification_sharygina_lecture02
PDF
Twins: OOP and FP
PDF
On the verification of UML/OCL class diagrams using constraint programming
PDF
SEC5261_SAT_Week08_Spring22.pdf
PPT
Object Oriented Modeling and Design with UML
PPT
Ooad ch 4
PDF
212101 Object Oriented Analysis Design Through Uml
PDF
212101 Object Oriented Analysis Design Through Uml
Ecmfa2013
Slides chapters 28-32
Marathon - RV2011
Pragmatic model checking: from theory to implementations
Formally Defining and Iterating Infinite Models (MODELS 2012)
03 How to Keep Domain Requirements Models Reasonably Sized
Formal methods 4 - Z notation
UNIT-2 OOM.pptxUNIT-2 OOM.pptxUNIT-2 OOM.pptx
UML-class diagram for beginners to adance.ppt
cse 355 UML class diagram software engineering.ppt
UML-class_diagram.ppt
UML-class_diagram.ppt diagrams ppt download
20100522 software verification_sharygina_lecture02
Twins: OOP and FP
On the verification of UML/OCL class diagrams using constraint programming
SEC5261_SAT_Week08_Spring22.pdf
Object Oriented Modeling and Design with UML
Ooad ch 4
212101 Object Oriented Analysis Design Through Uml
212101 Object Oriented Analysis Design Through Uml

More from rclariso (7)

PPTX
Participation Inequality and the 90-9-1 Principle in Open Source [OpenSym'2020]
PPT
Informació Màster Universitari d'Enginyeria Informàtica UOC
PPT
Máster Universitario en Ingeniería Informática de la UOC
PPT
Sessió informativa dels Màsters d'Enginyeria Informàtica i Programari Lliure ...
PPT
Orientacions generals per al Treball Final a la UOC
PPT
Orientaciones Generales para el Trabajo Final en la UOC
PPT
Másters en los Estudios de Informática, Multimedia y Telecomunicación de la UOC
Participation Inequality and the 90-9-1 Principle in Open Source [OpenSym'2020]
Informació Màster Universitari d'Enginyeria Informàtica UOC
Máster Universitario en Ingeniería Informática de la UOC
Sessió informativa dels Màsters d'Enginyeria Informàtica i Programari Lliure ...
Orientacions generals per al Treball Final a la UOC
Orientaciones Generales para el Trabajo Final en la UOC
Másters en los Estudios de Informática, Multimedia y Telecomunicación de la UOC

Recently uploaded (20)

PPTX
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
PDF
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
PDF
Upgrade and Innovation Strategies for SAP ERP Customers
PDF
How to Migrate SBCGlobal Email to Yahoo Easily
PDF
System and Network Administraation Chapter 3
PDF
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...
PPTX
CHAPTER 2 - PM Management and IT Context
PPTX
Operating system designcfffgfgggggggvggggggggg
PDF
Adobe Illustrator 28.6 Crack My Vision of Vector Design
PPTX
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
PPTX
Reimagine Home Health with the Power of Agentic AI​
PDF
Odoo Companies in India – Driving Business Transformation.pdf
PDF
Design an Analysis of Algorithms II-SECS-1021-03
PDF
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
PDF
Navsoft: AI-Powered Business Solutions & Custom Software Development
PDF
2025 Textile ERP Trends: SAP, Odoo & Oracle
PPTX
assetexplorer- product-overview - presentation
PDF
Understanding Forklifts - TECH EHS Solution
PPTX
Transform Your Business with a Software ERP System
PPTX
history of c programming in notes for students .pptx
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
Upgrade and Innovation Strategies for SAP ERP Customers
How to Migrate SBCGlobal Email to Yahoo Easily
System and Network Administraation Chapter 3
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...
CHAPTER 2 - PM Management and IT Context
Operating system designcfffgfgggggggvggggggggg
Adobe Illustrator 28.6 Crack My Vision of Vector Design
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
Reimagine Home Health with the Power of Agentic AI​
Odoo Companies in India – Driving Business Transformation.pdf
Design an Analysis of Algorithms II-SECS-1021-03
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
Navsoft: AI-Powered Business Solutions & Custom Software Development
2025 Textile ERP Trends: SAP, Odoo & Oracle
assetexplorer- product-overview - presentation
Understanding Forklifts - TECH EHS Solution
Transform Your Business with a Software ERP System
history of c programming in notes for students .pptx

Towards Domain Refinement for UML/OCL Bounded Verification

  • 1. Towards Domain Refinement for UML/OCL Bounded Verification Robert Clarisó Universitat Oberta de Catalunya - Spain Carlos A. González AtlanMod team - Inria, Mines Nantes, LINA - France Jordi Cabot ICREA - Spain 13th Int. Conf on SW Enginerering and Formal Methods 8-11 September 2015, York, UK
  • 4. Motivation Who? A solver What? Where? Find faults In a bounded state space
  • 5. 1. Bounded verification 2. Related work Outline 2. Related work 3. Solution: refinement 4. Experimental results 5. Conclusions
  • 6. Model M Model-Based Verification A B C Consistent No contradictions A 1 2 Property P UML Class diagram Non-redundant Lack of duplicities A B C context C inv: self.a-> excludes(self) OCL Invariants Does model M satisfy correctness property P?
  • 7. VERIFICATION TOOL Model-based verification: overview ? Model A B C Correctness Formal Notation SAT / CP ?Correctness Property Finite Bounds Designer Feedback Example or ? Counterexample or ? Reasoning Engine
  • 8. Bound selection Choose “suitable” verification bounds for the solver Goal CONFIDENCE EFFICIENCY BOUNDSSmall Large Fast Slow Less More
  • 9. Bound selection: heuristics Small bounds are sufficient to detect most faults Small scope hypothesis Repeat analysis progressively increasing bounds Incremental scoping
  • 10. Our approach: bound refinement VERIFICATION TOOL Model A B C Formal Notation SAT / CP Correctness Property Finite Bounds Reasoning Engine Feedback Example or ? Countexample or ?
  • 11. Our approach: bound refinement VERIFICATION TOOL Model A B C Formal Notation SAT / CP Correctness Property Finite Bounds Reasoning Engine Tighter boundsBound refinement Feedback Example or ? Countexample or ?
  • 12. Related work Abstract size-related info to reason about size properties Size abstraction Bound propagation Yu et al (FSE’2007) CP solvers e.g. Remove improductive values from verification bounds CP solvers e.g. Interval Constraint Solver in eCLiPSe This work: Size abstraction + Bound propagation Size properties CP solvers Arbitrary SAT
  • 13. Running example: production facility context Part inv UniqueSerials : Part::allInstances()->isUnique(serial) context Machine inv MachineAvailability :context Machine inv MachineAvailability : Cutter::allInstances()->exists(c|c:idle) and Grinder::allInstances()->exists(g|g:idle) Property : Strong satisfiability “It should be possible to populate of each non-abstract class while satisfying all integrity constraints”
  • 14. context Part inv UniqueSerials : Part::allInstances()->isUnique(serial) context Machine inv MachineAvailability : Running example: size abstraction context Machine inv MachineAvailability : Cutter::allInstances()->exists(c|c:idle) and Grinder::allInstances()->exists(g|g:idle) Multiplicities “4 Parts per Machine” Generalizations “All Cutters are Machines” Invariants “There is at least one Grinder ”
  • 15. Size abstraction for OCL OCL Expression Abstract OCL Expression Refers to the values in an instance of the model Refers to the size of the model instance OCL expression Abstraction col->including( object ) Col <= Exp <= Col + 1 col->exists( var | cond ) (0 <= Exp <= 1) ∧ (Col = 0) -> (Exp = 0)
  • 16. V = { x ∈ [0,5], y ∈ [0,7] } C = { x + y = 7, x + 1 ≥ 2y } y (x ≤ 5) ∧ (x + 1 ≥ 2y) Integer Bound Propagation xz => y ≤ 3 (x ≤ 5) ∧ (x + y = 7) => y ≥ 2 (y ≤ 3) ∧ (x + y = 7) => x ≥ 4
  • 17. context Part inv UniqueSerials : Part::allInstances()->isUnique(serial) context Machine inv MachineAvailability : Cutter::allInstances()->exists(c|c:idle) and Grinder::allInstances()->exists(g|g:idle) Refinement (1/4) Domain bounds Source Machine Cutter Grinder Part Uses Serial Number of objects of type Machine Number of objects of type Cutter Number of objects of type Grinder Number of objects of type Part Number of links in association Uses Number of distinct values of attribute Serial
  • 18. context Part inv UniqueSerials : Part::allInstances()->isUnique(serial) context Machine inv MachineAvailability : Cutter::allInstances()->exists(c|c:idle) and Grinder::allInstances()->exists(g|g:idle) Refinement (1/4) Domain bounds Source Machine Cutter Grinder Part Uses Serial Number of objects of type Machine Number of objects of type Cutter Number of objects of type Grinder Number of objects of type Part Number of links in association Uses Number of distinct values of attribute Serial
  • 19. Constraint Source context Part inv UniqueSerials : Part::allInstances()->isUnique(serial) context Machine inv MachineAvailability : Cutter::allInstances()->exists(c|c:idle) and Grinder::allInstances()->exists(g|g:idle) Refinement (2/4) Constraint Source Machine = Cutter + Grinder Uses ≤ Part * Machine Uses = 4 * Machine Uses ≤ Part Part ≤ Serial Cutter ≥ 1 Grinder ≥ 1 Generalization + Abstract class Associaton Uses Association end pieces Association end device Invariant UniqueSerials Invariant MachineAvailability Invariant MachineAvailability
  • 20. Constraint Source context Part inv UniqueSerials : Part::allInstances()->isUnique(serial) context Machine inv MachineAvailability : Cutter::allInstances()->exists(c|c:idle) and Grinder::allInstances()->exists(g|g:idle) Refinement (2/4) Constraint Source Machine = Cutter + Grinder Uses ≤ Part * Machine Uses = 4 * Machine Uses ≤ Part Part ≤ Serial Cutter ≥ 1 Grinder ≥ 1 Generalization + Abstract class Associaton Uses Association end pieces Association end device Invariant UniqueSerials Invariant MachineAvailability Invariant MachineAvailability
  • 21. Constraint Source context Part inv UniqueSerials : Part::allInstances()->isUnique(serial) context Machine inv MachineAvailability : Cutter::allInstances()->exists(c|c:idle) and Grinder::allInstances()->exists(g|g:idle) Refinement (2/4) Constraint Source Machine = Cutter + Grinder Uses ≤ Part * Machine Uses = 4 * Machine Uses ≤ Part Part ≤ Serial Cutter ≥ 1 Grinder ≥ 1 Generalization + Abstract class Associaton Uses Association end pieces Association end device Invariant UniqueSerials Invariant MachineAvailability Invariant MachineAvailability
  • 22. Constraint Source context Part inv UniqueSerials : Part::allInstances()->isUnique(serial) context Machine inv MachineAvailability : Cutter::allInstances()->exists(c|c:idle) and Grinder::allInstances()->exists(g|g:idle) Refinement (2/4) Constraint Source Machine = Cutter + Grinder Uses ≤ Part * Machine Uses = 4 * Machine Uses ≤ Part Part ≤ Serial Cutter ≥ 1 Grinder ≥ 1 Generalization + Abstract class Associaton Uses Association end pieces Association end device Invariant UniqueSerials Invariant MachineAvailability Invariant MachineAvailability
  • 23. Constraint Source context Part inv UniqueSerials : Part::allInstances()->isUnique(serial) context Machine inv MachineAvailability : Cutter::allInstances()->exists(c|c:idle) and Grinder::allInstances()->exists(g|g:idle) Refinement (2/4) Constraint Source Machine = Cutter + Grinder Uses ≤ Part * Machine Uses = 4 * Machine Uses ≤ Part Part ≤ Serial Cutter ≥ 1 Grinder ≥ 1 Generalization + Abstract class Associaton Uses Association end pieces Association end device Invariant UniqueSerials Invariant MachineAvailability Invariant MachineAvailability
  • 24. context Part inv UniqueSerials : Part::allInstances()->isUnique(serial) context Machine inv MachineAvailability : Cutter::allInstances()->exists(c|c:idle) and Grinder::allInstances()->exists(g|g:idle) Refinement (3/4) Domain bounds Initial Bound Inferred Bound Machine Cutter Grinder Part Uses Serial [0, ∞) [0, ∞) [0, ∞) [0, ∞) [0, ∞) [0, ∞)
  • 25. context Part inv UniqueSerials : Part::allInstances()->isUnique(serial) context Machine inv MachineAvailability : Cutter::allInstances()->exists(c|c:idle) and Grinder::allInstances()->exists(g|g:idle) Refinement (3/4) Domain bounds Initial Bound Inferred Bound Machine Cutter Grinder Part Uses Serial [0, ∞) [0, ∞) [0, ∞) [0, ∞) [0, ∞) [0, ∞) [2, ∞) [1, ∞) [1, ∞) [8, ∞) [8, ∞) [8, ∞) Inferred bounds with no user input
  • 26. context Part inv UniqueSerials : Part::allInstances()->isUnique(serial) context Machine inv MachineAvailability : Cutter::allInstances()->exists(c|c:idle) and Grinder::allInstances()->exists(g|g:idle) Refinement (4/4) Domain bounds Initial Bound Inferred Bound Machine Cutter Grinder Part Uses Serial [0, ∞) [0, ∞) [0, ∞) [0, ∞) [0, ∞) [0, 10] [2, 2] [1, 1] [1, 1] [8, 8] [8, 8] [8, 8]
  • 27. context Part inv UniqueSerials : Part::allInstances()->isUnique(serial) context Machine inv MachineAvailability : Cutter::allInstances()->exists(c|c:idle) and Grinder::allInstances()->exists(g|g:idle) Refinement (4/4) Domain bounds Initial Bound Inferred Bound Machine Cutter Grinder Part Uses Serial [0, ∞) [0, ∞) [0, ∞) [0, ∞) [0, ∞) [0, 10] [2, 2] [1, 1] [1, 1] [8, 8] [8, 8] [8, 8] One choice is sufficient to bind the state space
  • 28. Designer UML Model A B C Domain Bounds X = [1,20], Y = [2, 15], ... Experimental set-up KodKod Model Finder Sat4j SAT Solver UML-based Specification Environment (USE)
  • 29. Designer Domain Bounds X = [1,20], Y = [2, 15], ... UML Model A B C Bound refinement Experimental set-up KodKod Model Finder Sat4j SAT Solver Bound refinement UML-based Specification Environment (USE)
  • 30. Experimental results: Summary (1/2) Lightly constrained (“Easy”) Satisfiable Unsatisfiable – Seconds Seconds (“Easy”) Highly constrained (“Hard”) Difficulty +– + Minutes Hours
  • 31. Experimental results: Summary (1/2) Lightly constrained (“Easy”) Satisfiable Unsatisfiable No improvement No improvement (“Easy”) Highly constrained (“Hard”) Speed-ups from 1,7x to 11x Speed-ups from 2x to 50x Overhead of bound tightening: <1 second
  • 32. Conclusions… in 140 chars Quick preprocessing to make SAT-based verification faster and more usable Target: UML/OCL Up to 50x speed-up TODO: further experiments Tweet0
  • 33. Thank you for your attention! Robert Clarisó rclariso@uoc.edu @robertclariso