Post on 15-Jul-2015
transcript
On the verification of UML/OCL
class diagrams using constraint
programming
Jordi Cabot (jordi.cabot@inria.fr)
Robert Clarisó (rclariso@uoc.edu)
Daniel Riera (drierat@uoc.edu)
1
On the verification of UML/OCL class diagrams using constraint programming
1. The context: Model-driven software engineering
2. The problem: Quality assurance using formal methods
3. Our proposal: Verification using constraint programming
Index
2
On the verification of UML/OCL class diagrams using constraint programming
1. The context: Models in SW Engineering
3
Modeling in engineering
4
Features that are not
relevant to the purpose of
the model are excluded
Benefits
• Simplicity
• Understandability
• Reusability
“A model is a description or
specification of a system
defined for a specific purpose”
Software models: perspectives
5
Information base
(UML class diagram) Variability among products
(Feature model)
Behavior and data flow
(UML activity diagram)
Documentation and communication
“Describe how the system will work”
Reverse engineering
“Guide the implementation”
Code generation
Simulation
Verification and validation
“Analyze if the model is correct”
Domain-Specific Languages
Software models: applications
6
2. The problem: Quality assurance
7
Defects in software models
Complete
Includes all relevant info
Precise
Describes system accurately
Suitable
Useful to stakeholders
Validation
“Is it the right product?”
Verification
“Is the product right?”
Well-formed
Correct syntax
Consistent
No contradictions
Non-redundant
Lack of duplicities
B A
A
1
2
A B
C
8
Model-based formal verification
VERIFICATION TOOL
?
Model
A B
C
Correctness
Property
Additional
Parameters
Designer
Formal Notation
x:y: p(x,y)
Feedback
Yes / No
Formal proof
Example / Counterexample
Reasoning Engine
9
Trade-offs in verification
Verification
Automation
Is user intervention required?
Efficiency
Required memory and CPU
Expressiveness
Type of supported properties
OCL invariants?
Precision / coverage
Undetected errors?
False alarms?
10
3. Our proposal: Constraint programming
11
Constraint Satisfaction Problems
12
Variables
Domains
that should have a value
Define a problem declaratively in terms of...
Constraints
set of potential values
restrictions on the legal values
Then, let a solver find the solution (if any).
Example: N-Queens Problem
Our proposal: UMLtoCSP
UMLtoCSP
?
Model
A B
C
Correctness
Property
Finite
Bounds
Designer
Formal Notation
CSP
Feedback
Example or ?
Counterexample or ?
Reasoning Engine
13
2. The designer needs to select suitable bounds
– Small enough to allow efficient analysis
– Large enough to provide confidence in the result
1. Answer may be inconclusive
– There may be no (counter)example within the bounds
– No assurance of what happens outside the bounds
Cons
Pros 1. Automatic analysis of expressive models (including OCL)
2. Efficient solvers available
– Execution time can be controled by tuning bounds
3. Useful feedback (when it is available)
14
Strengths and weaknesses
Thanks for your attention!
Further details
http://gres.uoc.edu/UMLtoCSP UMLtoCSP homepage
Full paper
Contact Robert Clarisó (rclariso@uoc.edu)
Jordi Cabot, Robert Clarisó, Daniel Riera.
On the verification of UML/OCL class diagrams
using constraint programming.
Journal of Systems and Software 93: 1-23 (2014)
Acknowledgements
EIMT.UOC.EDU GRES-UOC @ IN3
GMC @ UPC
15