39
Concurrent Operational Semantics of Safe Time Petri Nets Claude Jard European University of Brittany, ENS Cachan Bretagne, IRISA Campus de Ker-Lann, 35170 Bruz, France [email protected] cachan.fr with Thomas Chatain, currently postdoc in Aalborg

Concurrent Operational Semantics of Safe Time Petri Nets Claude Jard European University of Brittany, ENS Cachan Bretagne, IRISA Campus de Ker-Lann, 35170

Embed Size (px)

Citation preview

Page 1: Concurrent Operational Semantics of Safe Time Petri Nets Claude Jard European University of Brittany, ENS Cachan Bretagne, IRISA Campus de Ker-Lann, 35170

Concurrent Operational Semantics of Safe Time

Petri Nets

Claude Jard European University of Brittany,

ENS Cachan Bretagne, IRISA Campus de Ker-Lann, 35170 Bruz,

France [email protected]

cachan.fr

with Thomas Chatain, currently postdoc in Aalborg

Page 2: Concurrent Operational Semantics of Safe Time Petri Nets Claude Jard European University of Brittany, ENS Cachan Bretagne, IRISA Campus de Ker-Lann, 35170

Time & Concurrent Semantics

• Seems to be a bit contradictory:– Time is a global notion– Concurrency is implied by independent actions, which are locally decided

• Is difficult: – even for the simple case of safe time Petri net, the definition of unfoldings and finite complete prefixes was left open

Page 3: Concurrent Operational Semantics of Safe Time Petri Nets Claude Jard European University of Brittany, ENS Cachan Bretagne, IRISA Campus de Ker-Lann, 35170

What we have done…

Ingredients:– Mixed of graphical and symbolic constraints

– Duplication of events to capture different temporal constraints for a same event

– Introduction of reads arcs

Safe Time Petri NetIts finite completeprefix

Page 4: Concurrent Operational Semantics of Safe Time Petri Nets Claude Jard European University of Brittany, ENS Cachan Bretagne, IRISA Campus de Ker-Lann, 35170

Time Petri Nets [Merlin 1976]

• Syntax: <P,T, pre, post, efd, lfd, M0>• Sequential semantics:

Global state (M,dob,)(M,dob,) -t-> (M’,dob’,’) iff

Page 5: Concurrent Operational Semantics of Safe Time Petri Nets Claude Jard European University of Brittany, ENS Cachan Bretagne, IRISA Campus de Ker-Lann, 35170

Firing Sequences

• (p1p2,00,0)

0

0

Page 6: Concurrent Operational Semantics of Safe Time Petri Nets Claude Jard European University of Brittany, ENS Cachan Bretagne, IRISA Campus de Ker-Lann, 35170

Firing Sequences

• (p1p2,00,0) -t2-> (p1p4,01.3,1.3)

0

1.3

Page 7: Concurrent Operational Semantics of Safe Time Petri Nets Claude Jard European University of Brittany, ENS Cachan Bretagne, IRISA Campus de Ker-Lann, 35170

Firing Sequences

• (p1p2,00,0) -t2-> (p1p4,01.3,1.3) -t1-> (p3p4,31.3,3)

0

1.3

3

Page 8: Concurrent Operational Semantics of Safe Time Petri Nets Claude Jard European University of Brittany, ENS Cachan Bretagne, IRISA Campus de Ker-Lann, 35170

Firing Sequences

• (p1p2,00,0) -t2-> (p1p4,01.3,1.3) -t1-> (p3p4,31.3,3)

-t0-> (p1p2,33,3)

3

1.3

3

3

Page 9: Concurrent Operational Semantics of Safe Time Petri Nets Claude Jard European University of Brittany, ENS Cachan Bretagne, IRISA Campus de Ker-Lann, 35170

Firing Sequences

• (p1p2,00,0) -t2-> (p1p4,01.3,1.3) -t1-> (p3p4,31.3,3)

-t0-> (p1p2,33,3) -t1-> (p2p3,33,3)

3

1.3

3

3

Page 10: Concurrent Operational Semantics of Safe Time Petri Nets Claude Jard European University of Brittany, ENS Cachan Bretagne, IRISA Campus de Ker-Lann, 35170

Firing Sequences

• (p1p2,00,0) -t2-> (p1p4,01.3,1.3) -t1-> (p3p4,31.3,3)

-t0-> (p1p2,33,3) -t1-> (p2p3,33,3)

-t2-> (p3p4,35,5)

3

5

3

3

Page 11: Concurrent Operational Semantics of Safe Time Petri Nets Claude Jard European University of Brittany, ENS Cachan Bretagne, IRISA Campus de Ker-Lann, 35170

Firing Sequences

• (p1p2,00,0) -t2-> (p1p4,01.3,1.3) -t1-> (p3p4,31.3,3)

-t0-> (p1p2,33,3) -t1-> (p2p3,33,3)

-t2-> (p3p4,35,5) -t3-> (p4p5,55,5)

3

5

3

3

5

Page 12: Concurrent Operational Semantics of Safe Time Petri Nets Claude Jard European University of Brittany, ENS Cachan Bretagne, IRISA Campus de Ker-Lann, 35170

Symbolic Firing Sequences

• (p1p2,00,0) -t2-> (p1p4,01,1) -t1-> (p3p4, 21,2) -t0-> (p1p2,33,3) -t1-> (p2p3,34,4) -t2-> (p3p4,45,5) -t3-> (p4p5,56,6)

where [1≤1≤2][0≤2][max(2,1)≤3≤max(2,1)][3≤2+2][3+2≤4][3+1≤5≤3+2][5≤4+2] [6=4+2][6≤max(4,5)]

Page 13: Concurrent Operational Semantics of Safe Time Petri Nets Claude Jard European University of Brittany, ENS Cachan Bretagne, IRISA Campus de Ker-Lann, 35170

Time processes

• First attempt [Aura, Lilius 1997]– Time processes are those of the underlying (untimed) Petri net that are consistently dated

– Can be defined inductively from the firing sequences

Page 14: Concurrent Operational Semantics of Safe Time Petri Nets Claude Jard European University of Brittany, ENS Cachan Bretagne, IRISA Campus de Ker-Lann, 35170
Page 15: Concurrent Operational Semantics of Safe Time Petri Nets Claude Jard European University of Brittany, ENS Cachan Bretagne, IRISA Campus de Ker-Lann, 35170

t2(1.3)

Page 16: Concurrent Operational Semantics of Safe Time Petri Nets Claude Jard European University of Brittany, ENS Cachan Bretagne, IRISA Campus de Ker-Lann, 35170

t2(1.3) t1(3)

Page 17: Concurrent Operational Semantics of Safe Time Petri Nets Claude Jard European University of Brittany, ENS Cachan Bretagne, IRISA Campus de Ker-Lann, 35170

t2(1.3) t1(3) t0(3)

Page 18: Concurrent Operational Semantics of Safe Time Petri Nets Claude Jard European University of Brittany, ENS Cachan Bretagne, IRISA Campus de Ker-Lann, 35170

t2(1.3) t1(3) t0(3) t1(3)

Page 19: Concurrent Operational Semantics of Safe Time Petri Nets Claude Jard European University of Brittany, ENS Cachan Bretagne, IRISA Campus de Ker-Lann, 35170

t2(1.3) t1(3) t0(3) t1(3) t2(3)

Page 20: Concurrent Operational Semantics of Safe Time Petri Nets Claude Jard European University of Brittany, ENS Cachan Bretagne, IRISA Campus de Ker-Lann, 35170

t2(1.3) t1(3) t0(3) t1(3) t2(3) t3(5)

Page 21: Concurrent Operational Semantics of Safe Time Petri Nets Claude Jard European University of Brittany, ENS Cachan Bretagne, IRISA Campus de Ker-Lann, 35170

Unfolding• Defined as the superimposition (union) of all the time processes (share the common prefixes)

t2(1.3) t1(3) t0(3) t1(3) t2(3) t3(5)

t1(1) t3(3)

Page 22: Concurrent Operational Semantics of Safe Time Petri Nets Claude Jard European University of Brittany, ENS Cachan Bretagne, IRISA Campus de Ker-Lann, 35170

Unfolding• Defined as the superimposition (union) of all the time processes (share the common prefixes)

Page 23: Concurrent Operational Semantics of Safe Time Petri Nets Claude Jard European University of Brittany, ENS Cachan Bretagne, IRISA Campus de Ker-Lann, 35170

Problem with the symbolic

representation

• Consider the processes built from the sequences t1(1).t3(3) and t1(1).t2(2).t3(3)

• Constraints on t3 are:– [1≤2] [3=1+2] (first case)– [1≤2] [1≤2≤2] [2≤1+2] [3=1+2] [3≤max(1,2)]

• The superimposition will provide a disjunction, which will make difficult the extraction of processes in the general case

• Except for the particular case of Time Extended Free Choice Nets

Page 24: Concurrent Operational Semantics of Safe Time Petri Nets Claude Jard European University of Brittany, ENS Cachan Bretagne, IRISA Campus de Ker-Lann, 35170

• Event duplication• Introduction of read arcs (to preserve concurrency)• Efficient concurrent semantics by considering local firing rules

Page 25: Concurrent Operational Semantics of Safe Time Petri Nets Claude Jard European University of Brittany, ENS Cachan Bretagne, IRISA Campus de Ker-Lann, 35170

Local States

• Assume a partition {(Pi)} in mutually exclusive places (simplifies the test of token absence) (pPi, p = Pi \ {p})

• {{p1,p3,p5},{p2,p4,p6}} in our example • A maximal (partial) marking is a set of places with

one place per each subset of the partition• A local state is <L, dob, lrd> (lrd stands for “latest

reading date”)

_

Page 26: Concurrent Operational Semantics of Safe Time Petri Nets Claude Jard European University of Brittany, ENS Cachan Bretagne, IRISA Campus de Ker-Lann, 35170

Local Enabling

• ) _

To minimize the number of read arcs:

Page 27: Concurrent Operational Semantics of Safe Time Petri Nets Claude Jard European University of Brittany, ENS Cachan Bretagne, IRISA Campus de Ker-Lann, 35170

Local Firing Rule

• (M, dob, lrd) -t,,L-> (M’, dob’, lrd’)

Page 28: Concurrent Operational Semantics of Safe Time Petri Nets Claude Jard European University of Brittany, ENS Cachan Bretagne, IRISA Campus de Ker-Lann, 35170

(Extended) Time Processes

Page 29: Concurrent Operational Semantics of Safe Time Petri Nets Claude Jard European University of Brittany, ENS Cachan Bretagne, IRISA Campus de Ker-Lann, 35170

t2(1.3,p2)

Page 30: Concurrent Operational Semantics of Safe Time Petri Nets Claude Jard European University of Brittany, ENS Cachan Bretagne, IRISA Campus de Ker-Lann, 35170

t2(1.3,p2) t1(3,p1)

Page 31: Concurrent Operational Semantics of Safe Time Petri Nets Claude Jard European University of Brittany, ENS Cachan Bretagne, IRISA Campus de Ker-Lann, 35170

t2(1.3,p2) t1(3,p1) t0(3,p3p4)

Page 32: Concurrent Operational Semantics of Safe Time Petri Nets Claude Jard European University of Brittany, ENS Cachan Bretagne, IRISA Campus de Ker-Lann, 35170

t2(1.3,p2) t1(3,p1) t0(3,p3p4) t1(3,p1)

Page 33: Concurrent Operational Semantics of Safe Time Petri Nets Claude Jard European University of Brittany, ENS Cachan Bretagne, IRISA Campus de Ker-Lann, 35170

t2(1.3,p2) t1(3,p1) t0(3,p3p4) t1(3,p1) t2(3,p2)

Page 34: Concurrent Operational Semantics of Safe Time Petri Nets Claude Jard European University of Brittany, ENS Cachan Bretagne, IRISA Campus de Ker-Lann, 35170

t2(1.3,p2) t1(3,p1) t0(3,p3p4) t1(3,p1) t2(3,p2) t3(5,p3p4)

Page 35: Concurrent Operational Semantics of Safe Time Petri Nets Claude Jard European University of Brittany, ENS Cachan Bretagne, IRISA Campus de Ker-Lann, 35170

Unfolding• Defined as the union of all the time processes

• Properties:– Unfolding of Time Extended Free Choice Nets is the standard unfolding

– Unfolding of Time Nets limited to [0,+[ is the untimed usual unfolding

– The unfolding of disconnected nets remains disconnected

Page 36: Concurrent Operational Semantics of Safe Time Petri Nets Claude Jard European University of Brittany, ENS Cachan Bretagne, IRISA Campus de Ker-Lann, 35170

Process extraction

Page 37: Concurrent Operational Semantics of Safe Time Petri Nets Claude Jard European University of Brittany, ENS Cachan Bretagne, IRISA Campus de Ker-Lann, 35170

Complete Finite Prefixes

• Two maximal states are considered equivalent if they have the same marking and the same reduced ages in the places

• The set of expressions defining the reduced ages in the maximal states of the processes is finite

• Prefixes are computed incrementally provided a substitution in the firing date expressions

Page 38: Concurrent Operational Semantics of Safe Time Petri Nets Claude Jard European University of Brittany, ENS Cachan Bretagne, IRISA Campus de Ker-Lann, 35170

Substitution

Page 39: Concurrent Operational Semantics of Safe Time Petri Nets Claude Jard European University of Brittany, ENS Cachan Bretagne, IRISA Campus de Ker-Lann, 35170

Conclusion

• An original notion of unfolding of Time PN and its finite representation

• Tries to code the maximum of concurrency in the graphical part

• Complexity issues are to be worked

• Other models? (non-safe, networks of Timed Automata, local semantics of time…)