20
Tom Mens [email protected] Executable modeling and simula2on of system so5ware and processes So1ware Engineering Lab, Dept. Computer Science

Executable modeling and simulation of system software and processes

Embed Size (px)

Citation preview

Page 1: Executable modeling and simulation of system software and processes

[email protected]

Executablemodelingandsimula2onofsystemso5wareandprocesses

So1wareEngineeringLab,Dept.ComputerScience

Page 2: Executable modeling and simulation of system software and processes

Université de Mons

So5ware-controlledsystemsareomnipresent

Prof.TomMens ServicedeGénieLogiciel Départementd’InformaEque

Page 3: Executable modeling and simulation of system software and processes

Université de Mons

Controlso1warecanbeverycomplex§ ConEnuousinteracEonbetweenso1wareandhardware§ ConEnuousinteracEonwithexternalworldandusers§ Mustrespectfunc%onalrequirements

§ Vendingmachinedoesnotdispensecorrectbeverage§ Cashmachinereturnsmorecashthanrequested§ …

§ Mustrespectnon-func%onalrequirements§ Safety/Security/Performance/Energyconstraints/Maintainability/Usability/…§ Microwave/elevatorshouldnotfuncEonwithopendoors§  Trafficlightsshouldneverbegreensimultaneously

So5ware-controlledsystemsaredifficulttodevelop

3Prof.TomMens ServicedeGénieLogiciel Départementd’InformaEque

Page 4: Executable modeling and simulation of system software and processes

Université de Mons

Example1:Modèle du processus d’engagement de personnel UMONS (version 1, 2013)

Thesameistruefor(business)processes

4Prof.TomMens ServicedeGénieLogiciel Départementd’InformaEque

Page 5: Executable modeling and simulation of system software and processes

Université de Mons

Example2:Distributed software development and bug fixing processes

Thesameistruefor(business)processes

5Prof.TomMens ServicedeGénieLogiciel Départementd’InformaEque

Page 6: Executable modeling and simulation of system software and processes

Université de Mons

•  beUerunderstandtheproblem•  reducethe“accidentalcomplexity”ofthe

soluEon•  detecterrorsearly

•  TestorverifythesoluEonbeforeitisactuallyimplemented

•  explorethedesignspace•  comparealternaEvesoluEonsthroughsimulaEon

Modelsimula2onandanalysiscanhelpto…

6Prof.TomMens ServicedeGénieLogiciel Départementd’InformaEque

Page 7: Executable modeling and simulation of system software and processes

Université de Mons

•  AllowtoexpressthesoluEonatahigherlevelofabstracEonthantradiEonalprogramminglanguages

•  Providesupportfor•  Simula%ngthedesiredbehaviourorprocess•  Genera%ngso1warecodeautomaEcallyfromthesimulated

modelinorderto•  Executeandintegratethegeneratedso1warewithotherso1wareor

hardware•  Supportorcontrolthemodeledprocess

•  Verifyingcorrectnessofthemodeledbehaviour

Modelinglanguages

7Prof.TomMens ServicedeGénieLogiciel Départementd’InformaEque

Page 8: Executable modeling and simulation of system software and processes

Université de Mons

ModelingLanguagesExample:Statecharts

8Prof.TomMens ServicedeGénieLogiciel Départementd’InformaEque

Page 9: Executable modeling and simulation of system software and processes

Université de Mons

ManytoolsforsimulaEonandexecuEonExample:Yakindu(www.statecharts.org)

ModelingToolsExample:Statecharts

9Prof.TomMens ServicedeGénieLogiciel Départementd’InformaEque

Page 10: Executable modeling and simulation of system software and processes

Université de Mons

SISMIC(createdbyA.Decan)AtoolunderdevelopmentatSo1wareEngineeringLab(UMONS)to•  Simulatestatecharts•  IntegratewithPythoncode•  FacilitatetesEng

(basedon“stories”)•  SupportmulEple

communicaEngstatecharts•  Expressstatechartcontracts

(invariants,pre-andpostcondiEons)•  Andmanymore…SeehUps://github.com/AlexandreDecan/sismic

ModelingLanguagesExample:Statecharts

10Prof.TomMens ServicedeGénieLogiciel Départementd’InformaEque

Page 11: Executable modeling and simulation of system software and processes

Université de Mons

ModelingLanguagesExample:Petrinets

11Prof.TomMens ServicedeGénieLogiciel Départementd’InformaEque

See “Petri Nets World” for more information http://www.informatik.uni-hamburg.de/TGI/PetriNets

Page 12: Executable modeling and simulation of system software and processes

Université de Mons

ManytoolsforsimulaEonandformalanalysisExample:Pipe2(pipe2.sourceforge.net)

ModelingtoolsExample:Petrinets

12Prof.TomMens ServicedeGénieLogiciel Départementd’InformaEque

Page 13: Executable modeling and simulation of system software and processes

Université de Mons

ModelinglanguagesExamples:BPMN

13Prof.TomMens ServicedeGénieLogiciel Départementd’InformaEque

Page 14: Executable modeling and simulation of system software and processes

Université de Mons

Example:VisualParadigmSimulateexecuEonofbusinessprocessto•  StudyresourceconsumpEon(e.g.humanresources,devices)

throughouttheprocess•  Evaluatecost•  IdenEfyboUlenecks•  ComparedesignalternaEves

ModelingtoolsBPMN

14Prof.TomMens ServicedeGénieLogiciel Départementd’InformaEque

Page 15: Executable modeling and simulation of system software and processes

Université de Mons

Modelverifica2onandmodelchecking

Verifyifthemodelhasalldesirableproper2es(structural,behavioural,temporal,…)UsemostappropriateformalismUsemostappropriate(modelchecking)tool

Examples•  Reachability•  Safety:somethingshouldnever

happen•  Liveness:somethingmusteventually

happen•  Fairness:everypossibleprocess

shouldbeexecutedinfinitelyo1en

•  lineartemporallogic(LTL)•  computaEontreelogic(CTL)•  …•  SPIN•  Alloy•  …

15Prof.TomMens ServicedeGénieLogiciel Départementd’InformaEque

Page 16: Executable modeling and simulation of system software and processes

Université de Mons

ProvidebeUertoolsupportandformalsupportfor•  Domain-specificmodeling

•  Expressmodelsinalanguageclosetothedomainexpert

•  Human-computerinteracEonmodeling•  E.g.tocontrolrobots

•  Model-basedtesEng•  FacilitatetesEngofmodels/generateautomatedtestsfrommodels

•  DesignspaceexploraEon•  EvaluatethequaliEesofalternaEvemodels

•  ModelevoluEon•  FacilitatechangingthemodelwhilepreservingitsdesirableproperEes

Challenges

16Prof.TomMens ServicedeGénieLogiciel Départementd’InformaEque

Page 17: Executable modeling and simulation of system software and processes

Université de Mons

Example:AmodelinglanguageforgesturalinteracEon(GISMO,PhDthesisRomualdDeshayes,UMONS,2015)

ChallengesDomain-specificso5waremodeling

17Prof.TomMens ServicedeGénieLogiciel Départementd’InformaEque

Page 18: Executable modeling and simulation of system software and processes

Université de Mons

Example:AmodelinglanguageforgesturalinteracEon(GISMO,PhDthesisRomualdDeshayes,UMONS,2015)

ChallengesDomain-specificso5waremodeling

18Prof.TomMens ServicedeGénieLogiciel Départementd’InformaEque

Page 19: Executable modeling and simulation of system software and processes

Université de Mons

ChallengesExecutablerobotmodeling

19

MémoireChristopheD’Hondt

Page 20: Executable modeling and simulation of system software and processes

Université de Mons

•  Researchinprogress•  Property-basedtesEng

•  Generatesimplesttestcasesthatviolateagivenproperty/invariant

•  Designbycontract•  Expresspre-andpostcondiEonsandinvariantsonthemodel•  RaiseexcepEonsduringsimulaEon/execuEonifcontractviolated

•  TestgeneraEon•  UsemodeltogeneratetestsforsourcecodeautomaEcally

•  MutaEontesEng•  ToevaluateandimproveexisEngtestsuite

ChallengesModel-basedtes2ng

20