kristian bisgaard lassen / simon tjell dep. of comp. science, … · 2021. 1. 26. · kristian...
TRANSCRIPT
-
Kristian Bisgaard Lassen / Simon TjellDep. of Comp. Science, University of Aarhus, Denmark
Developing Tool Support for Problem Diagrams with
CPN and VDM++
-
Outline
An example of a problem Coloured Petri Nets (CPN) Problem Diagrams Walk through a typical workflow Future work
-
Coloured Petri Nets (CPN) A graphical modeling language A high-level extension to Petri Nets adding:
Complex data types for tokens A functional language for token manipulation/examination Hierachical constructs Time (delays, timestamps)
Tool support: Graphical editing Simulation by execution State space analysis
-
Sluice Gate Controller
S
S
Sluice GateController
M
Operator
-
PD1
Problem Diagrams (1)
Gate &Motor
a: SC! {Direction, Control}GM! {Sensors}
b: GM! {Position, Movement}c: SO! {Buttons}
SluiceOperator
Sluice GateController
Control Gate
c
a b
c
Machine
ContextDomains
Requirement SharedPhenomena
-
Problem Diagrams (2)
Problem Diagrams: Identify relevant entities in the near environment Identify knowledge about structure in the
environment Identify shared phenomena (~interaction
channels) Do not describe behavior Can be used to document Problem
Decomposition
-
PD2
Problem Diagrams (3)
a: TC! {Direction, Control}GM! {Sensors}
b': GM! {Position}
a b'TimedController
Gate &Motor
Open Periodically
PD1
-
PD1
PD2
PD3
Problem Diagrams (4)
a: MC! {Direction, Control}GM! {Sensors}
b: GM! {Position, Movement}c: SO! {Buttons}
SluiceOperator
ManualController
Gate &Motor
Allow Operatorto Control Gate
c
a b
c
-
PD3
Translate
Automatically generates a composite CPN model
Contents:● a module per context domain in the PD● a machine module● a link module
● enables communication through shared phenomena (only)● preserves the structure of the PD● records traces of phenomena activity
● a requirement module
Behavior of context and machine domains is initially free/spontaneous
Translating
PD1
PD2
PD3
-
PD3
Export
PD3
Translate
Automatically write an XML representation of the composite CPN model● Structure (modules and connections)● Data types● Functions
Exporting (1)
PD1
PD2
PD3
-
PD3
Export
PD3
Translate
PD3
Exporting (2)PD1
PD2
PD1
PD2
SluiceOperator
ManualController
Gate &Motor
Allow Operatorto Control Gate
c
a b
c
Gate & Motor
-
PD3
Export
PD3
Translate
PD3
Exporting (3)PD1
PD2
PD1
PD2
SluiceOperator
ManualController
Gate &Motor
Allow Operatorto Control Gate
c
a b
Link module
c
-
PD3
Export
PD3
Translate
PD3
Exporting (4)PD1
PD2
PD1
PD2
SluiceOperator
ManualController
Gate &Motor
Allow Operatorto Control Gate
c
a b
c
Requirement module
-
PD3
Export
PD3
Translate
PD3
Modifying (1)PD1
PD2
PD1
PD2
SluiceOperator
ManualController
Gate &Motor
Allow Operatorto Control Gate
c
a b
c
Modify
CPN Tools
-
PD3
Export
PD3
Translate
PD3
Modifying (2)PD1
PD2
PD1
PD2
SluiceOperator
ManualController
Gate &Motor
Allow Operatorto Control Gate
c
a b
c
Modify
Automatically generated phenomena color sets (data types):colset Value_Buttons = bool;colset Value_Control = bool;colset Value_Sensors = bool;colset Value_Movement = bool;colset Value_Position = bool;colset Value_Direction = bool;
+ color sets for states, events, traces, timestamps etc.(need no manual modification)
Manually modified:colset Value_Buttons = unit;colset Value_Control = with On | Off;colset Value_Sensors = product BOOL * BOOL;colset Value_Movement = with Raising | Falling | Stopped;colset Value_Position = with Top | Between | Bottom;colset Value_Direction = with Up | Down;
-
PD1
PD2
PD3
Importing
PD3
Export
PD3
Translate
Modify
Translate
PD2
a b'TimedController
Gate &Motor
Open Periodically
Import
SluiceOperator
ManualController
Gate &Motor
Allow Operatorto Control Gate
c
a b
c
-
Translate
Import
PD3
Modify
PD1
PD2
PD3
Combining (1)
Export
PD3
Translate
PD2
a b'TimedController
Gate &Motor
Open Periodically
SluiceOperator
ManualController
Gate &Motor
Allow Operatorto Control Gate
c
a b
c
Combine
Prerequisities (to PD3):
●Valid structure (wrt. PD)●No conflicting modules●No interface extension
-
Translate
Import
PD3
Modify
PD1
PD2
PD3
Combining (2)
Export
PD3
Translate
PD2
a b'TimedController
Gate &Motor
Open Periodically
SluiceOperator
ManualController
Gate &Motor
Allow Operatorto Control Gate
c
a b
c
Combine
Combine
-
Translate
Import
PD3
Modify
PD1
PD2
PD3
Parallel iterations
Export
PD3
Translate
PD2
Combine
Combine
PD2
Modify
ExportImport
-
Closing the loop
PD1
PD2
PD3
Translate TranslateTranslate
PD1
PD2
PD3
Export
PD2
PD3
Modify ModifyCombine
ImportExportImport
Combine
Combine
-
The Role of VDM++ The following is specified using VDM++:
The syntax of hierarchical CPN The syntax of Problem Diagrams Algorithms:
Translate Generation of link/machine/domain/requirement modules Generation of color sets
Combine Structural validation of input models
Export XML generation Color set dependency
-
Future / Current Work
Automated checking of traces against real-time requirements expressed as high-level sequence diagrams (i.e. scenarios)
Integration with the Problem Oriented Engineering approach