A Pragmatic Approach to Model-driven Code Generation from Coloured Petri Nets Simulation Models

Size: px
Start display at page:

Download "A Pragmatic Approach to Model-driven Code Generation from Coloured Petri Nets Simulation Models"

Transcription

1 A Pragmatic Approach to Model-driven Code Generation from Coloured Petri Nets Simulation Models Lars M. Kristensen Department of Computing Bergen University College, NORWAY / WWW:.hib.no/ansatte/lmkr SIMUTools 14-1

2 Concurrent Systems The vast majority of IT systems today can be characterised as concurrent softare systems: Structured as a collection of concurrently executing softare components and applications (parallelism). Operation relies on communication, synchronisation, and resource sharing. Internet and Web-based applications, protocols Multi-core platforms and multi-threaded softare Embedded systems and netorked control systems SIMUTools 14-3

3 Concurrent Systems Most softare development projects are concerned ith concurrent softare systems. The engineering of concurrent systems is challenging due to their complex behaviour: Concurrently executing and independently scheduled softare components. Non-deterministic and asynchronous behaviour (e.g., timeouts, message loss, external events, ). Almost impossible for softare developers to have a complete understanding of the system behaviour. Reproducing errors is often difficult. Techniques to support the engineering of reliable concurrent systems are important. SIMUTools 14-4

4 Coloured Petri Nets (CPNs) General-purpose graphical modelling language for the engineering of concurrent systems. Combines Petri Nets and a programming language: Petri Nets: [C.A. Petri 62] 1 1`rk(1) In 1 1`(rk(2),Yes) Out Votes xvote In Decision xdecision (,vote) (,decision) Idle Receive Waiting Decision Receive Decision.all () if vote = Yes then 1` else empty 1 1`rk(1) if vote = No then 1` else empty 1 1`rk(2) graphical notation concurrency communication synchronisation resource sharing CPN ML (Standard ML): data manipulation compact modelling High-Level Petri Net Out Acknoledge parameterisable models SIMUTools 14-5

5 CPN Tools [.cpntools.org ] Practical use of CPNs is supported by CPN Tools: Editing and syntax check. Interactive- and automatic simulation. Application domain visualisation. Verification based on state space exploration. Simulation-based performance analysis. SIMUTools 14-6

6 Application Areas Communication protocols and data netorks. Distributed algorithms and softare systems. Embedded systems and control softare. Business processes and orkflo modelling. Manufacturing systems. [ ] 1 2 SIMUTools 14-7

7 Examples of CPN Tools users North America Asia Europe Boeing Alcatel Austria Helett-Packard Siemens Austria Samsung Information Bang & Olufsen, Denmark Systems Nokia, Finland National Semiconductor Corp. Alcatel Business Systems, France Fujitsu Computer Products Peugeot-Citroën, France Honeyell Inc. Dornier Satellitensysteme, MITRE Corp., Germany Scalable Server Division SAP AG, Germany E.I. DuPont de Nemours Inc. Volksagen AG, Germany Federal Reserve System Alcatel Telecom, Netherlands Bell Canada Rank Xerox, Netherlands Nortel Technologies, Canada Sydkraft Konsult, Seden Central Bank of Russia Siemens Sitzerland Goldman Sachs, UK Mitsubishi Electric Corp., Japan Toshiba Corp., Japan SHARP Corp., Japan Nippon Steel Corp., Japan Hongkong Telecom Interactive Multimedia System 1 SIMUTools 14-8

8 Most Recent CPN Book K. Jensen and L.M. Kristensen. Coloured Petri Nets: Modelling and Validation of Concurrent Systems, Springer, hib.no/ansatte/lmkr/cpnbook/ K. Jensen, L.M. Kristensen, L. Wells: Coloured Petri Nets and CPN Tools for Modelling and Validation of Concurrent Systems. Intl. Journal on Softare Tools for Technology Transfer, Vol. 9, pp , Springer, SIMUTools 14-9

9 Outline of this Talk Part I: Coloured Petri Nets and CPN Tools Example: To-phase commit transaction protocol Basic concepts of Coloured Petri Nets (CPNs) Short demonstration(s) of CPN Tools Part II: Automated Code Generation Case study: The IETF WebSocket Protocol Pragmatic-annotated CPN models Template-based code generation for protocol softare SIMUTools 14-10

10 Part I: The Coloured Petri Nets Modelling Language and CPN Tools Based on: Kurt Jensen (Aarhus University, Denmark) and Lars M. Kristensen: Coloured Petri Nets - A Graphical Modelling Language for Formal Modelling and Validation of Concurrent Systems. Submitted to Communications of the ACM, February SIMUTools 14-11

11 Quick Recap: Petri Net Concepts State modelling: Places (ellipses) that may hold tokens. Marking (state): distribution of tokens on the places. Initial marking: initial state. Event (action) modelling: Transitions (rectangles) Directed arcs: connecting places and transitions. Arc eights: specifying tokens to be added/removed. Execution (token game): Current marking Transition enabling Transition ocurrence SIMUTools 14-12

12 Example: To-phase Commit Transaction Protocol A concurrent system consisting of a coordinator process and a number of orker processes: Coordinator? {Yes,No} Votes xvote {Commit,Abort} Decision xdecision Acknoledge Acknoledge s Phase 1 Phase 2 Coordinator s SIMUTools 14-13

13 CPN Model: Top-level Module The CPN model is comprised of four modules hierarchically organised in three levels. Place (ellipse) Votes Colour set / type Substitution transition (double-lined border) Coordinator xvote s Decision Coordinator xdecision Acknoledge s Name of submodule associated ith substitution transition SIMUTools 14-14

14 Colour Sets and Tokens The colour set (or type) of a place determines the kinds of tokens that may reside on a place: Colour set definitions val W = 2; colset = index rk ith 1..W; colset Vote = ith Yes No; colset xvote = product * Vote; colset Decision = ith Abort Commit; colset xdecision = product * Decision; Example values rk(1), rk(2) Votes Yes, No xvote (rk(1),yes) Decision Abort, Commit xdecision (rk(1),commit) Acknoledge Colour sets are defined using the Standard ML based programming language CPN ML. SIMUTools 14-15

15 Markings and Multi-sets A marking (state) is a distribution of tokens on the places of the model. Each place may hold a multi-set of tokens over the colour set of the place: Coordinator 1 1`rk(1) Votes xvote Decision 2 1`(rk(1),No)++ 1`(rk(2),Yes) s Multi-set notation coefficient («of») token colour (value) 2`rk(1) ++ 1`rk(2) xdecision 3 2`rk(1)++ 1`rk(2) Acknoledge union («and») Coordinator s SIMUTools 14-16

16 Coordinator Module 1`() Initial marking: determines tokens in the initial state Idle () UNIT UNIT: colour set ith a single value () «unit» Send.all () Out () Waiting Votes UNIT Votes In Port places: used for exchanging tokens ith the upper-level module. CollectVotes CollectVotes xvote Decision Out Send and ReceiveAcknoledgement are ordinary transitions. Waiting Acknoledgements Receive Acknoledgements Coordinatorxs (c,orkers) () orkers xdecision Acknoledge In Arc expressions: determine the tokens added and removed by occurrences of enabled transitions. SIMUTools 14-17

17 Initial Marking The initial marking (state) is obtained by evaluating the initial marking expressions: Idle () 1`() UNIT 1`() Idle () 1`() UNIT 1 1`() Coordinator is initially Idle Send.all () Out Send.all () Out () () Waiting Votes Waiting Votes UNIT Votes In UNIT Votes In CollectVotes xvote CollectVotes xvote CollectVotes CollectVotes Decision Out Decision Out Waiting Acknoledgements xdecision Waiting Acknoledgements xdecision Coordinatorxs Coordinatorxs (c,orkers) (c,orkers) Receive Acknoledgements orkers Acknoledge In Receive Acknoledgements orkers Acknoledge In () () SIMUTools 14-18

18 Transition Enabling A transition is enabled is there are sufficient tokens on each input place: Idle () 1`() UNIT 1 1`() 1`().all () Send Out The required tokens are determined by evaluating the input arc expressions. () Waiting Votes UNIT Enabling condition: the multi-set of tokens obtained must be contained in the multi-set of tokens present on the corresponding input place. SIMUTools 14-19

19 1`() Transition Occurrence An enabled transition may occur changing the current marking (state) of its connected places: Idle 1`() UNIT () 1`rk(1)++ 1`rk(2) 2.all () Send Out 1`() () 1`rk(1) ++ Waiting Votes UNIT 1 1`() 1`rk(2) 1 1`() Tokens removed from input places: determined by evaluating the input arc expressions. A message to each orker asking hether they. Tokens added to output places: determined by evaluating the output arc expressions. Coordinator is no Waiting for Votes SIMUTools 14-20

20 Port and Socket Places Tokens added (removed) on a port place are added (removed) on the associated socket place: Coordinator module Top-level module Idle 1`() 2 1`rk(1)++ 1`rk(2) UNIT () 1`rk(1)++ 1`rk(2) 2.all () Send Out () Votes Waiting Votes 1 1`() Coordinator xvote s UNIT Associated port and socket places constitute a compound place. Coordinator Decision xdecision Acknoledge s SIMUTools 14-21

21 s Module Top-level module s module 2 1`rk(1)++ 1`rk(2) Coordinator Coordinator Votes xvote Decision xdecision Acknoledge s s The s module models the behaviour of all orkers. In Out In Out 2 Votes xvote Decision xdecision Acknoledge 1`rk(1)++ 1`rk(2) (,vote) (,decision) Idle Receive Waiting Decision if vote = Yes then 1` else empty Receive Decision.all () 2 1`rk(1)++ 1`rk(2) if vote = No then 1` else empty SIMUTools 14-22

22 Transition Variables The arc expressions on the arcs of a transition may contain free variables: Variable declarations In 2 1`rk(1)++ 1`rk(2) Idle Receive.all () 2 1`rk(1)++ 1`rk(2) if vote = No then 1` else empty val W = 2; colset = index rk ith 1..W; var : ; colset Vote = ith Yes No; var vote : Vote; Out Votes xvote (,vote) Waiting Decision if vote = Yes then 1` else empty if-then-else expressions ith free variables vote and. Transition Receive has to free variables: vote and. SIMUTools 14-23

23 Transition Bindings Variables must be bound to values for a transition to be enabled and occur: In Out 2 Votes xvote 1`rk(1)++ 1`rk(2) (,vote) Idle Receive Waiting Decision.all () if vote = Yes then 1` else empty 2 1`rk(1)++ 1`rk(2) if vote = No then 1` else empty val W = 2; colset = index rk ith 1..W; var : ; colset Vote = ith Yes No; var vote : Vote; Possible bindings b 1Y = < = rk(1),vote = Yes > b 1N = < = rk(1),vote = No > b 2Y = < = rk(2),vote = Yes > b 2Y = < = rk(2),vote = No > The bindings correspond to possible enabling and occurrence modes of the transition. SIMUTools 14-24

24 Enabling: Transition Bindings A transition binding is enabled if there are sufficient tokens on each input place: In 2 1`rk(1) 1`rk(1)++ 1`rk(2) Idle Receive.all () 2 1`rk(1)++ 1`rk(2) if vote = No then 1` else empty Tokens required on input places are determined by evaluating the input arc expressions in the binding under consideration. Enabling condition: the multiset of tokens obtained must be contained in the multi-set of tokens present on the corresponding input place. Out Votes xvote (,vote) if vote = Yes then 1` else empty 1`rk(1) Waiting Decision b 1Y = < = rk(1),vote = Yes > SIMUTools 14-25

25 Occurrence: Transition Bindings An enabled transition binding may occur changing the current marking (state): 1`rk(1) 1`rk(1) `rk(2) In In 1 1`(rk(1),Yes) Out Out Votes (,vote) xvote 1`(rk(1),Yes) 1`rk(1) Idle Receive Waiting Decision.all () if vote = Yes then 1` else empty 21 1`rk(1)++ 1`rk(2) 1`rk(2) if vote = No then 1` else empty 1 1`rk(1) empty 1`rk(1) Tokens removed from input places: determined by evaluating the input arc expression in the binding. Tokens added to output places: determined by evaluating the output arc expressions in the binding. b 1Y = < = rk(1),vote = Yes > SIMUTools 14-26

26 Occurrence: Transition Bindings A transition may have several enabled bindings:.all ().all () In Out 2 Votes xvote 1`rk(1)++ 1`rk(2) (,vote) Idle Receive Waiting Decision if vote = Yes then 1` else empty 2 1`rk(1)++ 1`rk(2) if vote = No then 1` else empty b 1Y b 1N 1 1`rk(2) In 1 1`(rk(1),Yes) Out Votes (,vote) xvote Idle Receive Waiting Decision if vote = Yes then 1` else empty 1 1`rk(2) if vote = No then 1` else empty 1 1`rk(1) Bindings b 1Y = < = rk(1),vote = Yes > b 1N = < = rk(1),vote = No > b 2Y = < = rk(2),vote = Yes > b 2Y = < = rk(2),vote = No > In Out Idle 1 1`rk(2) 2 Votes xvote 1 1`(rk(1),No) (,vote) Receive Waiting Decision.all () if vote = Yes then 1` else empty 1`rk(1)++ 1`rk(2) if vote = No then 1` else empty SIMUTools 14-27

27 CPN Tools: Demo Simulation (Editing) SIMUTools 14-28

28 Verification and Model Checking Formal verification of CPN models can be conducted using explicit state space exploration: 5 1:2 7 2:1 11 1:1 Receive(1,No) Receive(2,Yes) Receive(2,No) CollectVotes ReceiveAcknoledgements Receive (2,No) 3 1:2 Receive (2,No) 9 2:1 CollectVotes 13 1:1 ReceiveDecision(2,abort) 16 1:1 ReceiveAcknoledgements 1 4:1 Send 2 1:4 Receive(1,Yes) 6 1:2 Receive(2,No) Receive(1,Yes) 8 2:1 CollectVotes Receive (2,Yes) 12 1:1 ReceiveDecision(1,abort) 15 1:1 ReceiveAcknoledgements Receive(1,No) Receive(2,Yes) ReceiveDecision(2,commit) 17 1:1 ReceiveDecision(2,commit) 4 1:2 Receive(1,Yes) 10 2:1 CollectVotes 14 1:2 19 2:1 ReceiveDecision(1,commit) 18 1:1 ReceiveAcknoledgements ReceiveDecision(2,commit) A state space represents all possible executions of the CPN model. Standard behavioural properties can be investigated using the state space report. Model-specific properties can be verified using queries and temporal logic model checking. Several advanced techniques available to alleviate the inherent state explosion problem. SIMUTools 14-29

29 Performance Analysis CPNs include a concept of time that can be used to model the timed taken by activities: Idle Send Waiting Votes 1 1 () 1 1`()@7 2 1`rk(1)@7+++ 1`rk(2)@7 Out A global clock representing the current model time. Tokens carry time stamps describing the earliest possible model time at hich they can be removed. Time inscriptions on transitions and arcs are used to give time stamps to the tokens produced on output places. Random distribution functions can be used in arc expressions (delays, packet loss, ). Data collection monitors and batch simulations can be used to compute performance figures. SIMUTools 14-30

30 SIMUTools 14-31

31 Perspectives on CPNs Modelling language combining Petri Nets ith a programming language. The development has been driven by an applicationoriented research agenda: Key characteristics: Education Tools and softare technology Fe but still poerful and expressive modelling constructs. Practical applications Theory Implicit concurrency inherited from Petri nets: everything is concurrent unless explicit synchronised. Verification and performance analysis supported by the same modelling language. SIMUTools 14-32

32 Part II: Automated Code Generation from CPN Simulation Models Based on: Kent I.F. Simonsen and Lars M. Kristensen: Implementing the WebSocket Protocol based on Formal Modelling and Automated Code Generation. To appear in Proc. of 14th Intl. Conference on Distributed Applications and Interoperable Systems, Springer, SIMUTools 14-33

33 Motivation and Background CPNs have been idely used for modelling and validation of communication protocols*: Application Layer Protocols: IOTP, SIP, WAP, Transport Layer Protocols: TCP, DCCP, SCTP, Routing Layer Protocols: DYMO, AODV, ERDP, It ould be desirable to use CPN models more directly for implementation of protocol softare. Limited ork on automatic code generation. This part of the talk: A nely developed approach to structurebased code generation from CPN models. Application to the IETF WebSocket Protocol. SIMUTools 14-34

34 Automated Code Generation It is difficult (in general) to recognize programming language constructs in CPNs: Votes 2 In 1`rk(1)++ 1`rk(2) Idle Receive s 2 1`rk(1)++ 1`rk(2) if vote = No then 1` else empty Coordinator xvote s Votes Out xvote (,vote) if vote = Yes then 1` else empty Decision xdecision Decision In xdecision (,decision) Waiting Coordinator Acknoledge s Acknoledge Out Receive Decision Conclusion: some additional syntactical constraints and/or annotations are required. SIMUTools 14-35

35 Requirements 1. Platform independence: Enable code generation for multiple languages / platforms. 2. Integratebility of the generated code: Upards integration: the generated code must expose an explicit interface for service invocation. Donards integration: ability for the generated code to call and rely on underlying libraries. 3. Model checking and property verification: Code generation capability should not introduce complexity problems for the verification of the model. 4. Readability of the generated code: Enable code revie of the automatically generated code. Enable performance enhancements (if required). SIMUTools 14-36

36 Overvie of Approach Modelling structure requiring the CPN model to be organised into three levels: 1. Protocol system level specifying the protocol principals and the communication channels beteen them. 2. Principal level reflecting the life-cycle and services provided by each principal in the protocol system. 3. Service level specifying the behaviour of the services provided by each principal. Annotate the CPN model elements ith code generation pragmatics to direct code generation. A template-based model-to-text transformation for generating the protocol softare. SIMUTools 14-37

37 Code Generation Pragmatics Syntactical annotations (name and attributes) that can be associated ith CPN model elements: Structural pragmatics designating principals and services. Control-flo pragmatics identifying control-flo elements and control-flo constructs. Operation pragmatics identifying data manipulation. Template binding descriptors associating the pragmatics and code generation templates: Bridges the gap beteen the platform independent CPN simulation model and the target platform considered. Code can be generated for different platforms (Groovy, Clojure, Java, Python) by changing the template binding descriptors. SIMUTools 14-38

38 The IETF WebSocket Protocol Provides a bi-directional and message-oriented service on top of the HTTP protocol: client HTTP TCP open server client WebSocket TCP open server HTTP request HTTP response TCP close message message HTTP upgrade-req HTTP response data/ping/pong TCP close message message Three main phases: connection establishment, data transfer, and connection close. SIMUTools 14-39

39 WebSocket: Protocol System The complete CPN model consists of 19 modules, 136 places, and 84 transitions: ClientToServer Send ClientToServer Receive Client <<principal>> EndPoint Channel <<channel>> EndPoint Server <<principal>> ServerToClient Receive ServerToClient Send Client EndPoint Channel EndPoint Server The <<principal>> pragmatic is used on substitution transitions to designate principals. The <<channel>> pragmatic is used to designate channels connecting the principals. SIMUTools 14-40

40 Client: Principal Level Makes explicit the services provided and their alloed order of invocation (API life-cycle): () READY 1 1`() <<LCV>> OpenConnection <<service(uri)>> ClientEstablishWebSocketConnection <<service>> specifies services that can be invoked externally. getmessage <<service()>> DataBuffer <<state>> ClientGetMessage 1 1`[] 1 1`[] [] Frames RecievePingPong <<service()>> ClientRecievePingPong PingPongBuffer <<state>> Frames OPEN <<LCV>> ClientSendMessage <<service(msg)>> ClientSendMessage SendPingPong <<service(ping)>> ClientSendPingPong <<internal>> specifies services that are invoked internally in the principal. MessageBroker MessageBroker <<internal>> 1`[] closebuffer <<state>> 1 Frames ServerClose <<internal()>> 1 1`() Close ClientClose <<service>> ClientInitiated <<LCV>> specifies lifecycle variables for services. <<state>> specifies state variables of the principal. ServerInitiated In/Out ServerToClient EndPoint CLOSED <<LCV>> ClientToServer In/Out EndPoint SIMUTools 14-41

41 Client: MessageBroker Service 1 1`() startrecieve OPEN In/Out Receive DataFrame <<rnternal()>> [true] Internal service started hen the client is in the OPEN state. (TCP, (WSFRAME frame) ::content) ServerToClient In/Out (TCP,content) EndPoint ait receive <<Id>> receive <<recieve(ch, message)>> <<mergemessages(message, fragments,clientclose)>> <<getopcode(message, opcode)>> <<validatemsg(message, fragments,clientclose)>> if(islastframe(frame)) then [] else frames frames fragments <<state>> [] 1 1`[] Frames Service entry point <<internal>> [IsPingFrame(frame) orelse IsPongFrame(frame)] dispatch <<Id(cond: '(data data) (pingpong pingpong) (close close) (nonfinal nonfinal)')>> frame frame frame [IsCloseFrame frame] frame Frame frame [frame]^^ frames [IsDataFrame frame] nonfinal <<dist(fragments)>> [IsNonFinal(frame)] frames Service-local state is specified using <<state>> frames^^[frame] pingpong <<dist(pingpongbuffer)>> <<callinternal(recievepingpong)>> PingPongBuffer <<state>> Frames frames 1 1`[] Out close <<dist(closebuffer)>> <<callinternal(serverclose)>> frames closebuffer <<state>> Frames frames^^[frame] 1 1`[] Out data <<dist(inbuffer)>> frames inbuffer <<state>> frames^^[frame] 1 1`[] Out Control-flo locations is made explicit using <<ID>> pragmatic on places. continue <<Id>> Frames next end dispatch end <<Id(cond: '(istrue OPEN)>> return <<return>> terminated <<Id>> Service exit point <<return>> SIMUTools 14-42

42 WebSocket Verification State space exploration prior to code generation used to model check basic connection properties: P1 All terminal states correspond to states in hich the WebSocket connection has been properly closed. fun isproperclosed : state -> bool List.all isproperclosed (ListTerminalStates ()) P2 From any reachable state, it is alays possible to reach a state in hich the WebSocket connection has been properly closed. HomeSpace (PredAllNodes isproperclosed) ClientM ServerM #Nodes #Arcs Time (secs) #Terminal states + - 2,747 9, ,867 9, , , SIMUTools 14-43

43 Automated Code Generation Template-based code generation consisting of three main steps: Step 1 Step 2 Step 3 OPEN In/Out [true] 1 1`() startrecieve Receive DataFrame <<rnternal()>> ait receive <<Id>> (TCP, (WSFRAME frame) ::content) ServerToClient In/Out (TCP,content) EndPoint receive <<recieve(ch, message)>> <<mergemessages(message, fragments,clientclose)>> <<getopcode(message, opcode)>> <<validatemsg(message, fragments,clientclose)>> if(islastframe(frame)) then [] else frames frames fragments <<state>> [] 1 1`[] Frames frame [frame]^^ frames frames [IsPingFrame(frame) orelse IsPongFrame(frame)] dispatch frame nonfinal <<Id(cond: '(data data) (pingpong pingpong) (close close) (nonfinal nonfinal)')>> <<dist(fragments)>> Frame [IsNonFinal(frame)] frame frame frame [IsCloseFrame frame] [IsDataFrame frame] pingpong <<dist(pingpongbuffer)>> <<callinternal(recievepingpong)>> close <<dist(closebuffer)>> <<callinternal(serverclose)>> data <<dist(inbuffer)>> frames^^[frame] frames 1 1`[] PingPongBuffer Out <<state>> Frames frames frames^^[frame] 1 1`[] closebuffer Out <<state>> Frames continue <<Id>> frames frames^^[frame] 1 1`[] inbuffer Out <<state>> Frames next end dispatch end <<Id(cond: '(istrue OPEN)>> return <<return>> terminated <<Id>> Computing Derived Pragmatics Abstract Template Tree (ATT) Construction Pragmatics binding and emitting code SIMUTools 14-44

44 PetriCode [.petricode.org] Command-line tool reading pragmatic-annotated CPN models created ith CPN Tools: Pragmatic module: parses CPN models and computes derived pragmatics. ATT construction module: performs block decomposition and constructs the ATT. Code generation module: binds templates to pragmatics and generates source code via ATT traversal. Implemented in Groovy and uses the Groovy template engine for code generation. 1 SIMUTools 14-45

45 Step 1: Derived Pragmatics Derived pragmatics computed for control-flo constructs and for data (state) manipulation. next [IsPingFrame(frame) orelse orelse IsPongFrame(frame)] PingPongBuffer <<state>> Frames startrecieve startrecieve (TCP, (WSFRAME frame) ::content) ServerToClient In/Out (TCP,content) EndPoint frames^^[frame] Out 1 1`() () pingpong <<dist(pingpongbuffer)>> <<callinternal(recievepingpong)>> frames 1 1`[] OPEN OPEN In/Out In/Out Receive DataFrame Receive <<rnternal()>> DataFrame <<rnternal()>> ait receive ait <<Id>> receive <<Id>> dispatch dispatch <<Id(cond: <<Id(cond: '(data '(data data) data) (pingpong (pingpong pingpong) pingpong) (close (close close) close) (nonfinal (nonfinal nonfinal)')>> nonfinal)')>> frame frame <<merge>> <<endloop>> continue <<Id>> closebuffer <<state>> Frames end <<Id(cond: '(istrue OPEN)>> [true] [true] receive receive <<recieve(ch, message)>> <<recieve(ch, message)>> <<mergemessages(message, fragments,clientclose)>> <<mergemessages(message, fragments,clientclose)>> <<getopcode(message, opcode)>> <<getopcode(message, opcode)>> <<validatemsg(message, fragments,clientclose)>> <<validatemsg(message, fragments,clientclose)>> frame frame frame frame [IsCloseFrame frame] frame] close close <<dist(closebuffer)>> <<callinternal(serverclose)>> frames end dispatch frames^^[frame] <<atomic>> block <<startloop> 1 1`[] Out if(islastframe(frame)) then [] else frames frames <<branch>> frame frame Frame Frame data data <<dist(inbuffer)>> return <<return>> [IsDataFrame [IsDataFrame frame] frame] frames frame Frames [frame]^^ frames fragments <<state>> [] nonfinal <<dist(fragments)>> [IsNonFinal(frame)] frames^^[frame] frames 1 <<loop>> block 1`[] inbuffer Out <<state>> <<atomic>> block terminated <<Id>> <<Id>> 1 1`[] Frames A DSL is used for specifying pragmatic descriptors. principal(origin: explicit, constraints: [levels: protocol, connectedtypes: SubstitutionTransition]) endloop(origin: derived, derviationrules: [ne PNPattern(pragmatics: [Id], minoutedges: 2, backlinks: 1)], constraints: [levels: service, connectedtypes:place]) <<sequence>> control block SIMUTools 14-46

46 Step 2: Abstract Template Tree An intermediate syntax tree representation of the pragmatic-annotated CPN model: Client <<principal>> Protocol System messagebroker<<internal>> <<internal>> <<sequence>> <<return>> <<atomic>> <<loop>> <<atomic>> <<startloop>> <<endloop>> Server <<principal>> A DSL for template bindings and linkage to the target platform. classtemplate( pragmatic: principal, template:./groovy/mainclass.tmpl, iscontainer: true) endloop( pragmatic: endloop, template:./groovy/endloop.tmpl ) <%import static org.k1s.petricode.generation.codegenerator.removeprags%>class ${name} { <% if(binding.variables.containskey('lcvs')){ for(lcv in lcvs){ %>def ${removeprags(lcv.name.text)} ${lcv.initialmarking.asstring() == '()'? '= true' : ''}\n<% } } if(binding.variables.containskey('fields')){ for(field in fields){ %>def ${removeprags(field.name.text)}<% } } %> %%yield%% } SIMUTools 14-47

47 Step 3: Emitting Code Traversal of the ATT, invocation of code generation templates, and code stitching: <%import static org.k1s.petricode.generation.codegenerator.removeprags%>class ${name} { <% if(binding.variables.containskey('lcvs')){ for(lcv in lcvs){ %>def ${removeprags(lcv.name.text)} ${lcv.initialmarking.asstring() == '()'? '= true' : ''}\n<% } } if(binding.variables.containskey('fields')){ for(field in fields){ %>def ${removeprags(field.name.text)}<% } } %> %%yield%% } SIMUTools 14-48

48 SIMUTools 14-49

49 Chat Application* WebSocket tutorial example provided ith the Java EE 7 GlassFish Application Server: Chat Server [CPN WebSocket model] Web-based Chat Client [WebSocket Broser] Chat Client [CPN WebSocket model] SIMUTools 14-50

50 Autobahn Testsuite [autobahn.s/testsuite/] Test-suite used by several industrial WebSocket implementation projects (Google Chrome, Apache Tomcat,..). Errors encountered ith the generated code: One global logical error related to the handling of fragmented messages (CPN model change). Several local errors in the code-generation templates ere encountered (template change). SIMUTools 14-51

51 Conclusions An approach alloing CPN simulation and verification models to be used for code generation: Pragmatic annotations and enforcing modelling structure. Binding pragmatics to code generation templates. Implemented in the PetriCode tool to allo for practical applications and initial evaluation. The approach has been evaluated via application to the IETF WebSocket Protocol: State space verification as feasible for verifying some basic connection properties prior to code generation. The implementation as tested for interoperability against a comprehensive benchmark test-suite ith promising results. A proof-of-concept on the scalability and feasibility of the approach for the implementation of real protocols. SIMUTools 14-52

52 SIMUTools 14-53

Implementing the WebSocket Protocol based on Formal Modelling and Automated Code Generation

Implementing the WebSocket Protocol based on Formal Modelling and Automated Code Generation Implementing the WebSocket Protocol based on Formal Modelling and Automated Code Generation Lars M. Kristensen Kent I.F. Simonsen 1,2 Bergen University College 1 Technical University of Denmark 2 Norway

More information

Coloured Petri Nets Modelling and Validation of Concurrent Systems. Chapter 1: Modelling and Validation

Coloured Petri Nets Modelling and Validation of Concurrent Systems. Chapter 1: Modelling and Validation Coloured Petri Nets Modelling and Validation of Concurrent Systems Chapter 1: Modelling and Validation Lars M. Kristensen Department of Computing Bergen University College, NORWAY Email: lmkr@hib.no /

More information

Pragmatics Annotated Coloured Petri Nets for Protocol Software Generation and Verification

Pragmatics Annotated Coloured Petri Nets for Protocol Software Generation and Verification Pragmatics Annotated Coloured Petri Nets for Protocol Software Generation and Verification Kent I.F. Simonsen 1, 2 Lars M. Kristensen 1 Ekkart Kindler 2 Department of Computing 1 Bergen University College

More information

Pragmatics Annotated Coloured Petri Nets for Protocol Software Generation and Verification

Pragmatics Annotated Coloured Petri Nets for Protocol Software Generation and Verification Downloaded from orbit.dtu.dk on: Nov 08, 2017 Pragmatics Annotated Coloured Petri Nets for Protocol Software Generation and Verification Fagerland Simonsen, Kent Inge ; Kristensen, Lars Michael; Kindler,

More information

PetriCode: A Tool for Template-based Code Generation from CPN Models

PetriCode: A Tool for Template-based Code Generation from CPN Models Downloaded from orbit.dtu.dk on: Jan 03, 2018 PetriCode: A Tool for Template-based Code Generation from CPN Models Simonsen, Kent Inge Publication date: 2013 Document Version Publisher's PDF, also known

More information

A Brief Introduction to Coloured Petri Nets

A Brief Introduction to Coloured Petri Nets A Brief Introduction to Coloured Petri Nets Kurt Jensen Computer Science Department, University of Aarhus NyMunkegade, Bldg. 540, DK-8000 AarhusC, Denmark E-mml: kjensen9 WWV~: http://www.daimi.aau.dk/~kjensen/

More information

Pragmatics Annotated Coloured Petri Nets for Protocol Software Generation and Verification

Pragmatics Annotated Coloured Petri Nets for Protocol Software Generation and Verification Downloaded from orbit.dtu.dk on: Jan 13, 2019 Pragmatics Annotated Coloured Petri Nets for Protocol Software Generation and Verification Simonsen, Kent Inge; Kristensen, Lars Michael; Kindler, Ekkart Publication

More information

CODING TCPN MODELS INTO THE SIMIO SIMULATION ENVIRONMENT

CODING TCPN MODELS INTO THE SIMIO SIMULATION ENVIRONMENT CODING TCPN MODELS INTO THE SIMIO SIMULATION ENVIRONMENT Miguel Mujica (a), Miquel Angel Piera (b) (a,b) Autonomous University of Barcelona, Faculty of Telecommunications and Systems Engineering, 08193,

More information

Modeling of Session Initiation Protocol Invite Transaction using Colored Petri Nets

Modeling of Session Initiation Protocol Invite Transaction using Colored Petri Nets Modeling of Session Initiation Protocol Invite Transaction using Colored Petri Nets Sabina Baraković, Dragan Jevtić, and Jasmina Baraković Husić Abstract Wireless mobile communications have experienced

More information

Building Petri nets tools around Neco compiler

Building Petri nets tools around Neco compiler Building Petri nets tools around Neco compiler Lukasz Fronc and Franck Pommereau {fronc,pommereau}@ibisc.univ-evry.fr IBISC, Université d Évry/Paris-Saclay IBGBI, 23 boulevard de France 91037 Évry Cedex,

More information

An Evaluation of Automated Code Generation with the PetriCode Approach

An Evaluation of Automated Code Generation with the PetriCode Approach An Evaluation of Automated Code Generation with the PetriCode Approach Kent Inge Fagerland Simonsen 1,2 1 Department of Computing, Bergen University College, Norway Email: kifs@hib.no 2 DTU Compute, Technical

More information

Expressing Environment Assumptions and Real-time Requirements for a Distributed Embedded System with Shared Variables

Expressing Environment Assumptions and Real-time Requirements for a Distributed Embedded System with Shared Variables Expressing Environment Assumptions and Real-time Requirements for a Distributed Embedded System with Shared Variables Simon Tjell and João M. Fernandes Abstract In a distributed embedded system, it is

More information

Formal Support for QVT-Relations with Coloured Petri Nets

Formal Support for QVT-Relations with Coloured Petri Nets Formal Support for QVT-Relations with Coloured Petri Nets Juan de Lara Univ. Autónoma de Madrid (Spain) MODELS 2009 Denver, Colorado, USA Esther Guerra 1 Univ. Carlos III de Madrid (Spain) Motivation Model-to-Model

More information

Computation of enabled transition instances for colored Petri nets

Computation of enabled transition instances for colored Petri nets Computation of enabled transition instances for colored Petri nets Fei Liu and Monika Heiner Department of Computer Science, Brandenburg University of Technology Postbox 10 13 44, 03013 Cottbus, Germany

More information

Structure of Abstract Syntax trees for Colored Nets in PNML

Structure of Abstract Syntax trees for Colored Nets in PNML Structure of Abstract Syntax trees for Colored Nets in PNML F. Kordon & L. Petrucci Fabrice.Kordon@lip6.fr Laure.Petrucci@lipn.univ-paris13.fr version 0.2 (draft) June 26, 2004 Abstract Formalising the

More information

COLORED PETRI NETS IN THE SIMULATION OF ETL STANDARD TASKS THE SURROGATE KEY PIPELINING CASE

COLORED PETRI NETS IN THE SIMULATION OF ETL STANDARD TASKS THE SURROGATE KEY PIPELINING CASE COLORED PETRI NETS IN THE SIMULATION OF ETL STANDARD TASKS THE SURROGATE KEY PIPELINING CASE Diogo Silva Orlando Belo João M. Fernandes ALGORITMI R&D Centre University of Minho Portugal E-mail: diogosantossilva@gmail.com,

More information

Practice: Large Systems Part 2, Chapter 2

Practice: Large Systems Part 2, Chapter 2 Practice: Large Systems Part 2, Chapter 2 Overvie Introduction Strong Consistency Crash Failures: Primary Copy, Commit Protocols Crash-Recovery Failures: Paxos, Chubby Byzantine Failures: PBFT, Zyzzyva

More information

The UPPAAL Model Checker. Julián Proenza Systems, Robotics and Vision Group. UIB. SPAIN

The UPPAAL Model Checker. Julián Proenza Systems, Robotics and Vision Group. UIB. SPAIN The UPPAAL Model Checker Julián Proenza Systems, Robotics and Vision Group. UIB. SPAIN The aim of this presentation Introduce the basic concepts of model checking from a practical perspective Describe

More information

Design/CPN ASK-CTL Manual

Design/CPN ASK-CTL Manual Design/CPN ASK-CTL Manual Version 0.9 University of Aarhus Computer Science Department Ny Munkegade, Bldg. 540 DK-8000 Aarhus C, Denmark Tel: +45 89 42 31 88 Fax: +45 89 42 32 55 1996 University of Aarhus

More information

Modelling and Simulation of a Network Management System using Hierarchical Coloured Petri Nets. Extended version

Modelling and Simulation of a Network Management System using Hierarchical Coloured Petri Nets. Extended version Modelling and Simulation of a Network Management System using Hierarchical Coloured Petri Nets. Extended version Søren Christensen Computer Science Department Aarhus University Ny Munkegade, Bldg. 540

More information

Security Analysis of Session Initiation Protocol - A Methodology Based on Coloured Petri Nets

Security Analysis of Session Initiation Protocol - A Methodology Based on Coloured Petri Nets Edith Cowan University Research Online International Cyber Resilience conference Conferences, Symposia and Campus Events 2010 Security Analysis of Session Initiation Protocol - A Methodology Based on Coloured

More information

Management Science Letters

Management Science Letters Management Science Letters 4 (2014) 111 116 Contents lists available at GrowingScience Management Science Letters homepage: www.growingscience.com/msl A new method for converting extended version of petri

More information

ON-LINE QUALITATIVE MODEL-BASED DIAGNOSIS OF TECHNOLOGICAL SYSTEMS USING COLORED PETRI NETS

ON-LINE QUALITATIVE MODEL-BASED DIAGNOSIS OF TECHNOLOGICAL SYSTEMS USING COLORED PETRI NETS ON-LINE QUALITATIVE MODEL-BASED DIAGNOSIS OF TECHNOLOGICAL SYSTEMS USING COLORED PETRI NETS Adrien Leitold 1 Miklós Gerzson 2 Anna I. Pózna 2 and Katalin M. Hangos 2,3 1 Department of Mathematics 3 Process

More information

Formal Process Modelling

Formal Process Modelling Formal Process Modelling Petri Net Behaviour Net Model Event-driven Process Chains Formalisation Håvard D. Jørgensen Materiale fra: Jon Atle Gulla, NTNU Folker den Braber, SINTEF Anders Moen, Norsk Regnesentral

More information

Introduction to MARIA and High-Level Petri Nets

Introduction to MARIA and High-Level Petri Nets Introduction to MARIA and High-Level Petri Nets Marko Mäkelä Laboratory for Theoretical Computer Science Helsinki University of Technology P.O.Box 9700 02015 HUT Finland October 9, 2001 Modelling Concurrent

More information

DISTRIBUTED HIGH-SPEED COMPUTING OF MULTIMEDIA DATA

DISTRIBUTED HIGH-SPEED COMPUTING OF MULTIMEDIA DATA DISTRIBUTED HIGH-SPEED COMPUTING OF MULTIMEDIA DATA M. GAUS, G. R. JOUBERT, O. KAO, S. RIEDEL AND S. STAPEL Technical University of Clausthal, Department of Computer Science Julius-Albert-Str. 4, 38678

More information

Characterising Resource Management Performance in Kubernetes. Appendices.

Characterising Resource Management Performance in Kubernetes. Appendices. Characterising Resource Management Performance in Kubernetes. Appendices. Víctor Medel a, Rafael Tolosana-Calasanz a, José Ángel Bañaresa, Unai Arronategui a, Omer Rana b a Aragon Institute of Engineering

More information

Petri Nets and Fuzzy Sets in Hybrid Controllers Synthesis: The Discrete-Event Aspect

Petri Nets and Fuzzy Sets in Hybrid Controllers Synthesis: The Discrete-Event Aspect Petri Nets and Fuzzy Sets in Hybrid Controllers Synthesis: The Discrete-Event Aspect LUCIEN NGALAMOU University of the West Indies Dept. of Electrical and Computer Eng. St Augustine Campus TRINIDAD and

More information

Modeling and Analysis of General Internet Signaling Transport Protocol (GIST) using Coloured Petri Nets

Modeling and Analysis of General Internet Signaling Transport Protocol (GIST) using Coloured Petri Nets Modeling and Analysis of General Internet Signaling Transport Protocol (GIST) using Coloured Petri Nets Atul Kumar Lecturer(CSE & IT Dept.) Baba Banda Singh Bahadur Polytechnic College Fatehgarh Sahib(Punjab),

More information

Middleware. Adapted from Alonso, Casati, Kuno, Machiraju Web Services Springer 2004

Middleware. Adapted from Alonso, Casati, Kuno, Machiraju Web Services Springer 2004 Middleware Adapted from Alonso, Casati, Kuno, Machiraju Web Services Springer 2004 Outline Web Services Goals Where do they come from? Understanding middleware Middleware as infrastructure Communication

More information

Using Coloured Petri Nets to aid the Design of Object based Systems

Using Coloured Petri Nets to aid the Design of Object based Systems Using Coloured Petri Nets to aid the Design of Object based Systems A. Tokmakoff, J. Billington University of South Australia, Warrendi Road, The Levels, 5095, Australia E Mail : [A.Tokmakoff, J.Billington]@UniSA.Edu.Au

More information

Discrete-event simulation of railway systems with hybrid models

Discrete-event simulation of railway systems with hybrid models Discrete-event simulation of railway systems with hybrid models G. Decknatel & E. Schnieder Imtitutfur Regelungs- undautomatisierungstechnik, Technische Universitat Braunschweig, Braunschweig, Germany.

More information

Specific Proposals for the Use of Petri Nets in a Concurrent Programming Course

Specific Proposals for the Use of Petri Nets in a Concurrent Programming Course Specific Proposals for the Use of Petri Nets in a Concurrent Programming Course João Paulo Barros Instituto Politécnico de Beja, Escola Superior de Tecnologia e Gestão Rua Afonso III, n.º 1 7800-050 Beja,

More information

Operational Semantics. One-Slide Summary. Lecture Outline

Operational Semantics. One-Slide Summary. Lecture Outline Operational Semantics #1 One-Slide Summary Operational semantics are a precise way of specifying how to evaluate a program. A formal semantics tells you what each expression means. Meaning depends on context:

More information

COMP 763. Eugene Syriani. Ph.D. Student in the Modelling, Simulation and Design Lab School of Computer Science. McGill University

COMP 763. Eugene Syriani. Ph.D. Student in the Modelling, Simulation and Design Lab School of Computer Science. McGill University Eugene Syriani Ph.D. Student in the Modelling, Simulation and Design Lab School of Computer Science McGill University 1 OVERVIEW In the context In Theory: Timed Automata The language: Definitions and Semantics

More information

Composability Test of BOM based models using Petri Nets

Composability Test of BOM based models using Petri Nets I. Mahmood, R. Ayani, V. Vlassov and F. Moradi 7 Composability Test of BOM based models using Petri Nets Imran Mahmood 1, Rassul Ayani 1, Vladimir Vlassov 1, and Farshad Moradi 2 1 Royal Institute of Technology

More information

MODELING INTERACTIVE SYSTEMS WITH HIERARCHICAL COLORED PETRI NETS

MODELING INTERACTIVE SYSTEMS WITH HIERARCHICAL COLORED PETRI NETS MODELING INTERACTIVE SYSTEMS WITH HIERARCHICAL COLORED PETRI NETS Mohammed Elkoutbi and Rudolf K. Keller Université de Montréal, DIRO, C.P. 6128, Succursale Centre-ville, Montréal, Canada, H3C 3J7 {elkoutbi,

More information

Programming Safe Agents in Blueprint. Alex Muscar University of Craiova

Programming Safe Agents in Blueprint. Alex Muscar University of Craiova Programming Safe Agents in Blueprint Alex Muscar University of Craiova Programmers are craftsmen, and, as such, they are only as productive as theirs tools allow them to be Introduction Agent Oriented

More information

STARCOUNTER. Technical Overview

STARCOUNTER. Technical Overview STARCOUNTER Technical Overview Summary 3 Introduction 4 Scope 5 Audience 5 Prerequisite Knowledge 5 Virtual Machine Database Management System 6 Weaver 7 Shared Memory 8 Atomicity 8 Consistency 9 Isolation

More information

IBM Lotus Instant Messaging Gateway

IBM Lotus Instant Messaging Gateway A Lotus Softare White Paper September 2004 softare IBM Lotus Instant Messaging Gateay G210-1822-00 Disclaimer THE INFORMATION CONTAINED IN THIS DOCUMENTATION IS PROVIDED FOR INFORMA TIONAL PURPOSES ONLY.

More information

Coverability Graph and Fairness

Coverability Graph and Fairness Coverability Graph and Fairness prof.dr.ir. Wil van der Aalst www.vdaalst.com Recall reachability analysis or1 x r1 rg1 g1 go1 o1 r2 rg2 g2 go2 o2 or2 Petri net standard properties Boundedness Terminating

More information

Model-based Prototyping of an Interoperability Protocol for Mobile Ad-hoc Networks

Model-based Prototyping of an Interoperability Protocol for Mobile Ad-hoc Networks Model-based Prototyping of an Interoperability Protocol for Mobile Ad-hoc s L.M. Kristensen, M. Westergaard, and P.C. Nørgaard 2 Department of Computer Science, University of Aarhus, Denmark 2Ericsson

More information

A Simulator for high level Petri Nets: Model based design and implementation

A Simulator for high level Petri Nets: Model based design and implementation A Simulator for high level Petri Nets: Model based design and implementation Mindaugas Laganeckas Kongens Lyngby 2012 IMM-M.Sc.-2012-101 Technical University of Denmark Informatics and Mathematical Modelling

More information

ISO/IEC INTERNATIONAL STANDARD. Software and system engineering High-level Petri nets Part 1: Concepts, definitions and graphical notation

ISO/IEC INTERNATIONAL STANDARD. Software and system engineering High-level Petri nets Part 1: Concepts, definitions and graphical notation INTERNATIONAL STANDARD ISO/IEC 15909-1 First edition 2004-12-01 Software and system engineering High-level Petri nets Part 1: Concepts, definitions and graphical notation Ingénierie du logiciel et du système

More information

junit RV Adding Runtime Verification to junit

junit RV Adding Runtime Verification to junit junit RV Adding Runtime Verification to junit Normann Decker, Martin Leucker, and Daniel Thoma Institute for Software Engineering and Programming Languages Universität zu Lübeck, Germany {decker, leucker,

More information

Industrial Data Communications - Fundamentals

Industrial Data Communications - Fundamentals Industrial Data Communications - Fundamentals Tutorial 1 This tutorial on the fundamentals of communications is broken don into the folloing sections: Communication Modes Synchronous versus Asynchronous

More information

Formal Validation for Software Modeling

Formal Validation for Software Modeling www.ijcsi.org 308 Formal Validation for Software Modeling Baojun Tian 1, Yanlin Gu 2 1 College of Information Engineering, Inner Mongolia University of Technology, Huhhot, 010080, China 2 Vocational College,

More information

Request for Comments: 3989 Category: Informational T. Taylor Nortel February Middlebox Communications (MIDCOM) Protocol Semantics

Request for Comments: 3989 Category: Informational T. Taylor Nortel February Middlebox Communications (MIDCOM) Protocol Semantics Network Working Group Request for Comments: 3989 Category: Informational M. Stiemerling J. Quittek NEC T. Taylor Nortel February 2005 Status of This Memo Middlebox Communications (MIDCOM) Protocol Semantics

More information

All you need is fun. Cons T Åhs Keeper of The Code

All you need is fun. Cons T Åhs Keeper of The Code All you need is fun Cons T Åhs Keeper of The Code cons@klarna.com Cons T Åhs Keeper of The Code at klarna Architecture - The Big Picture Development - getting ideas to work Code Quality - care about the

More information

Supporting the Workflow Management System Development Process with YAWL

Supporting the Workflow Management System Development Process with YAWL Supporting the Workflow Management System Development Process with YAWL R.S. Mans 1, W.M.P. van der Aalst 1 Department of Mathematics and Computer Science, Eindhoven University of Technology, P.O. ox 513,

More information

JVA-563. Developing RESTful Services in Java

JVA-563. Developing RESTful Services in Java JVA-563. Developing RESTful Services in Java Version 2.0.1 This course shows experienced Java programmers how to build RESTful web services using the Java API for RESTful Web Services, or JAX-RS. We develop

More information

Modeling Software Architecture with UML

Modeling Software Architecture with UML Modeling Software Architecture with UML + CPN Jianli Xu Nokia Research Center Joint Tutorial of CPN 04 & MOCA 04 Aarhus 11.10.2004 1 NOKIA CPN&MOCA tutorial.ppt / 11-10-2004 / JXU Outline of the talk An

More information

Modeling Hybrid Systems with Petri Nets

Modeling Hybrid Systems with Petri Nets Modeling Hybrid Systems with Petri Nets Debjyoti Bera, Kees van Hee and Henk Nijmeijer Abstract The behavior of a hybrid system is a mixture of continuous behavior and discrete event behavior. The Simulink/Stateflow

More information

Exercise Unit 2: Modeling Paradigms - RT-UML. UML: The Unified Modeling Language. Statecharts. RT-UML in AnyLogic

Exercise Unit 2: Modeling Paradigms - RT-UML. UML: The Unified Modeling Language. Statecharts. RT-UML in AnyLogic Exercise Unit 2: Modeling Paradigms - RT-UML UML: The Unified Modeling Language Statecharts RT-UML in AnyLogic Simulation and Modeling I Modeling with RT-UML 1 RT-UML: UML Unified Modeling Language a mix

More information

Java- and CORBA-Based Network Management. Mika Leppinen, Pekka Pulkkinen, and Aapo Rautiainen

Java- and CORBA-Based Network Management. Mika Leppinen, Pekka Pulkkinen, and Aapo Rautiainen Project Reports Java- and CORBA-Based Network Management Mika Leppinen, Pekka Pulkkinen, and Aapo Rautiainen Nokia Research Center Nokia developed the Distributed Computing Platform prototype to support

More information

Process Modelling. Fault Tolerant Systems Research Group. Budapest University of Technology and Economics

Process Modelling. Fault Tolerant Systems Research Group. Budapest University of Technology and Economics Process Modelling Budapest University of Technology and Economics Fault Tolerant Systems Research Group Budapest University of Technology and Economics Department of Measurement and Information Systems

More information

Lecture Outline. COOL operational semantics. Operational Semantics of Cool. Motivation. Lecture 13. Notation. The rules. Evaluation Rules So Far

Lecture Outline. COOL operational semantics. Operational Semantics of Cool. Motivation. Lecture 13. Notation. The rules. Evaluation Rules So Far Lecture Outline Operational Semantics of Cool Lecture 13 COOL operational semantics Motivation Notation The rules Prof. Aiken CS 143 Lecture 13 1 Prof. Aiken CS 143 Lecture 13 2 Motivation We must specify

More information

Introduction to Model Checking

Introduction to Model Checking Introduction to Model Checking René Thiemann Institute of Computer Science University of Innsbruck WS 2007/2008 RT (ICS @ UIBK) week 4 1/23 Outline Promela - Syntax and Intuitive Meaning Promela - Formal

More information

Validation of enterprise architecture through colored Petri nets

Validation of enterprise architecture through colored Petri nets Management Science Letters 5 (2015) 311 320 Contents lists available at GrowingScience Management Science Letters homepage: www.growingscience.com/msl Validation of enterprise architecture through colored

More information

CPN Tools 4: Multi-formalism and Extensibility

CPN Tools 4: Multi-formalism and Extensibility 4: Multi-formalism and Extensibility Michael Westergaard 1,2, 1 Department of Mathematics and Computer Science, Eindhoven University of Technology, The Netherlands m.westergaard@tue.nl 2 National Research

More information

Efficient Implementation of Prioritized Transitions for High-level Petri Nets

Efficient Implementation of Prioritized Transitions for High-level Petri Nets Efficient Implementation of Prioritized Transitions for High-level Petri Nets Michael Westergaard and H.M.W. (Eric) Verbeek Department of Mathematics and Computer Science, Eindhoven University of Technology,

More information

CPN Tools for Editing, Simulating, and Analysing. Coloured Petri Nets.

CPN Tools for Editing, Simulating, and Analysing. Coloured Petri Nets. CPN Tools for Editing, Simulating, and Analysing Coloured Petri Nets Anne Vinter Ratzer, Lisa Wells, Henry Michael Lassen, Mads Laursen, Jacob Frank Qvortrup, Martin Stig Stissing, Michael Westergaard,

More information

Towards A High-Level Petri Net Type Definition

Towards A High-Level Petri Net Type Definition Towards A High-Level Petri Net Type Definition Michael Westergaard Department of Computer Science, University of Aarhus, IT-parken, Aabogade 34, DK-8200 Aarhus N, Denmark, Email: mw@daimi.au.dk Abstract.

More information

CSE398: Network Systems Design

CSE398: Network Systems Design CSE398: Network Systems Design Instructor: Dr. Liang Cheng Department of Computer Science and Engineering P.C. Rossin College of Engineering & Applied Science Lehigh University February 23, 2005 Outline

More information

Recap: Functions as first-class values

Recap: Functions as first-class values Recap: Functions as first-class values Arguments, return values, bindings What are the benefits? Parameterized, similar functions (e.g. Testers) Creating, (Returning) Functions Iterator, Accumul, Reuse

More information

Software Engineering 2 A practical course in software engineering. Ekkart Kindler

Software Engineering 2 A practical course in software engineering. Ekkart Kindler Software Engineering 2 A practical course in software engineering I. Introduction Introduction Motivation: Software engineering & management Agile development The role of models in software engineering

More information

CS505: Distributed Systems

CS505: Distributed Systems Department of Computer Science CS505: Distributed Systems Lecture 13: Distributed Transactions Outline Distributed Transactions Two Phase Commit and Three Phase Commit Non-blocking Atomic Commit with P

More information

A Model-Driven Approach to Adapt SysML Blocks

A Model-Driven Approach to Adapt SysML Blocks A Model-Driven Approach to Adapt SysML Blocks Hamida Bouaziz, Samir Chouali, Ahmed Hammad, and Hassan Mountassir FEMTO-ST Institute, University of Franche-Comté, Besançon, France {hamida.bouaziz,schouali,ahammad,hmountas}@femto-st.fr

More information

Programming Languages Third Edition. Chapter 9 Control I Expressions and Statements

Programming Languages Third Edition. Chapter 9 Control I Expressions and Statements Programming Languages Third Edition Chapter 9 Control I Expressions and Statements Objectives Understand expressions Understand conditional statements and guards Understand loops and variation on WHILE

More information

TAPAAL: Editor, Simulator and Verifier of Timed-Arc Petri Nets

TAPAAL: Editor, Simulator and Verifier of Timed-Arc Petri Nets TAPAAL: Editor, Simulator and Verifier of Timed-Arc Petri Nets Joakim Byg, Kenneth Yrke Jørgensen, and Jiří Srba Department of Computer Science, Aalborg University, Selma Lagerlöfs Vej 300, 9220 Aalborg

More information

Introduction to Lexical Analysis

Introduction to Lexical Analysis Introduction to Lexical Analysis Outline Informal sketch of lexical analysis Identifies tokens in input string Issues in lexical analysis Lookahead Ambiguities Specifying lexical analyzers (lexers) Regular

More information

Persiform: Performance Engineering Based on

Persiform: Performance Engineering Based on Persiform: Performance Engineering Based on Simulation of Formal Functional Models Olivier Constant, Marius Bozga, Susanne Graf -- Verimag, Grenoble Nicolas Moteau, Wei Monin -- France Telecom R&D 2007

More information

Distributed Environments. CORBA, JavaRMI and DCOM

Distributed Environments. CORBA, JavaRMI and DCOM Distributed Environments CORBA, JavaRMI and DCOM Introduction to CORBA Distributed objects A mechanism allowing programs to invoke methods on remote objects Common Object Request Broker middleware - works

More information

Internet Connectivity with

Internet Connectivity with Internet Connectivity with Introduction The purpose of this workshop is to help you g et acquainted with the basics of internet connectivity by leveraging ARM mbed tools. If you are not already familiar

More information

Modeling and Verification of Deadlock Potentials of a Concurrency Control Mechanism in Distributed Databases Using Hierarchical Colored Petri Net

Modeling and Verification of Deadlock Potentials of a Concurrency Control Mechanism in Distributed Databases Using Hierarchical Colored Petri Net Modeling and Verification of Deadlock Potentials of a Concurrency Control Mechanism in Distributed Databases Using Hierarchical Colored Petri Net Saeid Pashazadeh, Senior Member, IACSIT Abstract Formal

More information

Lecture Outline. COOL operational semantics. Operational Semantics of Cool. Motivation. Notation. The rules. Evaluation Rules So Far.

Lecture Outline. COOL operational semantics. Operational Semantics of Cool. Motivation. Notation. The rules. Evaluation Rules So Far. Lecture Outline Operational Semantics of Cool COOL operational semantics Motivation Adapted from Lectures by Profs. Alex Aiken and George Necula (UCB) Notation The rules CS781(Prasad) L24CG 1 CS781(Prasad)

More information

Lecture 2: SML Basics

Lecture 2: SML Basics 15-150 Lecture 2: SML Basics Lecture by Dan Licata January 19, 2012 I d like to start off by talking about someone named Alfred North Whitehead. With someone named Bertrand Russell, Whitehead wrote Principia

More information

2 Discrete Dynamic Systems

2 Discrete Dynamic Systems 2 Discrete Dynamic Systems This chapter introduces discrete dynamic systems by first looking at models for dynamic and static aspects of systems, before covering continuous and discrete systems. Transition

More information

Consistent Integration between Object Oriented and Coloured Petri Nets Models

Consistent Integration between Object Oriented and Coloured Petri Nets Models 406 The International Arab Journal of Information Technology, Vol. 11, No. 4, July 2014 Consistent Integration between Object Oriented and Coloured Petri Nets Models Bassam Rajabi and Sai Peck Lee Faculty

More information

StorageGRID Webscale NAS Bridge Management API Guide

StorageGRID Webscale NAS Bridge Management API Guide StorageGRID Webscale NAS Bridge 2.0.3 Management API Guide January 2018 215-12414_B0 doccomments@netapp.com Table of Contents 3 Contents Understanding the NAS Bridge management API... 4 RESTful web services

More information

Simulation with NS-2 and CPN tools. Ying-Dar Lin Department of Computer Science, National Chiao Tung University

Simulation with NS-2 and CPN tools. Ying-Dar Lin Department of Computer Science, National Chiao Tung University Simulation with NS-2 and CPN tools Ying-Dar Lin Department of Computer Science, National Chiao Tung University Outline NS-2 simulator NS-2 basics Basic syntax Tracing a simple network Mini and term projects

More information

Introduction to Fieldbus and DeviceNetworks

Introduction to Fieldbus and DeviceNetworks Fieldbus and Device Netorks This tutorial on Fieldbus and Device Netorks is broken don into the folloing sections: Introduction to Fieldbus and DeviceNetorks A brief overvie of Profibus Introduction to

More information

Colored Petri Net based Timing Analysis for UAS Application Software

Colored Petri Net based Timing Analysis for UAS Application Software Colored Petri Net based Timing Analysis for UAS Application Software Charles Hartsell, Vanderbilt University Gabor Karsai, Vanderbilt University Michael Lowry, NASA ARC Acknowledgements: NASA ARC Contract

More information

Business Processes Modelling MPB (6 cfu, 295AA)

Business Processes Modelling MPB (6 cfu, 295AA) Business Processes Modelling MPB (6 cfu, 295AA) Roberto Bruni http://www.di.unipi.it/~bruni 13 - Workflow nets!1 Object We study some special kind of Petri nets, that are suitable models of workflows Ch.4.4

More information

PETRI NET ANALYSIS OF BATCH RECIPES

PETRI NET ANALYSIS OF BATCH RECIPES Presented at FOCAPO 98, Snowbird, USA. PETRI NET ANALYSIS OF BATCH RECIPES STRUCTURED WITH GRAFCHART Charlotta Johnsson and Karl-Erik Årzén Department of Automatic Control, Lund Institute of Technology,

More information

How useful is the UML profile SPT without Semantics? 1

How useful is the UML profile SPT without Semantics? 1 How useful is the UML profile SPT without Semantics? 1 Susanne Graf, Ileana Ober VERIMAG 2, avenue de Vignate - F-38610 Gières - France e-mail:{susanne.graf, Ileana.Ober}@imag.fr http://www-verimag.imag.fr/~{graf,iober}

More information

About the Tutorial. Audience. Prerequisites. Copyright & Disclaimer. Compiler Design

About the Tutorial. Audience. Prerequisites. Copyright & Disclaimer. Compiler Design i About the Tutorial A compiler translates the codes written in one language to some other language without changing the meaning of the program. It is also expected that a compiler should make the target

More information

DeviceMate, an Integrated C Development System for Network-Enabling Embedded Devices

DeviceMate, an Integrated C Development System for Network-Enabling Embedded Devices WHITE paper DeviceMate, an Integrated C Development System for Netork-Enabling Embedded Devices Overvie In addition to meeting traditional challenges, designers of embedded control and equipment are often

More information

Copyright 2013, Oracle and/or its affiliates. All rights reserved. CON-7777, JMS and WebSocket for Lightweight and Efficient Messaging

Copyright 2013, Oracle and/or its affiliates. All rights reserved. CON-7777, JMS and WebSocket for Lightweight and Efficient Messaging 1 JMS and WebSocket for Lightweight and Efficient Messaging Ed Bratt Senior Development Manager, Oracle Amy Kang Consulting Member Technical Staff, Oracle Safe Harbor Statement please note The following

More information

FedX: A Federation Layer for Distributed Query Processing on Linked Open Data

FedX: A Federation Layer for Distributed Query Processing on Linked Open Data FedX: A Federation Layer for Distributed Query Processing on Linked Open Data Andreas Schwarte 1, Peter Haase 1,KatjaHose 2, Ralf Schenkel 2, and Michael Schmidt 1 1 fluid Operations AG, Walldorf, Germany

More information

KRON: An Approach for the Integration of Petri Nets in Object Oriented Models of Discrete Event Systems

KRON: An Approach for the Integration of Petri Nets in Object Oriented Models of Discrete Event Systems KRON: An Approach for the Integration of Petri Nets in Object Oriented Models of Discrete Event Systems J.L. Villarroel, J.A. Bañares and P.R. Muro-Medrano Departamento de Ingeniería Eléctrica e Informatica

More information

Lexical Analysis. COMP 524, Spring 2014 Bryan Ward

Lexical Analysis. COMP 524, Spring 2014 Bryan Ward Lexical Analysis COMP 524, Spring 2014 Bryan Ward Based in part on slides and notes by J. Erickson, S. Krishnan, B. Brandenburg, S. Olivier, A. Block and others The Big Picture Character Stream Scanner

More information

In this project, you'll learn how to enter data using flash fill using the Flash Fill Options button and automatic recognition.

In this project, you'll learn how to enter data using flash fill using the Flash Fill Options button and automatic recognition. Workshops Introduction The Workshops are all about being creative and thinking outside of the box. These orkshops ill help your right-brain soar, hile making your left-brain happy; by explaining hy things

More information

Operational Semantics of Cool

Operational Semantics of Cool Operational Semantics of Cool Key Concepts semantics: the meaning of a program, what does program do? how the code is executed? operational semantics: high level code generation steps of calculating values

More information

Motivation: Model-driven. driven Engineering. Semantics of Model Transformation. Reiko Heckel University of Leicester, UK

Motivation: Model-driven. driven Engineering. Semantics of Model Transformation. Reiko Heckel University of Leicester, UK Semantics of Model Transformation Reiko Heckel University of Leicester, UK, University of Birmingham, 1 March 2007 Motivation: Model-driven driven Engineering Focus and primary artifacts are models instead

More information

Component-Based Behavioural Modelling with High-Level Petri Nets

Component-Based Behavioural Modelling with High-Level Petri Nets Component-Based Behavioural Modelling with High-Level Petri Nets Rémi Bastide, Eric Barboni LIIHS IRIT, University of Toulouse, France {bastide, barboni}@irit.fr Software Components Active domain for industry,

More information

Process Modelling. Fault Tolerant Systems Research Group. Budapest University of Technology and Economics

Process Modelling. Fault Tolerant Systems Research Group. Budapest University of Technology and Economics Process Modelling Budapest University of Technology and Economics Fault Tolerant Systems Research Group Budapest University of Technology and Economics Department of Measurement and Information Systems

More information

Chapter 4. Capturing the Requirements. 4th Edition. Shari L. Pfleeger Joanne M. Atlee

Chapter 4. Capturing the Requirements. 4th Edition. Shari L. Pfleeger Joanne M. Atlee Chapter 4 Capturing the Requirements Shari L. Pfleeger Joanne M. Atlee 4th Edition It is important to have standard notations for modeling, documenting, and communicating decisions Modeling helps us to

More information

MODELLING DEADLOCK AVOIDANCE IN AGV SYSTEMS VIA COLOURED PETRI NETS

MODELLING DEADLOCK AVOIDANCE IN AGV SYSTEMS VIA COLOURED PETRI NETS MODELLING DEADLOCK AVOIDANCE IN AGV SYSTEMS VIA COLOURED PETRI NETS Michal Žarnay 1, Ladislav Jančík 2, Petr Cenek 1 1 University of Žilina, Faculty of Management Science and Informatics 01008 Žilina,

More information

Petri Nets. Petri Nets. Petri Net Example. Systems are specified as a directed bipartite graph. The two kinds of nodes in the graph:

Petri Nets. Petri Nets. Petri Net Example. Systems are specified as a directed bipartite graph. The two kinds of nodes in the graph: System Design&Methodologies Fö - 1 System Design&Methodologies Fö - 2 Petri Nets 1. Basic Petri Net Model 2. Properties and Analysis of Petri Nets 3. Extended Petri Net Models Petri Nets Systems are specified

More information