verifying action semantics specifications in uml behavioral models (caise 2009)

49
The 21st International Conference on Advanced Information Systems CAiSE’09 12nd June 2009 Amsterdam Verifying Action Semantics Specificati in UML Behavioral Models Elena Planas 1 Jordi Cabot 1 Cristina Gómez 2 1 Open University of Catalonia 2 Technical University of Catalonia

Upload: elena-planas

Post on 16-Apr-2017

401 views

Category:

Technology


0 download

TRANSCRIPT

Page 1: Verifying Action Semantics Specifications in UML Behavioral Models (CAiSE 2009)

The 21st International Conference onAdvanced Information Systems

CAiSE’0912nd June 2009 Amsterdam

Verifying Action Semantics Specifications in UML Behavioral Models

Elena Planas 1

Jordi Cabot 1

Cristina Gómez 2

1 Open University of Catalonia2 Technical University of Catalonia

Page 2: Verifying Action Semantics Specifications in UML Behavioral Models (CAiSE 2009)

Verifying Action Semantics Specifications in UML Behavioral Models

• Introduction

• Our method

• Related Work

• Conclusions and Further Work

Index

1CAiSE’09 – 8-12 June 2009, Amsterdam

Page 3: Verifying Action Semantics Specifications in UML Behavioral Models (CAiSE 2009)

IntroductionIntroductionOur method

Related WorkConclusions

> ContextContext> Motivation> Goal

specification design implementation testing

Life cycle of software systems

CodeModel Driven

Development

before

UML Model

Structural model

Behavioral model

now

our work

Verifying Action Semantics Specifications in UML Behavioral Models 2CAiSE’09 – 8-12 June 2009, Amsterdam

Page 4: Verifying Action Semantics Specifications in UML Behavioral Models (CAiSE 2009)

IntroductionIntroductionOur method

Related WorkConclusions

> Context> MotivationMotivation> Goal

Example

Person

name : String email : String

Department

name : String

WorksIn1*

context Person::addPerson addPerson (n:String, e:String) { p: Person; p := CreateObject(Person); AddStructuralFeature(p,name,n); AddStructuralFeature(p,email,e);}

context Person::changeAddresschangeAddress(a:String) { AddStructuralFeature(self,address,a);}

Verifying Action Semantics Specifications in UML Behavioral Models 3CAiSE’09 – 8-12 June 2009, Amsterdam

Page 5: Verifying Action Semantics Specifications in UML Behavioral Models (CAiSE 2009)

IntroductionIntroductionOur method

Related WorkConclusions

> Context> MotivationMotivation> Goal

Example

Person

name : String email : String

Department

name : String

WorksIn1*

context Person::addPerson addPerson (n:String, e:String) { p: Person; p := CreateObject(Person); AddStructuralFeature(p,name,n); AddStructuralFeature(p,email,e);}

context Person::changeAddresschangeAddress(a:String) { AddStructuralFeature(self,address,a);}

NOT SYNTACTICALLY CORRECT

Verifying Action Semantics Specifications in UML Behavioral Models 3CAiSE’09 – 8-12 June 2009, Amsterdam

Page 6: Verifying Action Semantics Specifications in UML Behavioral Models (CAiSE 2009)

IntroductionIntroductionOur method

Related WorkConclusions

> Context> MotivationMotivation> Goal

Example

Person

name : String email : String

Department

name : String

WorksIn1*

context Person::changeAddresschangeAddress(a:String) { AddStructuralFeature(self,address,a);}

context Person::addPerson addPerson (n:String, e:String) { p: Person; p := CreateObject(Person); AddStructuralFeature(p,name,n); AddStructuralFeature(p,email,e);}

NOT EXECUTABLE

Verifying Action Semantics Specifications in UML Behavioral Models 3CAiSE’09 – 8-12 June 2009, Amsterdam

Page 7: Verifying Action Semantics Specifications in UML Behavioral Models (CAiSE 2009)

IntroductionIntroductionOur method

Related WorkConclusions

> Context> MotivationMotivation> Goal

Example

Person

name : String email : String

Department

name : String

WorksIn1*

NOT COMPLETE

context Person::addPerson addPerson (n:String, e:String) { p: Person; p := CreateObject(Person); AddStructuralFeature(p,name,n); AddStructuralFeature(p,email,e);}

context Person::changeAddresschangeAddress(a:String) { AddStructuralFeature(self,address,a);}

Verifying Action Semantics Specifications in UML Behavioral Models 3CAiSE’09 – 8-12 June 2009, Amsterdam

Page 8: Verifying Action Semantics Specifications in UML Behavioral Models (CAiSE 2009)

IntroductionIntroductionOur method

Related WorkConclusions

> Context> Motivation> GoalGoal

Provide a set of lightweight techniques for the verification of correctness properties of Action Semantics specifications at design time

Goal

Verifying Action Semantics Specifications in UML Behavioral Models 4CAiSE’09 – 8-12 June 2009, Amsterdam

specification design implementation testing

Syntactic Correctness

Completenessinput

OUR METHOD feedback

WeakExecutabilityUML Model

Execution Paths

Page 9: Verifying Action Semantics Specifications in UML Behavioral Models (CAiSE 2009)

IntroductionOur methodOur methodRelated Work

Conclusions

> OverviewOverview> Input> Properties

Characterisitics:

- Focused on imperative operations

- Performs a static analysis (do not require simulation)

Our method

Verifying Action Semantics Specifications in UML Behavioral Models 5CAiSE’09 – 8-12 June 2009, Amsterdam

Syntactic Correctness

Completenessinput

OUR METHOD feedback

WeakExecutabilityUML Model

Execution Paths

Page 10: Verifying Action Semantics Specifications in UML Behavioral Models (CAiSE 2009)

IntroductionOur methodOur methodRelated Work

Conclusions

> Overview> InputInput> Properties

Input

Verifying Action Semantics Specifications in UML Behavioral Models 6CAiSE’09 – 8-12 June 2009, Amsterdam

Syntactic Correctness

Completenessinput

OUR METHOD feedback

WeakExecutabilityUML Model

Execution Paths

Page 11: Verifying Action Semantics Specifications in UML Behavioral Models (CAiSE 2009)

IntroductionOur methodOur methodRelated Work

Conclusions

> Overview> InputInput> Properties

Class DiagramClass Diagram

*

Operation

UML Action

OperationsOperations

Input

subset of UML Actionssubset of UML Actions CreateObject DestroyObject AddStructuralFeature CreateLink DestroyLink ReclassifyObject CallOperation

UML Structured ActionsUML Structured Actions if… then… else… endif while... do… endwhile do… while… enddo

Action SemanticsAction = fundamental unit of behavior specification

Basis for defining the behavior in a fine granularity

Verifying Action Semantics Specifications in UML Behavioral Models 7CAiSE’09 – 8-12 June 2009, Amsterdam

Page 12: Verifying Action Semantics Specifications in UML Behavioral Models (CAiSE 2009)

IntroductionOur methodOur methodRelated Work

Conclusions

> Overview> InputInput> Properties

Action Semantics Example

context Paper::endOfReviewendOfReview(com:String,d:Date, evaluation:String) { if self.oclIsTypeOf(UnderReview) then if evaluation = ’reject’ then ReclassifyObject(self,[Rejected],[ ]); AddStructuralFeature(self,comments,com); else ReclassifyObject(self,[Accepted],[ ]); AddStructuralFeature(self,accepDate,d); endif endif }

context Person::dismissdismiss() { DestroyLink(WorksIn, person, self, department, self.department);}

Verifying Action Semantics Specifications in UML Behavioral Models 8CAiSE’09 – 8-12 June 2009, Amsterdam

Person name : String { readOnly } email : String

Paper title : String

Rejected comments : String

Accepted accepDate : Date

Under Review

IsAuthorOf author

1..* *

WorksIn 1 * {disjoint,complete}

Department name : String

Page 13: Verifying Action Semantics Specifications in UML Behavioral Models (CAiSE 2009)

IntroductionOur methodOur methodRelated Work

Conclusions

> Overview> Input> PropertiesProperties

Correctness Properties

Verifying Action Semantics Specifications in UML Behavioral Models 9CAiSE’09 – 8-12 June 2009, Amsterdam

Syntactic Correctness

Completenessinput

OUR METHOD feedback

WeakExecutabilityUML Model

Execution Paths

Page 14: Verifying Action Semantics Specifications in UML Behavioral Models (CAiSE 2009)

IntroductionOur methodOur methodRelated Work

Conclusions

> Overview> Input> Properties: Syntactic CorrectnessProperties: Syntactic Correctness

Syntactic Correctness

Verifying Action Semantics Specifications in UML Behavioral Models 10CAiSE’09 – 8-12 June 2009, Amsterdam

Syntactic Correctness

Completenessinput

OUR METHOD feedback

WeakExecutabilityUML Model

Execution Paths

Page 15: Verifying Action Semantics Specifications in UML Behavioral Models (CAiSE 2009)

IntroductionOur methodOur methodRelated Work

Conclusions

> Overview> Input> Properties: Syntactic CorrectnessProperties: Syntactic Correctness

An operation is syntactically correct when all the actions included in its specification satisfy the WFR.

Syntactic Correctness

WFR (Well Formedness Rule) = Constraint that restrict the possible set of valid UML models.

Verifying Action Semantics Specifications in UML Behavioral Models 11CAiSE’09 – 8-12 June 2009, Amsterdam

Page 16: Verifying Action Semantics Specifications in UML Behavioral Models (CAiSE 2009)

IntroductionOur methodOur methodRelated Work

Conclusions

> Overview> Input> Properties: Syntactic CorrectnessProperties: Syntactic Correctness

New WFR proposed

context WriteStructuralFeatureAction inv: self.value.type = self.structuralFeature.type

…r := CreateObject(Rejected);

WriteStructuralFeature(r,name,17);WriteStructuralFeature(r,name,”Peter”);

Person

name : String email : String

Department

name : String

WorksIn1*

Verifying Action Semantics Specifications in UML Behavioral Models 12CAiSE’09 – 8-12 June 2009, Amsterdam

Page 17: Verifying Action Semantics Specifications in UML Behavioral Models (CAiSE 2009)

IntroductionOur methodOur methodRelated Work

Conclusions

> Overview> Input> PropertiesProperties

Execution Paths

Computing the execution paths is necessary to check the next correctness properties (executability and completeness).

Verifying Action Semantics Specifications in UML Behavioral Models 13CAiSE’09 – 8-12 June 2009, Amsterdam

Syntactic Correctness

Completenessinput

OUR METHOD feedback

WeakExecutabilityUML Model

Execution Paths

Page 18: Verifying Action Semantics Specifications in UML Behavioral Models (CAiSE 2009)

IntroductionOur methodOur methodRelated Work

Conclusions

> Overview> Input> PropertiesProperties

Execution Paths

An execution path is a sequence of actions that may be followed during an operation execution.

In general, an operation have several execution paths (one for each conditional or loop case).

Verifying Action Semantics Specifications in UML Behavioral Models 14CAiSE’09 – 8-12 June 2009, Amsterdam

Page 19: Verifying Action Semantics Specifications in UML Behavioral Models (CAiSE 2009)

IntroductionOur methodOur methodRelated Work

Conclusions

> Overview> Input> PropertiesProperties

Execution Paths: endOfReview operationcontext Paper::endOfReviewendOfReview(com:String,d:Date, evaluation:String) { if self.oclIsTypeOf(UnderReview) then if evaluation = ’reject’ then ReclassifyObject(self,[Rejected],[ ]); AddStructuralFeature(self,comments,com); else ReclassifyObject(self,[Accepted],[ ]); AddStructuralFeature(self,accepDate,d); endif endif }

Verifying Action Semantics Specifications in UML Behavioral Models 15CAiSE’09 – 8-12 June 2009, Amsterdam

Page 20: Verifying Action Semantics Specifications in UML Behavioral Models (CAiSE 2009)

IntroductionOur methodOur methodRelated Work

Conclusions

> Overview> Input> PropertiesProperties

Execution Paths: endOfReview operation

ReclassifyObject(self,[Rejected],[ ])

ReclassifyObject(self,[Accepted],[ ])

AddStructuralFeature(self,comments,com)

AddStructuralFeature(self,accepDate,d)

context Paper::endOfReviewendOfReview(com:String,d:Date, evaluation:String) { if self.oclIsTypeOf(UnderReview) then if evaluation = ’reject’ then ReclassifyObject(self,[Rejected],[ ]); AddStructuralFeature(self,comments,com); else ReclassifyObject(self,[Accepted],[ ]); AddStructuralFeature(self,accepDate,d); endif endif }

Action

Vertex

Verifying Action Semantics Specifications in UML Behavioral Models 15CAiSE’09 – 8-12 June 2009, Amsterdam

Page 21: Verifying Action Semantics Specifications in UML Behavioral Models (CAiSE 2009)

IntroductionOur methodOur methodRelated Work

Conclusions

> Overview> Input> PropertiesProperties

Execution Paths: endOfReview operation

if

ReclassifyObject(self,[Rejected],[ ])

ReclassifyObject(self,[Accepted],[ ])

AddStructuralFeature(self,comments,com)

AddStructuralFeature(self,accepDate,d)

if

context Paper::endOfReviewendOfReview(com:String,d:Date, evaluation:String) { if self.oclIsTypeOf(UnderReview) then if evaluation = ’reject’ then ReclassifyObject(self,[Rejected],[ ]); AddStructuralFeature(self,comments,com); else ReclassifyObject(self,[Accepted],[ ]); AddStructuralFeature(self,accepDate,d); endif endif }

Conditional node

Branch

Verifying Action Semantics Specifications in UML Behavioral Models 15CAiSE’09 – 8-12 June 2009, Amsterdam

Page 22: Verifying Action Semantics Specifications in UML Behavioral Models (CAiSE 2009)

IntroductionOur methodOur methodRelated Work

Conclusions

> Overview> Input> PropertiesProperties

Execution Paths: endOfReview operation

if

ReclassifyObject(self,[Rejected],[ ])

ReclassifyObject(self,[Accepted],[ ])

AddStructuralFeature(self,comments,com)

AddStructuralFeature(self,accepDate,d)

if

context Paper::endOfReviewendOfReview(com:String,d:Date, evaluation:String) { if self.oclIsTypeOf(UnderReview) then if evaluation = ’reject’ then ReclassifyObject(self,[Rejected],[ ]); AddStructuralFeature(self,comments,com); else ReclassifyObject(self,[Accepted],[ ]); AddStructuralFeature(self,accepDate,d); endif endif }

Ordered sequence of actions

Arc

Verifying Action Semantics Specifications in UML Behavioral Models 15CAiSE’09 – 8-12 June 2009, Amsterdam

Page 23: Verifying Action Semantics Specifications in UML Behavioral Models (CAiSE 2009)

IntroductionOur methodOur methodRelated Work

Conclusions

> Overview> Input> PropertiesProperties

Execution Paths: endOfReview operation

if

ReclassifyObject(self,[Rejected],[ ])

ReclassifyObject(self,[Accepted],[ ])

AddStructuralFeature(self,comments,com)

AddStructuralFeature(self,accepDate,d)

if

context Paper::endOfReviewendOfReview(com:String,d:Date, evaluation:String) { if self.oclIsTypeOf(UnderReview) then if evaluation = ’reject’ then ReclassifyObject(self,[Rejected],[ ]); AddStructuralFeature(self,comments,com); else ReclassifyObject(self,[Accepted],[ ]); AddStructuralFeature(self,accepDate,d); endif endif }

Initial Node

Final Node

Verifying Action Semantics Specifications in UML Behavioral Models 15CAiSE’09 – 8-12 June 2009, Amsterdam

Page 24: Verifying Action Semantics Specifications in UML Behavioral Models (CAiSE 2009)

IntroductionOur methodOur methodRelated Work

Conclusions

> Overview> Input> PropertiesProperties

Execution Paths: endOfReview operation

if

ReclassifyObject(self,[Rejected],[ ])

ReclassifyObject(self,[Accepted],[ ])

AddStructuralFeature(self,comments,com)

AddStructuralFeature(self,accepDate,d)

if

p1 = { }

Verifying Action Semantics Specifications in UML Behavioral Models 15CAiSE’09 – 8-12 June 2009, Amsterdam

Page 25: Verifying Action Semantics Specifications in UML Behavioral Models (CAiSE 2009)

IntroductionOur methodOur methodRelated Work

Conclusions

> Overview> Input> PropertiesProperties

Execution Paths: endOfReview operation

if

ReclassifyObject(self,[Rejected],[ ])

ReclassifyObject(self,[Accepted],[ ])

AddStructuralFeature(self,comments,com)

AddStructuralFeature(self,accepDate,d)

if

p1 = { }

p2 = { ReclassifyObject(self,[Rejected],[]), AddStructuralFeature(self,comments,com) }

Verifying Action Semantics Specifications in UML Behavioral Models 15CAiSE’09 – 8-12 June 2009, Amsterdam

Page 26: Verifying Action Semantics Specifications in UML Behavioral Models (CAiSE 2009)

IntroductionOur methodOur methodRelated Work

Conclusions

> Overview> Input> PropertiesProperties

Execution Paths: endOfReview operation

if

ReclassifyObject(self,[Rejected],[ ])

ReclassifyObject(self,[Accepted],[ ])

AddStructuralFeature(self,comments,com)

AddStructuralFeature(self,accepDate,d)

if

p1 = { }

p2 = { ReclassifyObject(self,[Rejected],[]), AddStructuralFeature(self,comments,com) }

p3 = { ReclassifyObject(self,[Accepted],[]), AddStructuralFeature(self,accepDate,d) }

Verifying Action Semantics Specifications in UML Behavioral Models 15CAiSE’09 – 8-12 June 2009, Amsterdam

Page 27: Verifying Action Semantics Specifications in UML Behavioral Models (CAiSE 2009)

IntroductionOur methodOur methodRelated Work

Conclusions

> Overview> Input> Properties: Weak ExecutabilityProperties: Weak Executability

Weak Executability

Verifying Action Semantics Specifications in UML Behavioral Models 16CAiSE’09 – 8-12 June 2009, Amsterdam

Syntactic Correctness

Completenessinput

OUR METHOD feedback

WeakExecutabilityUML Model

Execution Paths

Page 28: Verifying Action Semantics Specifications in UML Behavioral Models (CAiSE 2009)

IntroductionOur methodOur methodRelated Work

Conclusions

> Overview> Input> Properties: Weak ExecutabilityProperties: Weak Executability

What is Executability?

An operation is executable when it may be successfully executed.

The execution of the actions included in the operation evolves the initial state of the system to a new system state that satisfies all integrityconstraints.

Verifying Action Semantics Specifications in UML Behavioral Models 17CAiSE’09 – 8-12 June 2009, Amsterdam

Page 29: Verifying Action Semantics Specifications in UML Behavioral Models (CAiSE 2009)

IntroductionOur methodOur methodRelated Work

Conclusions

> Overview> Input> Properties: Weak ExecutabilityProperties: Weak Executability

What is Executability?Person

name : String { readOnly } email : String

Paper title : String

Rejected comments : String

Accepted accepDate : Date

Under Review

IsAuthorOf author

1..* *

WorksIn 1 * {disjoint,complete}

Department name : String

context Person::dismissdismiss() { DestroyLink(WorksIn, person, self, department, self.department); }

context Department::addDepartmentaddDepartment(dpt_name: String): Department { Department dpt := CreateObject(Department); AddStructuralFeature(dpt,name,dpt_name); return dpt; }

context Paper::removeAuthorremoveAuthor(author: Person) { DestroyLink(isAuthorOf,paper,self,person,author); }

Verifying Action Semantics Specifications in UML Behavioral Models 18CAiSE’09 – 8-12 June 2009, Amsterdam

Page 30: Verifying Action Semantics Specifications in UML Behavioral Models (CAiSE 2009)

IntroductionOur methodOur methodRelated Work

Conclusions

> Overview> Input> Properties: Weak ExecutabilityProperties: Weak Executability

What is Executability?Person

name : String { readOnly } email : String

Paper title : String

Rejected comments : String

Accepted accepDate : Date

Under Review

IsAuthorOf author

1..* *

WorksIn 1 * {disjoint,complete}

Department name : String

context Person::dismissdismiss() { DestroyLink(WorksIn, person, self, department, self.department); }

context Department::addDepartmentaddDepartment(dpt_name: String): Department { Department dpt := CreateObject(Department); AddStructuralFeature(dpt,name,dpt_name); return dpt; }

context Paper::removeAuthorremoveAuthor(author: Person) { DestroyLink(isAuthorOf,paper,self,person,author); }

ALWAYS EXECUTABLE

Verifying Action Semantics Specifications in UML Behavioral Models 18CAiSE’09 – 8-12 June 2009, Amsterdam

Page 31: Verifying Action Semantics Specifications in UML Behavioral Models (CAiSE 2009)

IntroductionOur methodOur methodRelated Work

Conclusions

> Overview> Input> Properties: Weak ExecutabilityProperties: Weak Executability

What is Executability?Person

name : String { readOnly } email : String

Paper title : String

Rejected comments : String

Accepted accepDate : Date

Under Review

IsAuthorOf author

1..* *

WorksIn 1 * {disjoint,complete}

Department name : String

context Person::dismissdismiss() { DestroyLink(WorksIn, person, self, department, self.department); }

context Department::addDepartmentaddDepartment(dpt_name: String): Department { Department dpt := CreateObject(Department); AddStructuralFeature(dpt,name,dpt_name); return dpt; }

context Paper::removeAuthorremoveAuthor(author: Person) { DestroyLink(isAuthorOf,paper,self,person,author); }

SOMETIMESEXECUTABLE

ALWAYS EXECUTABLE

Verifying Action Semantics Specifications in UML Behavioral Models 18CAiSE’09 – 8-12 June 2009, Amsterdam

Page 32: Verifying Action Semantics Specifications in UML Behavioral Models (CAiSE 2009)

IntroductionOur methodOur methodRelated Work

Conclusions

> Overview> Input> Properties: Weak ExecutabilityProperties: Weak Executability

What is Executability?Person

name : String { readOnly } email : String

Paper title : String

Rejected comments : String

Accepted accepDate : Date

Under Review

IsAuthorOf author

1..* *

WorksIn 1 * {disjoint,complete}

Department name : String

context Person::dismissdismiss() { DestroyLink(WorksIn, person, self, department, self.department); }

context Department::addDepartmentaddDepartment(dpt_name: String): Department { Department dpt := CreateObject(Department); AddStructuralFeature(dpt,name,dpt_name); return dpt; }

context Paper::removeAuthorremoveAuthor(author: Person) { DestroyLink(isAuthorOf,paper,self,person,author); }

SOMETIMESEXECUTABLE

NEVEREXECUTABLE

ALWAYS EXECUTABLE

Verifying Action Semantics Specifications in UML Behavioral Models 18CAiSE’09 – 8-12 June 2009, Amsterdam

Page 33: Verifying Action Semantics Specifications in UML Behavioral Models (CAiSE 2009)

IntroductionOur methodOur methodRelated Work

Conclusions

> Overview> Input> Properties: Weak ExecutabilityProperties: Weak Executability

What is Weak Executability?

context Person::dismissdismiss() { DestroyLink(WorksIn, person, self, department, self.department); }

context Department::addDepartmentaddDepartment(dpt_name: String): Department { Department dpt := CreateObject(Department); AddStructuralFeature(dpt,name,dpt_name); return dpt; }

context Paper::removeAuthorremoveAuthor(author: Person) { DestroyLink(isAuthorOf,paper,self,person,author); }

SOMETIMESEXECUTABLE

NEVEREXECUTABLE

ALWAYS EXECUTABLE

WEAK EXECUTABLE

NOT WEAKEXECUTABLE

Our method

Verifying Action Semantics Specifications in UML Behavioral Models 18CAiSE’09 – 8-12 June 2009, Amsterdam

An operation is weakly executable if there is a chance that a user may successfully execute it.

Page 34: Verifying Action Semantics Specifications in UML Behavioral Models (CAiSE 2009)

IntroductionOur methodOur methodRelated Work

Conclusions

> Overview> Input> Properties: Weak ExecutabilityProperties: Weak Executability

Weak Executability of an operation

Some actions require the presence of other actions in order to leave the system in a consistent state DEPENDENCY

A dependency from an action A1 to an action A2 (A1 A2) express that A2 must be included in all execution paths where A1 appers to avoid violating the constraints of the class diagram.

For checking the Weak Executability, we just take into account:- Minimum cardinality constraints- Disjoint/Complete constraint

Verifying Action Semantics Specifications in UML Behavioral Models 19CAiSE’09 – 8-12 June 2009, Amsterdam

An operation is weakly executable if at least one of its execution paths is weak executable.

Page 35: Verifying Action Semantics Specifications in UML Behavioral Models (CAiSE 2009)

IntroductionOur methodOur methodRelated Work

Conclusions

> Overview> Input> Properties: Weak ExecutabilityProperties: Weak Executability

Weak Executability Algorithm

Executability Algorithm1 Computing the Dependencies

2 Mapping the Dependencies

p is not weakly executable+ FEEDBACK

Execution Path (p)

p is weakly executable

Verifying Action Semantics Specifications in UML Behavioral Models 20CAiSE’09 – 8-12 June 2009, Amsterdam

Page 36: Verifying Action Semantics Specifications in UML Behavioral Models (CAiSE 2009)

IntroductionOur methodOur methodRelated Work

Conclusions

> Overview> Input> Properties: Weak ExecutabilityProperties: Weak Executability

Weak Executability Algorithm: Example

Verifying Action Semantics Specifications in UML Behavioral Models 21CAiSE’09 – 8-12 June 2009, Amsterdam

Person name : String { readOnly } email : String

Paper title : String

Rejected comments : String

Accepted accepDate : Date

Under Review

IsAuthorOf author

1..* *

WorksIn 1 * {disjoint,complete}

Department name : String

DestroyLink(assoc,p1,p2) CreateLink(assoc,p1,p3) OR DestroyObject(p1)DEPENDENCY:

context Person::dismissdismiss() { DestroyLink(WorksIn, person, self, department, self.department); }

Page 37: Verifying Action Semantics Specifications in UML Behavioral Models (CAiSE 2009)

IntroductionOur methodOur methodRelated Work

Conclusions

> Overview> Input> Properties: Weak ExecutabilityProperties: Weak Executability

Weak Executability Algorithm: Example

context Person::dismissdismiss() { DestroyLink(WorksIn, person, self, department, self.department); }

Verifying Action Semantics Specifications in UML Behavioral Models 21CAiSE’09 – 8-12 June 2009, Amsterdam

Person name : String { readOnly } email : String

Paper title : String

Rejected comments : String

Accepted accepDate : Date

Under Review

IsAuthorOf author

1..* *

WorksIn 1 * {disjoint,complete}

Department name : String

DestroyLink(assoc,p1,p2) CreateLink(assoc,p1,p3) OR DestroyObject(p1)DEPENDENCY:

context Person::dismissdismiss(newDpt: Department) { DestroyLink(WorksIn, person, self, department, self.department); CreateLink(WorksIn, person, self, department, newDpt); }

Solution 1

Page 38: Verifying Action Semantics Specifications in UML Behavioral Models (CAiSE 2009)

IntroductionOur methodOur methodRelated Work

Conclusions

> Overview> Input> Properties: Weak ExecutabilityProperties: Weak Executability

Weak Executability Algorithm: Example

Verifying Action Semantics Specifications in UML Behavioral Models 21CAiSE’09 – 8-12 June 2009, Amsterdam

Person name : String { readOnly } email : String

Paper title : String

Rejected comments : String

Accepted accepDate : Date

Under Review

IsAuthorOf author

1..* *

WorksIn 1 * {disjoint,complete}

Department name : String

DestroyLink(assoc,p1,p2) CreateLink(assoc,p1,p3) OR DestroyObject(p1)DEPENDENCY:

context Person::dismissdismiss() { DestroyLink(WorksIn, person, self, department, self.department); DestroyObject(self);}

Solution 2

context Person::dismissdismiss() { DestroyLink(WorksIn, person, self, department, self.department); }

Page 39: Verifying Action Semantics Specifications in UML Behavioral Models (CAiSE 2009)

IntroductionOur methodOur methodRelated Work

Conclusions

> Overview> Input> Properties: Weak ExecutabilityProperties: Weak Executability

Weak Executability Algorithm: Example

Executability Algorithm1 Computing the Dependencies

2 Mapping the Dependencies

the path is not weakly executable

FEEDBACK:1. Add CreateLink action2. Add DestroyObject action

dismiss path

Verifying Action Semantics Specifications in UML Behavioral Models 22CAiSE’09 – 8-12 June 2009, Amsterdam

Page 40: Verifying Action Semantics Specifications in UML Behavioral Models (CAiSE 2009)

IntroductionOur methodOur methodRelated Work

Conclusions

> Overview> Input> Properties: CompletenessProperties: Completeness

Completeness

Verifying Action Semantics Specifications in UML Behavioral Models 23CAiSE’09 – 8-12 June 2009, Amsterdam

Syntactic Correctness

Completenessinput

OUR METHOD feedback

WeakExecutabilityUML Model

Execution Paths

Page 41: Verifying Action Semantics Specifications in UML Behavioral Models (CAiSE 2009)

IntroductionOur methodOur methodRelated Work

Conclusions

> Overview> Input> Properties: CompletenessProperties: Completeness

Completeness

A set of operations is complete when all possible changes (inserts/updates/deletes) on all parts of the system state can be performed throught the execution of the actions included in it.

Class Diagram

Operations Set

Person

name : String email : String

Department

name : String

WorksIn1*

context Person::dismissdismiss(newDpt: Department) { DestroyLink(WorksIn, person, self, department, self.department); CreateLink(WorksIn, person, self, department, newDpt);}

NOT COMPLETE

Verifying Action Semantics Specifications in UML Behavioral Models 24CAiSE’09 – 8-12 June 2009, Amsterdam

Page 42: Verifying Action Semantics Specifications in UML Behavioral Models (CAiSE 2009)

IntroductionOur methodOur methodRelated Work

Conclusions

> Overview> Input> Properties: CompletenessProperties: Completeness

Completeness Algorithm

Completeness Algorithm1 Computing Required Actions (RA)

2 Computing Existing Actions (EA)

3 Computing Missing Actions (MA) MA = RA - EA

Set of operations

MA = ø

the set is complete

the set is not complete+ FEEDBACK

MA ≠ ø

Verifying Action Semantics Specifications in UML Behavioral Models 25CAiSE’09 – 8-12 June 2009, Amsterdam

Page 43: Verifying Action Semantics Specifications in UML Behavioral Models (CAiSE 2009)

IntroductionOur methodOur methodRelated Work

Conclusions

> Overview> Input> Properties: CompletenessProperties: Completeness

Completeness Algorithm (Example)

Person

name : String email : String

Department

name : String

WorksIn1*

context Person::dismissdismiss(newDpt: Department) { DestroyLink(WorksIn, person, self, department, self.department); CreateLink(WorksIn, person, self, department, newDpt);}

Inpu

t

Verifying Action Semantics Specifications in UML Behavioral Models 26CAiSE’09 – 8-12 June 2009, Amsterdam

Page 44: Verifying Action Semantics Specifications in UML Behavioral Models (CAiSE 2009)

IntroductionOur methodOur methodRelated Work

Conclusions

> Overview> Input> Properties: CompletenessProperties: Completeness

Completeness Algorithm (Example)

Person

name : String email : String

Department

name : String

WorksIn1*

context Person::dismissdismiss(newDpt: Department) { DestroyLink(WorksIn, person, self, department, self.department); CreateLink(WorksIn, person, self, department, newDpt);}

Inpu

t

p:=CreateObject(Person)d:=CreateObject(Department)DestroyObject(p)DestroyObject(d)AddStructuralFeature(p,name,v)AddStructuralFeature(p,email,v)AddStructuralFeature(d,name,v)DestroyLink(WorksIn,p,d)CreateLink(WorksIn,p,d)

Required Actions

Verifying Action Semantics Specifications in UML Behavioral Models 26CAiSE’09 – 8-12 June 2009, Amsterdam

Page 45: Verifying Action Semantics Specifications in UML Behavioral Models (CAiSE 2009)

IntroductionOur methodOur methodRelated Work

Conclusions

> Overview> Input> Properties: CompletenessProperties: Completeness

Completeness Algorithm (Example)

Person

name : String email : String

Department

name : String

WorksIn1*

context Person::dismissdismiss(newDpt: Department){ DestroyLink(WorksIn, person, self, department, self.department); CreateLink(WorksIn, person, self, department, newDpt);}

Inpu

t

DestroyLink(WorksIn,p,d)CreateLink(WorksIn,p,d)

Existing Actions

p:=CreateObject(Person)d:=CreateObject(Department)DestroyObject(p)DestroyObject(d)AddStructuralFeature(p,name,v)AddStructuralFeature(p,email,v)AddStructuralFeature(d,name,v)DestroyLink(WorksIn,p,d)CreateLink(WorksIn,p,d)

Required Actions

Verifying Action Semantics Specifications in UML Behavioral Models 26CAiSE’09 – 8-12 June 2009, Amsterdam

Page 46: Verifying Action Semantics Specifications in UML Behavioral Models (CAiSE 2009)

IntroductionOur methodOur methodRelated Work

Conclusions

> Overview> Input> Properties: CompletenessProperties: Completeness

Completeness Algorithm (Example)

Person

name : String email : String

Department

name : String

WorksIn1*

context Person::dismissdismiss(newDpt: Department { DestroyLink(WorksIn, person, self, department, self.department); CreateLink(WorksIn, person, self, department, newDpt);}

Inpu

t

p:=CreateObject(Person)d:=CreateObject(Department)DestroyObject(p)DestroyObject(d)AddStructuralFeature(p,name,v)AddStructuralFeature(p,email,v)AddStructuralFeature(d,name,v)

FEEDBACK (Missing Actions)

- = DestroyLink(WorksIn,p,d)CreateLink(WorksIn,p,d)

Existing Actions

p:=CreateObject(Person)d:=CreateObject(Department)DestroyObject(p)DestroyObject(d)AddStructuralFeature(p,name,v)AddStructuralFeature(p,email,v)AddStructuralFeature(d,name,v)DestroyLink(WorksIn,p,d)CreateLink(WorksIn,p,d)

Required Actions

Verifying Action Semantics Specifications in UML Behavioral Models 26CAiSE’09 – 8-12 June 2009, Amsterdam

Page 47: Verifying Action Semantics Specifications in UML Behavioral Models (CAiSE 2009)

IntroductionOur method

Related WorkRelated WorkConclusions

ComparisonModel Checking based methodsOur method

Dynamic analysisanalysis Static analysis

More detailed analysisdepth Basic correctness analysis

General LTL propertiespropertiesSyntactic correctness,

Executability, Completeness

Error traceoutput Valuable feedback

Finite set of valuesscope Not take into account possible values for the arguments

UML behavioral diagramsfocus Actions

Verifying Action Semantics Specifications in UML Behavioral Models 27CAiSE’09 – 8-12 June 2009, Amsterdam

Page 48: Verifying Action Semantics Specifications in UML Behavioral Models (CAiSE 2009)

IntroductionOur method

Related WorkConclusionsConclusions

> Conclusions and Further WorkConclusions and Further Work

ConclusionsLightweight method for the verification of the correctnes properties of imperative operationsExtensible to other kinds of behavioral specificationsStatic analysis (do not require simulation)Valuable feedback

▪▪▪

Complement our techniques with MC approachesImplement and integrate our tehcniques in a CASE toolValidate our techniques with a complex case studyEvaluate empirically the computational cost of our techniques

Further Work▪

▪▪▪

Verifying Action Semantics Specifications in UML Behavioral Models 28CAiSE’09 – 8-12 June 2009, Amsterdam

Page 49: Verifying Action Semantics Specifications in UML Behavioral Models (CAiSE 2009)

The 21st International Conference onAdvanced Information Systems

CAiSE’0912nd June 2009 Amsterdam

Thanks for your attention!

Elena [email protected]

Verifying Action Semantics Specifications in UML Behavioral Models