on the verification of uml/ocl class diagrams using constraint programming
TRANSCRIPT
![Page 1: On the verification of UML/OCL class diagrams using constraint programming](https://reader033.vdocuments.mx/reader033/viewer/2022042602/55a6815d1a28ab752a8b467b/html5/thumbnails/1.jpg)
On the verification of UML/OCL
class diagrams using constraint
programming
Jordi Cabot ([email protected])
Robert Clarisó ([email protected])
Daniel Riera ([email protected])
1
On the verification of UML/OCL class diagrams using constraint programming
![Page 2: On the verification of UML/OCL class diagrams using constraint programming](https://reader033.vdocuments.mx/reader033/viewer/2022042602/55a6815d1a28ab752a8b467b/html5/thumbnails/2.jpg)
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
![Page 3: On the verification of UML/OCL class diagrams using constraint programming](https://reader033.vdocuments.mx/reader033/viewer/2022042602/55a6815d1a28ab752a8b467b/html5/thumbnails/3.jpg)
1. The context: Models in SW Engineering
3
![Page 4: On the verification of UML/OCL class diagrams using constraint programming](https://reader033.vdocuments.mx/reader033/viewer/2022042602/55a6815d1a28ab752a8b467b/html5/thumbnails/4.jpg)
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”
![Page 5: On the verification of UML/OCL class diagrams using constraint programming](https://reader033.vdocuments.mx/reader033/viewer/2022042602/55a6815d1a28ab752a8b467b/html5/thumbnails/5.jpg)
Software models: perspectives
5
Information base
(UML class diagram) Variability among products
(Feature model)
Behavior and data flow
(UML activity diagram)
![Page 6: On the verification of UML/OCL class diagrams using constraint programming](https://reader033.vdocuments.mx/reader033/viewer/2022042602/55a6815d1a28ab752a8b467b/html5/thumbnails/6.jpg)
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
![Page 7: On the verification of UML/OCL class diagrams using constraint programming](https://reader033.vdocuments.mx/reader033/viewer/2022042602/55a6815d1a28ab752a8b467b/html5/thumbnails/7.jpg)
2. The problem: Quality assurance
7
![Page 8: On the verification of UML/OCL class diagrams using constraint programming](https://reader033.vdocuments.mx/reader033/viewer/2022042602/55a6815d1a28ab752a8b467b/html5/thumbnails/8.jpg)
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
![Page 9: On the verification of UML/OCL class diagrams using constraint programming](https://reader033.vdocuments.mx/reader033/viewer/2022042602/55a6815d1a28ab752a8b467b/html5/thumbnails/9.jpg)
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
![Page 10: On the verification of UML/OCL class diagrams using constraint programming](https://reader033.vdocuments.mx/reader033/viewer/2022042602/55a6815d1a28ab752a8b467b/html5/thumbnails/10.jpg)
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
![Page 11: On the verification of UML/OCL class diagrams using constraint programming](https://reader033.vdocuments.mx/reader033/viewer/2022042602/55a6815d1a28ab752a8b467b/html5/thumbnails/11.jpg)
3. Our proposal: Constraint programming
11
![Page 12: On the verification of UML/OCL class diagrams using constraint programming](https://reader033.vdocuments.mx/reader033/viewer/2022042602/55a6815d1a28ab752a8b467b/html5/thumbnails/12.jpg)
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
![Page 13: On the verification of UML/OCL class diagrams using constraint programming](https://reader033.vdocuments.mx/reader033/viewer/2022042602/55a6815d1a28ab752a8b467b/html5/thumbnails/13.jpg)
Our proposal: UMLtoCSP
UMLtoCSP
?
Model
A B
C
Correctness
Property
Finite
Bounds
Designer
Formal Notation
CSP
Feedback
Example or ?
Counterexample or ?
Reasoning Engine
13
![Page 14: On the verification of UML/OCL class diagrams using constraint programming](https://reader033.vdocuments.mx/reader033/viewer/2022042602/55a6815d1a28ab752a8b467b/html5/thumbnails/14.jpg)
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
![Page 15: On the verification of UML/OCL class diagrams using constraint programming](https://reader033.vdocuments.mx/reader033/viewer/2022042602/55a6815d1a28ab752a8b467b/html5/thumbnails/15.jpg)
Thanks for your attention!
Further details
http://gres.uoc.edu/UMLtoCSP UMLtoCSP homepage
Full paper
Contact Robert Clarisó ([email protected])
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