SlideShare uma empresa Scribd logo
1 de 35
From UML to Process Algebra
and Back:
An Automated Approach to Model-Checking
Software Design Artifacts of Concurrent Systems
Daniela Remenska, Jeff Templon , Tim A.C. Willemse,
Philip Homburg, Kees Verstoep , Adria Casajus , and Henri Bal
NASA Formal Methods Symposium
May 2013
Model checking: a success story?
Model Checker
Software/Hardware
System
Nope, you're
good to go!
Houston, we
have a problem!
Are there
deadlocks in
my system?
Are there
deadlocks in
my system?
Model Checker
Software/Hardware
System
Nope, you're
good to go!
Houston, we
have a problem!
Model checking: a success story?
Why state-of-the-art is not yet
state-of-the-practice?
● SE wants efficient push-button verification solutions
● Not everything is implemented in Java / C / Matlab
● Not everything is described in a domain-specific verifiable language
● Need to write a funky model in process algebra?
● Forget it, let's just stick to testing and static analysis.
● UML is the lingua franca for describing systems
● Intuitive, visual, lots of CASE tools, automated test/code generation
● Not officially formalized!
Sequence Diagram
Class Diagram
State Machine
State Machine
Class Diagram
Sequence Diagram
Sequence Diagrams (UML2.x)
alternatives
loop
parallelism
break
Combined Fragments [ref]
For a broad domain of OO software
systems, Sequence Diagrams give
the most precise description of the behavior,
the closest one to code implementation.
Goal: a full round-trip approach,
supported by a toolset.
Ideally, model checking should be hidden
from the UML designer!
Target formalism: mCRL2
● actions: atomic steps
● processes: combination (sequential, parallel) of
actions …
● Communication between processes (exchange of
data) via action synchronization ...
● if-then-else constructs …
● nondeterministic choices …
● means to describe custom data structures ...
(also:integers,reals,enumerations,booleans,lists,sets..)
The approach
The rationale: treating objects as
sequential processes
Time
Objects (lifelines)
"The general UML-to-Promela formalization approach is to map
objects to processes in Spin (proctypes) that exchange messages..."
"...lines 7 and 8 specify the lifelines using process..."
Execution
occurrence
Objects: sequential or concurrent?
In a concurrent setting, multiple threads of a process could be
invoking methods on the same object.
The rationale: global choices
- managing choices globally
- dealing only with synchronous
communication
- not treating all Fragment types
Why should object a need to know
local decisions of object b ?
Goal: preserve the OO view in the
target model
● An OS level process is essentially a chain of
method invocations on objects
● Associate an mCRL2 process description with
each class method
– Each mCRL2 process instance carries information
about the class, object, and OS process instance to
which the method behavior belongs
● Trivial to reverse model-checking traces back to
the UML domain
Validation
● UML specification is semi-formal
– Semantics deduced via partial meta-model views
& natural language descriptions
– No mathematically-formalized semantics
– We don't have formal correctness proofs to
support the validity of this transformation
– Simulation on simple building blocks; application
on a real case study
Case Study: DIRAC Executor Framework
$ java ­jar UML2mCRL2 exportedModel.uml model.mcrl2 
$ mcrl22lps ­nfbw model.mcrl2 model.lps
$ lps2pbes model.lps model.pbes –formula=formula.mcf
$ pbes2bool model.pbes
[true* .
synch_call(1,ExecutorQueues,_queues,pushTask(JobPath,taskId,false)).
true*.
!(synch_call(1,ExecutorQueues,_queues,popTask([JobPath])))*.
synch_reply(1,ExecutorDispatcher,_eDispatch,
_sendTaskToExecutor_return(OK,0))]false
● Problem: state-space explosion!
- 50 processes in the model
- >300million states and >600GB of memory
● Workaround: standard monitoring automaton running lock-
step with the model, fires a deadlock action if a violation is
found
Conclusions and Future Work
● Attempt to bridge the existing gap by providing
transformation methodology and toolset
●
Express properties in UML rather than with µ-calculus
[true* .
synch_call(1,ExecutorQueues,_queues,pushTask(JobPath,taskId,false)).
true*.
!(synch_call(1,ExecutorQueues,_queues,popTask([JobPath])))*.
synch_reply(1,ExecutorDispatcher,_eDispatch,
_sendTaskToExecutor_return(OK,0))]false
remember this?

Mais conteúdo relacionado

Mais procurados

SSBSE 2020 keynote
SSBSE 2020 keynoteSSBSE 2020 keynote
SSBSE 2020 keynoteShiva Nejati
 
Formal Specification in Software Engineering SE9
Formal Specification in Software Engineering SE9Formal Specification in Software Engineering SE9
Formal Specification in Software Engineering SE9koolkampus
 
SBST 2019 Keynote
SBST 2019 Keynote SBST 2019 Keynote
SBST 2019 Keynote Shiva Nejati
 
States, state graphs and transition testing
States, state graphs and transition testingStates, state graphs and transition testing
States, state graphs and transition testinggeethawilliam
 
Software Engineering - Module 3: Lesson7
Software Engineering - Module 3: Lesson7Software Engineering - Module 3: Lesson7
Software Engineering - Module 3: Lesson7ArraLafuente
 
Speeding-up Software Testing With Computational Intelligence
Speeding-up Software Testing With Computational IntelligenceSpeeding-up Software Testing With Computational Intelligence
Speeding-up Software Testing With Computational IntelligenceAnnibale Panichella
 
AI in SE: A 25-year Journey
AI in SE: A 25-year JourneyAI in SE: A 25-year Journey
AI in SE: A 25-year JourneyLionel Briand
 
Experiments on Design Pattern Discovery
Experiments on Design Pattern DiscoveryExperiments on Design Pattern Discovery
Experiments on Design Pattern DiscoveryTim Menzies
 
Lecture Note-2: Performance analysis of Algorithms
Lecture Note-2: Performance analysis of AlgorithmsLecture Note-2: Performance analysis of Algorithms
Lecture Note-2: Performance analysis of AlgorithmsRajesh K Shukla
 
Analyzing Natural-Language Requirements: The Not-too-sexy and Yet Curiously D...
Analyzing Natural-Language Requirements: The Not-too-sexy and Yet Curiously D...Analyzing Natural-Language Requirements: The Not-too-sexy and Yet Curiously D...
Analyzing Natural-Language Requirements: The Not-too-sexy and Yet Curiously D...Lionel Briand
 
A General Framework for Electronic Circuit Verification
A General Framework for Electronic Circuit VerificationA General Framework for Electronic Circuit Verification
A General Framework for Electronic Circuit VerificationIRJET Journal
 
Using Developer Information as a Prediction Factor
Using Developer Information as a Prediction FactorUsing Developer Information as a Prediction Factor
Using Developer Information as a Prediction FactorTim Menzies
 
AUTOMATIC ALL IN 1-TESTING TOOL
AUTOMATIC ALL IN 1-TESTING TOOLAUTOMATIC ALL IN 1-TESTING TOOL
AUTOMATIC ALL IN 1-TESTING TOOLMphasis
 
Enabling Automated Software Testing with Artificial Intelligence
Enabling Automated Software Testing with Artificial IntelligenceEnabling Automated Software Testing with Artificial Intelligence
Enabling Automated Software Testing with Artificial IntelligenceLionel Briand
 
Metamorphic Security Testing for Web Systems
Metamorphic Security Testing for Web SystemsMetamorphic Security Testing for Web Systems
Metamorphic Security Testing for Web SystemsLionel Briand
 

Mais procurados (20)

SSBSE 2020 keynote
SSBSE 2020 keynoteSSBSE 2020 keynote
SSBSE 2020 keynote
 
Formal Specification in Software Engineering SE9
Formal Specification in Software Engineering SE9Formal Specification in Software Engineering SE9
Formal Specification in Software Engineering SE9
 
SBST 2019 Keynote
SBST 2019 Keynote SBST 2019 Keynote
SBST 2019 Keynote
 
States, state graphs and transition testing
States, state graphs and transition testingStates, state graphs and transition testing
States, state graphs and transition testing
 
Software Engineering - Module 3: Lesson7
Software Engineering - Module 3: Lesson7Software Engineering - Module 3: Lesson7
Software Engineering - Module 3: Lesson7
 
Speeding-up Software Testing With Computational Intelligence
Speeding-up Software Testing With Computational IntelligenceSpeeding-up Software Testing With Computational Intelligence
Speeding-up Software Testing With Computational Intelligence
 
VST2022.pdf
VST2022.pdfVST2022.pdf
VST2022.pdf
 
AI in SE: A 25-year Journey
AI in SE: A 25-year JourneyAI in SE: A 25-year Journey
AI in SE: A 25-year Journey
 
Formal verification
Formal verificationFormal verification
Formal verification
 
Experiments on Design Pattern Discovery
Experiments on Design Pattern DiscoveryExperiments on Design Pattern Discovery
Experiments on Design Pattern Discovery
 
Lecture Note-2: Performance analysis of Algorithms
Lecture Note-2: Performance analysis of AlgorithmsLecture Note-2: Performance analysis of Algorithms
Lecture Note-2: Performance analysis of Algorithms
 
Analyzing Natural-Language Requirements: The Not-too-sexy and Yet Curiously D...
Analyzing Natural-Language Requirements: The Not-too-sexy and Yet Curiously D...Analyzing Natural-Language Requirements: The Not-too-sexy and Yet Curiously D...
Analyzing Natural-Language Requirements: The Not-too-sexy and Yet Curiously D...
 
A General Framework for Electronic Circuit Verification
A General Framework for Electronic Circuit VerificationA General Framework for Electronic Circuit Verification
A General Framework for Electronic Circuit Verification
 
Control term proj3012
Control term proj3012Control term proj3012
Control term proj3012
 
Using Developer Information as a Prediction Factor
Using Developer Information as a Prediction FactorUsing Developer Information as a Prediction Factor
Using Developer Information as a Prediction Factor
 
STPA and Software Verification
STPA and Software VerificationSTPA and Software Verification
STPA and Software Verification
 
AUTOMATIC ALL IN 1-TESTING TOOL
AUTOMATIC ALL IN 1-TESTING TOOLAUTOMATIC ALL IN 1-TESTING TOOL
AUTOMATIC ALL IN 1-TESTING TOOL
 
Enabling Automated Software Testing with Artificial Intelligence
Enabling Automated Software Testing with Artificial IntelligenceEnabling Automated Software Testing with Artificial Intelligence
Enabling Automated Software Testing with Artificial Intelligence
 
Model checking With ATM
Model checking With ATM Model checking With ATM
Model checking With ATM
 
Metamorphic Security Testing for Web Systems
Metamorphic Security Testing for Web SystemsMetamorphic Security Testing for Web Systems
Metamorphic Security Testing for Web Systems
 

Semelhante a UML to Process Algebra and Back

Model Driven Developing & Model Based Checking: Applying Together
Model Driven Developing & Model Based Checking: Applying TogetherModel Driven Developing & Model Based Checking: Applying Together
Model Driven Developing & Model Based Checking: Applying TogetherIosif Itkin
 
Executable UML – UML2
Executable UML – UML2Executable UML – UML2
Executable UML – UML2elliando dias
 
Rejunevating software reengineering processes
Rejunevating software reengineering processesRejunevating software reengineering processes
Rejunevating software reengineering processesmanishthaper
 
Software engineering rogers pressman chapter 7
Software engineering rogers pressman chapter 7Software engineering rogers pressman chapter 7
Software engineering rogers pressman chapter 7mohammad hossein Jalili
 
fdocuments.in_unit-2-ooad.ppt
fdocuments.in_unit-2-ooad.pptfdocuments.in_unit-2-ooad.ppt
fdocuments.in_unit-2-ooad.pptRAJESH S
 
Object oriented methodologies
Object oriented methodologiesObject oriented methodologies
Object oriented methodologiesnaina-rani
 
Ooad Overview
Ooad OverviewOoad Overview
Ooad OverviewDang Tuan
 
Ecmfa2013
Ecmfa2013Ecmfa2013
Ecmfa2013gogolla
 
A summary of various COMBINE standardization activities
A summary of various COMBINE standardization activitiesA summary of various COMBINE standardization activities
A summary of various COMBINE standardization activitiesMike Hucka
 
Unified Modeling Language (UML), Object-Oriented Programming Concepts & Desig...
Unified Modeling Language (UML), Object-Oriented Programming Concepts & Desig...Unified Modeling Language (UML), Object-Oriented Programming Concepts & Desig...
Unified Modeling Language (UML), Object-Oriented Programming Concepts & Desig...Isuru Perera
 
SE - Lecture 3 - Software Tools n Environment.pptx
SE - Lecture 3 - Software Tools n Environment.pptxSE - Lecture 3 - Software Tools n Environment.pptx
SE - Lecture 3 - Software Tools n Environment.pptxTangZhiSiang
 
Innoslate, A Model-Based Systems Engineering Tool
Innoslate, A Model-Based Systems Engineering ToolInnoslate, A Model-Based Systems Engineering Tool
Innoslate, A Model-Based Systems Engineering ToolElizabeth Steiner
 
Modelling simulation (1)
Modelling simulation (1)Modelling simulation (1)
Modelling simulation (1)Cathryn Kuteesa
 
The secret life of rules in Software Engineering
The secret life of rules in Software EngineeringThe secret life of rules in Software Engineering
The secret life of rules in Software EngineeringJordi Cabot
 
The embedded systems Model
The embedded systems ModelThe embedded systems Model
The embedded systems ModelAJAL A J
 

Semelhante a UML to Process Algebra and Back (20)

Model Driven Developing & Model Based Checking: Applying Together
Model Driven Developing & Model Based Checking: Applying TogetherModel Driven Developing & Model Based Checking: Applying Together
Model Driven Developing & Model Based Checking: Applying Together
 
Executable UML – UML2
Executable UML – UML2Executable UML – UML2
Executable UML – UML2
 
Rejunevating software reengineering processes
Rejunevating software reengineering processesRejunevating software reengineering processes
Rejunevating software reengineering processes
 
Software engineering rogers pressman chapter 7
Software engineering rogers pressman chapter 7Software engineering rogers pressman chapter 7
Software engineering rogers pressman chapter 7
 
fdocuments.in_unit-2-ooad.ppt
fdocuments.in_unit-2-ooad.pptfdocuments.in_unit-2-ooad.ppt
fdocuments.in_unit-2-ooad.ppt
 
Object oriented methodologies
Object oriented methodologiesObject oriented methodologies
Object oriented methodologies
 
Ooad Overview
Ooad OverviewOoad Overview
Ooad Overview
 
Ooad overview
Ooad overviewOoad overview
Ooad overview
 
Ecmfa2013
Ecmfa2013Ecmfa2013
Ecmfa2013
 
A summary of various COMBINE standardization activities
A summary of various COMBINE standardization activitiesA summary of various COMBINE standardization activities
A summary of various COMBINE standardization activities
 
Unified Modeling Language (UML), Object-Oriented Programming Concepts & Desig...
Unified Modeling Language (UML), Object-Oriented Programming Concepts & Desig...Unified Modeling Language (UML), Object-Oriented Programming Concepts & Desig...
Unified Modeling Language (UML), Object-Oriented Programming Concepts & Desig...
 
SE - Lecture 3 - Software Tools n Environment.pptx
SE - Lecture 3 - Software Tools n Environment.pptxSE - Lecture 3 - Software Tools n Environment.pptx
SE - Lecture 3 - Software Tools n Environment.pptx
 
Innoslate, A Model-Based Systems Engineering Tool
Innoslate, A Model-Based Systems Engineering ToolInnoslate, A Model-Based Systems Engineering Tool
Innoslate, A Model-Based Systems Engineering Tool
 
Uml1 concepts
Uml1 conceptsUml1 concepts
Uml1 concepts
 
uml test
uml testuml test
uml test
 
Chapter 11
Chapter 11Chapter 11
Chapter 11
 
Modelling simulation (1)
Modelling simulation (1)Modelling simulation (1)
Modelling simulation (1)
 
The secret life of rules in Software Engineering
The secret life of rules in Software EngineeringThe secret life of rules in Software Engineering
The secret life of rules in Software Engineering
 
The embedded systems Model
The embedded systems ModelThe embedded systems Model
The embedded systems Model
 
Chapter1
Chapter1Chapter1
Chapter1
 

UML to Process Algebra and Back

  • 1. From UML to Process Algebra and Back: An Automated Approach to Model-Checking Software Design Artifacts of Concurrent Systems Daniela Remenska, Jeff Templon , Tim A.C. Willemse, Philip Homburg, Kees Verstoep , Adria Casajus , and Henri Bal NASA Formal Methods Symposium May 2013
  • 2. Model checking: a success story? Model Checker Software/Hardware System Nope, you're good to go! Houston, we have a problem! Are there deadlocks in my system?
  • 3. Are there deadlocks in my system? Model Checker Software/Hardware System Nope, you're good to go! Houston, we have a problem! Model checking: a success story?
  • 4. Why state-of-the-art is not yet state-of-the-practice? ● SE wants efficient push-button verification solutions ● Not everything is implemented in Java / C / Matlab ● Not everything is described in a domain-specific verifiable language ● Need to write a funky model in process algebra? ● Forget it, let's just stick to testing and static analysis. ● UML is the lingua franca for describing systems ● Intuitive, visual, lots of CASE tools, automated test/code generation ● Not officially formalized!
  • 9. For a broad domain of OO software systems, Sequence Diagrams give the most precise description of the behavior, the closest one to code implementation.
  • 10. Goal: a full round-trip approach, supported by a toolset. Ideally, model checking should be hidden from the UML designer!
  • 11. Target formalism: mCRL2 ● actions: atomic steps ● processes: combination (sequential, parallel) of actions … ● Communication between processes (exchange of data) via action synchronization ... ● if-then-else constructs … ● nondeterministic choices … ● means to describe custom data structures ... (also:integers,reals,enumerations,booleans,lists,sets..)
  • 13. The rationale: treating objects as sequential processes Time Objects (lifelines) "The general UML-to-Promela formalization approach is to map objects to processes in Spin (proctypes) that exchange messages..." "...lines 7 and 8 specify the lifelines using process..." Execution occurrence
  • 14. Objects: sequential or concurrent? In a concurrent setting, multiple threads of a process could be invoking methods on the same object.
  • 15. The rationale: global choices - managing choices globally - dealing only with synchronous communication - not treating all Fragment types Why should object a need to know local decisions of object b ?
  • 16. Goal: preserve the OO view in the target model ● An OS level process is essentially a chain of method invocations on objects ● Associate an mCRL2 process description with each class method – Each mCRL2 process instance carries information about the class, object, and OS process instance to which the method behavior belongs ● Trivial to reverse model-checking traces back to the UML domain
  • 17.
  • 18.
  • 19.
  • 20.
  • 21.
  • 22.
  • 23.
  • 24.
  • 25.
  • 26.
  • 27.
  • 28.
  • 29.
  • 30.
  • 31. Validation ● UML specification is semi-formal – Semantics deduced via partial meta-model views & natural language descriptions – No mathematically-formalized semantics – We don't have formal correctness proofs to support the validity of this transformation – Simulation on simple building blocks; application on a real case study
  • 32. Case Study: DIRAC Executor Framework
  • 34.
  • 35. Conclusions and Future Work ● Attempt to bridge the existing gap by providing transformation methodology and toolset ● Express properties in UML rather than with µ-calculus [true* . synch_call(1,ExecutorQueues,_queues,pushTask(JobPath,taskId,false)). true*. !(synch_call(1,ExecutorQueues,_queues,popTask([JobPath])))*. synch_reply(1,ExecutorDispatcher,_eDispatch, _sendTaskToExecutor_return(OK,0))]false remember this?

Notas do Editor

  1. In conclusion: We tried to bridge the existing gap by suggesting a transformation methodology and a toolset in order to verify UML models,based on sequence diagrams. We wanted to preserve the Object Oriented aspects in the target formal model. The idea is for engineers to stay in the UML domain in the verification process. We applied it to a distributed object-oriented system, and discovered a logical flaw that prevents progress of jobs. Since we're aiming for a push-button approach, the number one problem we're currently tackling is expressing properties in the UML world too. Sequence diagrams can be easily translated into these temporal logic formulas of accept or reject scenarios, given that actions in the model correspond to message exchanges in sequence diagrams, but we're evaluating to what extent SDs can express just about any requirement.