31.01.2014 Views

USE: UML-based Specification Environment - Environment for ...

USE: UML-based Specification Environment - Environment for ...

USE: UML-based Specification Environment - Environment for ...

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Introduction Case Study (1) Case Study (2) Conclusion<br />

<strong>USE</strong>: <strong>UML</strong>-<strong>based</strong> <strong>Specification</strong> <strong>Environment</strong><br />

<strong>Environment</strong> <strong>for</strong> Validating <strong>UML</strong> and OCL<br />

Mirco Kuhlmann<br />

Database Systems Group<br />

Department <strong>for</strong> Mathematics and Computer Science<br />

Bremen University<br />

July 10, 2007<br />

Mirco Kuhlmann<br />

<strong>USE</strong>: <strong>UML</strong>-<strong>based</strong> <strong>Specification</strong> <strong>Environment</strong>


Introduction Case Study (1) Case Study (2) Conclusion<br />

Contents<br />

Outline of the <strong>USE</strong> System<br />

<strong>Specification</strong> of <strong>UML</strong> Models<br />

Model Validation<br />

Approaching the <strong>USE</strong> System by using a Case Study (1)<br />

Model Browser and Detail View<br />

Class Diagram<br />

Objects and OCL Queries<br />

Sequence Diagram<br />

Approaching the <strong>USE</strong> System by using a Case Study (2)<br />

Object Diagram, Evaluation of Invariants and the <strong>USE</strong> Log<br />

Evaluation Browser<br />

Snapshot Generator<br />

Conclusion<br />

Mirco Kuhlmann<br />

<strong>USE</strong>: <strong>UML</strong>-<strong>based</strong> <strong>Specification</strong> <strong>Environment</strong>


Introduction Case Study (1) Case Study (2) Conclusion <strong>Specification</strong> of <strong>UML</strong> Models Model Validation<br />

The <strong>USE</strong> Tool<br />

Basis:<br />

◮ <strong>UML</strong> & OCL<br />

◮ Class, Object, Sequence diagrams<br />

◮ Invariants<br />

◮ Pre- and Postconditions<br />

◮ Queries<br />

◮ Formal <strong>Specification</strong><br />

◮ Formale Semantics (Mark Richters)<br />

◮ Implementation<br />

◮<br />

◮<br />

Java<br />

OCL Metamodel<br />

Main Purpose:<br />

◮ Validation of <strong>UML</strong> Models<br />

◮ Model meets Requirements<br />

Mirco Kuhlmann<br />

<strong>USE</strong>: <strong>UML</strong>-<strong>based</strong> <strong>Specification</strong> <strong>Environment</strong>


Introduction Case Study (1) Case Study (2) Conclusion <strong>Specification</strong> of <strong>UML</strong> Models Model Validation<br />

Modelling an arbitrary System in <strong>UML</strong><br />

Mirco Kuhlmann<br />

<strong>USE</strong>: <strong>UML</strong>-<strong>based</strong> <strong>Specification</strong> <strong>Environment</strong>


Introduction Case Study (1) Case Study (2) Conclusion <strong>Specification</strong> of <strong>UML</strong> Models Model Validation<br />

Modelling an arbitrary System in <strong>UML</strong><br />

Mirco Kuhlmann<br />

<strong>USE</strong>: <strong>UML</strong>-<strong>based</strong> <strong>Specification</strong> <strong>Environment</strong>


Introduction Case Study (1) Case Study (2) Conclusion <strong>Specification</strong> of <strong>UML</strong> Models Model Validation<br />

Modelling an arbitrary System in <strong>UML</strong><br />

Mirco Kuhlmann<br />

<strong>USE</strong>: <strong>UML</strong>-<strong>based</strong> <strong>Specification</strong> <strong>Environment</strong>


Introduction Case Study (1) Case Study (2) Conclusion <strong>Specification</strong> of <strong>UML</strong> Models Model Validation<br />

Modelling an arbitrary System in <strong>UML</strong><br />

Mirco Kuhlmann<br />

<strong>USE</strong>: <strong>UML</strong>-<strong>based</strong> <strong>Specification</strong> <strong>Environment</strong>


Introduction Case Study (1) Case Study (2) Conclusion <strong>Specification</strong> of <strong>UML</strong> Models Model Validation<br />

Modelling an arbitrary System in <strong>UML</strong><br />

Mirco Kuhlmann<br />

<strong>USE</strong>: <strong>UML</strong>-<strong>based</strong> <strong>Specification</strong> <strong>Environment</strong>


Introduction Case Study (1) Case Study (2) Conclusion <strong>Specification</strong> of <strong>UML</strong> Models Model Validation<br />

Modelling an arbitrary System in <strong>UML</strong><br />

Mirco Kuhlmann<br />

<strong>USE</strong>: <strong>UML</strong>-<strong>based</strong> <strong>Specification</strong> <strong>Environment</strong>


Introduction Case Study (1) Case Study (2) Conclusion <strong>Specification</strong> of <strong>UML</strong> Models Model Validation<br />

Modelling an arbitrary System in <strong>UML</strong><br />

Mirco Kuhlmann<br />

<strong>USE</strong>: <strong>UML</strong>-<strong>based</strong> <strong>Specification</strong> <strong>Environment</strong>


Introduction Case Study (1) Case Study (2) Conclusion <strong>Specification</strong> of <strong>UML</strong> Models Model Validation<br />

Modelling an arbitrary System in <strong>UML</strong><br />

inv: self.boss.isDefined() implies<br />

self.boss.salary > self.salary<br />

Mirco Kuhlmann<br />

<strong>USE</strong>: <strong>UML</strong>-<strong>based</strong> <strong>Specification</strong> <strong>Environment</strong>


Introduction Case Study (1) Case Study (2) Conclusion <strong>Specification</strong> of <strong>UML</strong> Models Model Validation<br />

The <strong>USE</strong> Tool<br />

Basis:<br />

◮ <strong>UML</strong> & OCL<br />

◮ Class, Object, Sequence diagrams<br />

◮ Invariants<br />

◮ Pre- and Postconditions<br />

◮ Queries<br />

◮ Formal <strong>Specification</strong><br />

◮ Formale Semantics (Mark Richters)<br />

◮ Implementation<br />

◮<br />

◮<br />

Java<br />

OCL Metamodel<br />

Main Purpose:<br />

◮ Validation of <strong>UML</strong> Models<br />

◮ Model meets Requirements<br />

Mirco Kuhlmann<br />

<strong>USE</strong>: <strong>UML</strong>-<strong>based</strong> <strong>Specification</strong> <strong>Environment</strong>


Introduction Case Study (1) Case Study (2) Conclusion <strong>Specification</strong> of <strong>UML</strong> Models Model Validation<br />

<strong>USE</strong> <strong>Specification</strong><br />

◮ Class diagrams with OCL Constraints<br />

◮ Structure<br />

◮ (Association-)Classes, Enumerations<br />

◮ Attributes<br />

◮ Associations<br />

◮ Invariants<br />

◮ Behavior<br />

◮ Operations<br />

◮ Pre- and Postconditions<br />

Mirco Kuhlmann<br />

<strong>USE</strong>: <strong>UML</strong>-<strong>based</strong> <strong>Specification</strong> <strong>Environment</strong>


Introduction Case Study (1) Case Study (2) Conclusion <strong>Specification</strong> of <strong>UML</strong> Models Model Validation<br />

Snapshots: Inspecting the System States<br />

Evaluation of a System State<br />

◮ Examination of the Object Diagram<br />

◮<br />

◮<br />

Invariants<br />

<strong>UML</strong> Constraints<br />

Animating the Model<br />

◮ Examination of State Changes<br />

◮ Operation Calls<br />

◮ Pre- and Postconditions<br />

Revising Design Decisions<br />

◮ Tightening<br />

◮ Weakening<br />

Mirco Kuhlmann<br />

<strong>USE</strong>: <strong>UML</strong>-<strong>based</strong> <strong>Specification</strong> <strong>Environment</strong>


Introduction Case Study (1) Case Study (2) Conclusion Browser Class Diag. Objects & Queries Sequence Diag.<br />

Mirco Kuhlmann<br />

<strong>USE</strong>: <strong>UML</strong>-<strong>based</strong> <strong>Specification</strong> <strong>Environment</strong>


Introduction Case Study (1) Case Study (2) Conclusion Browser Class Diag. Objects & Queries Sequence Diag.<br />

model CivilStatusWorld<br />

enum CivilStatus {single, married,<br />

divorced, widowed}<br />

enum Gender {female, male}<br />

class Person<br />

attributes<br />

name:String<br />

civstat:CivilStatus<br />

gender:Gender<br />

alive:Boolean<br />

operations<br />

birth(aName:String,<br />

aGender:Gender)<br />

pre freshUnlinkedPerson: ...<br />

...<br />

post nameAssigned: ...<br />

...<br />

Mirco Kuhlmann<br />

<strong>USE</strong>: <strong>UML</strong>-<strong>based</strong> <strong>Specification</strong> <strong>Environment</strong>


Introduction Case Study (1) Case Study (2) Conclusion Browser Class Diag. Objects & Queries Sequence Diag.<br />

spouse() : Person =<br />

if gender = #female then husband<br />

else wife endif<br />

constraints<br />

inv attributesDefined: ...<br />

...<br />

end<br />

association Marriage between<br />

Person [0..1] role wife<br />

Person [0..1] role husband<br />

end<br />

Mirco Kuhlmann<br />

<strong>USE</strong>: <strong>UML</strong>-<strong>based</strong> <strong>Specification</strong> <strong>Environment</strong>


Introduction Case Study (1) Case Study (2) Conclusion Browser Class Diag. Objects & Queries Sequence Diag.<br />

Mirco Kuhlmann<br />

<strong>USE</strong>: <strong>UML</strong>-<strong>based</strong> <strong>Specification</strong> <strong>Environment</strong>


Introduction Case Study (1) Case Study (2) Conclusion Browser Class Diag. Objects & Queries Sequence Diag.<br />

Mirco Kuhlmann<br />

<strong>USE</strong>: <strong>UML</strong>-<strong>based</strong> <strong>Specification</strong> <strong>Environment</strong>


Introduction Case Study (1) Case Study (2) Conclusion Browser Class Diag. Objects & Queries Sequence Diag.<br />

Mirco Kuhlmann<br />

<strong>USE</strong>: <strong>UML</strong>-<strong>based</strong> <strong>Specification</strong> <strong>Environment</strong>


Introduction Case Study (1) Case Study (2) Conclusion Browser Class Diag. Objects & Queries Sequence Diag.<br />

Mirco Kuhlmann<br />

<strong>USE</strong>: <strong>UML</strong>-<strong>based</strong> <strong>Specification</strong> <strong>Environment</strong>


Introduction Case Study (1) Case Study (2) Conclusion Browser Class Diag. Objects & Queries Sequence Diag.<br />

Mirco Kuhlmann<br />

<strong>USE</strong>: <strong>UML</strong>-<strong>based</strong> <strong>Specification</strong> <strong>Environment</strong>


Introduction Case Study (1) Case Study (2) Conclusion Browser Class Diag. Objects & Queries Sequence Diag.<br />

Mirco Kuhlmann<br />

<strong>USE</strong>: <strong>UML</strong>-<strong>based</strong> <strong>Specification</strong> <strong>Environment</strong>


Introduction Case Study (1) Case Study (2) Conclusion Browser Class Diag. Objects & Queries Sequence Diag.<br />

!create ada:Person<br />

!set ada.name:=’Ada’<br />

!set ada.civstat:=#single<br />

!set ada.gender:=#female<br />

!set ada.alive:=true<br />

!create ada:Person<br />

!openter ada birth(’Ada’,#female)<br />

read Person_birth.cmd<br />

!opexit<br />

!openter ada birth(’Ada’,#female)<br />

gen start civstat.assl<br />

Person_birth(ada,’Ada’,#female)<br />

gen result<br />

gen result accept<br />

!opexit<br />

Mirco Kuhlmann<br />

<strong>USE</strong>: <strong>UML</strong>-<strong>based</strong> <strong>Specification</strong> <strong>Environment</strong>


Introduction Case Study (1) Case Study (2) Conclusion Browser Class Diag. Objects & Queries Sequence Diag.<br />

!create ada:Person<br />

!set ada.name:=’Ada’<br />

!set ada.civstat:=#single<br />

!set ada.gender:=#female<br />

!set ada.alive:=true<br />

!create ada:Person<br />

!openter ada birth(’Ada’,#female)<br />

read Person_birth.cmd<br />

!opexit<br />

!openter ada birth(’Ada’,#female)<br />

gen start civstat.assl<br />

Person_birth(ada,’Ada’,#female)<br />

gen result<br />

gen result accept<br />

!opexit<br />

Mirco Kuhlmann<br />

<strong>USE</strong>: <strong>UML</strong>-<strong>based</strong> <strong>Specification</strong> <strong>Environment</strong>


Introduction Case Study (1) Case Study (2) Conclusion Browser Class Diag. Objects & Queries Sequence Diag.<br />

!create ada:Person<br />

!set ada.name:=’Ada’<br />

!set ada.civstat:=#single<br />

!set ada.gender:=#female<br />

!set ada.alive:=true<br />

!create ada:Person<br />

!openter ada birth(’Ada’,#female)<br />

read Person_birth.cmd<br />

!opexit<br />

!openter ada birth(’Ada’,#female)<br />

gen start civstat.assl<br />

Person_birth(ada,’Ada’,#female)<br />

gen result<br />

gen result accept<br />

!opexit<br />

Mirco Kuhlmann<br />

<strong>USE</strong>: <strong>UML</strong>-<strong>based</strong> <strong>Specification</strong> <strong>Environment</strong>


Introduction Case Study (1) Case Study (2) Conclusion Browser Class Diag. Objects & Queries Sequence Diag.<br />

!create ada:Person<br />

!set ada.name:=’Ada’<br />

!set ada.civstat:=#single<br />

!set ada.gender:=#female<br />

!set ada.alive:=true<br />

!create ada:Person<br />

!openter ada birth(’Ada’,#female)<br />

read Person_birth.cmd<br />

!opexit<br />

!openter ada birth(’Ada’,#female)<br />

gen start civstat.assl<br />

Person_birth(ada,’Ada’,#female)<br />

gen result<br />

gen result accept<br />

!opexit<br />

Mirco Kuhlmann<br />

<strong>USE</strong>: <strong>UML</strong>-<strong>based</strong> <strong>Specification</strong> <strong>Environment</strong>


Introduction Case Study (1) Case Study (2) Conclusion Browser Class Diag. Objects & Queries Sequence Diag.<br />

Mirco Kuhlmann<br />

<strong>USE</strong>: <strong>UML</strong>-<strong>based</strong> <strong>Specification</strong> <strong>Environment</strong>


Introduction Case Study (1) Case Study (2) Conclusion Browser Class Diag. Objects & Queries Sequence Diag.<br />

Mirco Kuhlmann<br />

<strong>USE</strong>: <strong>UML</strong>-<strong>based</strong> <strong>Specification</strong> <strong>Environment</strong>


Introduction Case Study (1) Case Study (2) Conclusion Object Diag. Inv. Evaluation <strong>USE</strong>-Log Eval. Browser ASSL<br />

Mirco Kuhlmann<br />

<strong>USE</strong>: <strong>UML</strong>-<strong>based</strong> <strong>Specification</strong> <strong>Environment</strong>


Introduction Case Study (1) Case Study (2) Conclusion Object Diag. Inv. Evaluation <strong>USE</strong>-Log Eval. Browser ASSL<br />

Mirco Kuhlmann<br />

<strong>USE</strong>: <strong>UML</strong>-<strong>based</strong> <strong>Specification</strong> <strong>Environment</strong>


Introduction Case Study (1) Case Study (2) Conclusion Object Diag. Inv. Evaluation <strong>USE</strong>-Log Eval. Browser ASSL<br />

Mirco Kuhlmann<br />

<strong>USE</strong>: <strong>UML</strong>-<strong>based</strong> <strong>Specification</strong> <strong>Environment</strong>


Introduction Case Study (1) Case Study (2) Conclusion Object Diag. Inv. Evaluation <strong>USE</strong>-Log Eval. Browser ASSL<br />

gen flags Person::attributesDefined +d<br />

...<br />

gen start -s -r 2115 civstat.assl crowd(3,4,2)<br />

gen result<br />

gen result accept<br />

Mirco Kuhlmann<br />

<strong>USE</strong>: <strong>UML</strong>-<strong>based</strong> <strong>Specification</strong> <strong>Environment</strong>


Introduction Case Study (1) Case Study (2) Conclusion Object Diag. Inv. Evaluation <strong>USE</strong>-Log Eval. Browser ASSL<br />

Mirco Kuhlmann<br />

<strong>USE</strong>: <strong>UML</strong>-<strong>based</strong> <strong>Specification</strong> <strong>Environment</strong>


Introduction Case Study (1) Case Study (2) Conclusion<br />

Handling <strong>for</strong>mal Properties<br />

◮ Consistency<br />

◮ Independence<br />

◮ Implication<br />

Mirco Kuhlmann<br />

<strong>USE</strong>: <strong>UML</strong>-<strong>based</strong> <strong>Specification</strong> <strong>Environment</strong>


Introduction Case Study (1) Case Study (2) Conclusion<br />

Handling <strong>for</strong>mal Properties<br />

◮ Consistency<br />

◮ Independence<br />

◮ Implication<br />

context Person inv bigamy:<br />

wife.isDefined and husband.isDefined<br />

gen load bigamy.invs<br />

Added invariants: Person::bigamy<br />

gen start civstat.assl attemptBigamy()<br />

gen result<br />

Random number generator was initialized<br />

with 5649.<br />

Checked 663552 snapshots.<br />

Result: No valid state found.<br />

Mirco Kuhlmann<br />

<strong>USE</strong>: <strong>UML</strong>-<strong>based</strong> <strong>Specification</strong> <strong>Environment</strong>


Introduction Case Study (1) Case Study (2) Conclusion<br />

Future Work<br />

◮ Communication Diagrams<br />

◮ Object Diagram<br />

◮ Formal Proofs (HOL-OCL)<br />

Mirco Kuhlmann<br />

<strong>USE</strong>: <strong>UML</strong>-<strong>based</strong> <strong>Specification</strong> <strong>Environment</strong>


Introduction Case Study (1) Case Study (2) Conclusion<br />

Thank you <strong>for</strong> your attention!<br />

Mirco Kuhlmann<br />

<strong>USE</strong>: <strong>UML</strong>-<strong>based</strong> <strong>Specification</strong> <strong>Environment</strong>

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!