Reachability of Communicating Timed Processesvacsim.inria.fr/Reunions/2013-Avril/Labri.pdf ·...

83
Reachability of Communicating Timed Processes Lorenzo Clemente (1), Frédéric Herbreteau (1), Amélie Stainer (2), and Grégoire Sutre (1) Plouzané, Tuesday 16th April 2013 (1) University of Bordeaux/LaBRI (2) University of Rennes I

Transcript of Reachability of Communicating Timed Processesvacsim.inria.fr/Reunions/2013-Avril/Labri.pdf ·...

Page 1: Reachability of Communicating Timed Processesvacsim.inria.fr/Reunions/2013-Avril/Labri.pdf · Reachability of Communicating Timed Processes Lorenzo Clemente !1", Frédéric Herbreteau

Reachability of Communicating Timed Processes

Lorenzo Clemente (1), Frédéric Herbreteau (1),Amélie Stainer (2), and Grégoire Sutre (1)

Plouzané, Tuesday 16th April 2013

(1) University of Bordeaux/LaBRI(2) University of Rennes I

Page 2: Reachability of Communicating Timed Processesvacsim.inria.fr/Reunions/2013-Avril/Labri.pdf · Reachability of Communicating Timed Processes Lorenzo Clemente !1", Frédéric Herbreteau

At a glance

Model: Communicating Finite State Machines + Time

Problem: Decidability and complexity of reachability w.r.t. the communication topology

Results: Adding time does not change decidability, but the complexity worsens

Page 3: Reachability of Communicating Timed Processesvacsim.inria.fr/Reunions/2013-Avril/Labri.pdf · Reachability of Communicating Timed Processes Lorenzo Clemente !1", Frédéric Herbreteau

Communicating Finite State MachinesNetwork of finite automata communicating over unbounded FIFO channels.

!a !c ?a ?cP Q R

Reachability: Every process is in a final state and channels are empty

!b ?b

Page 4: Reachability of Communicating Timed Processesvacsim.inria.fr/Reunions/2013-Avril/Labri.pdf · Reachability of Communicating Timed Processes Lorenzo Clemente !1", Frédéric Herbreteau

Communicating Finite State MachinesNetwork of finite automata communicating over unbounded FIFO channels.

!a !c ?a ?cP Q R

Reachability: Every process is in a final state and channels are empty

!b ?bε ε

Page 5: Reachability of Communicating Timed Processesvacsim.inria.fr/Reunions/2013-Avril/Labri.pdf · Reachability of Communicating Timed Processes Lorenzo Clemente !1", Frédéric Herbreteau

Communicating Finite State MachinesNetwork of finite automata communicating over unbounded FIFO channels.

!a !c ?a ?cP Q R

Reachability: Every process is in a final state and channels are empty

!b ?bεa

Page 6: Reachability of Communicating Timed Processesvacsim.inria.fr/Reunions/2013-Avril/Labri.pdf · Reachability of Communicating Timed Processes Lorenzo Clemente !1", Frédéric Herbreteau

Communicating Finite State MachinesNetwork of finite automata communicating over unbounded FIFO channels.

!a !c ?a ?cP Q R

Reachability: Every process is in a final state and channels are empty

!b ?bεba

Page 7: Reachability of Communicating Timed Processesvacsim.inria.fr/Reunions/2013-Avril/Labri.pdf · Reachability of Communicating Timed Processes Lorenzo Clemente !1", Frédéric Herbreteau

Communicating Finite State MachinesNetwork of finite automata communicating over unbounded FIFO channels.

!a !c ?a ?cP Q R

Reachability: Every process is in a final state and channels are empty

!b ?bcba

Page 8: Reachability of Communicating Timed Processesvacsim.inria.fr/Reunions/2013-Avril/Labri.pdf · Reachability of Communicating Timed Processes Lorenzo Clemente !1", Frédéric Herbreteau

Communicating Finite State MachinesNetwork of finite automata communicating over unbounded FIFO channels.

!a !c ?a ?cP Q R

Reachability: Every process is in a final state and channels are empty

!b ?bba ε

Page 9: Reachability of Communicating Timed Processesvacsim.inria.fr/Reunions/2013-Avril/Labri.pdf · Reachability of Communicating Timed Processes Lorenzo Clemente !1", Frédéric Herbreteau

Communicating Finite State MachinesNetwork of finite automata communicating over unbounded FIFO channels.

!a !c ?a ?cP Q R

Reachability: Every process is in a final state and channels are empty

!b ?bb ε

Page 10: Reachability of Communicating Timed Processesvacsim.inria.fr/Reunions/2013-Avril/Labri.pdf · Reachability of Communicating Timed Processes Lorenzo Clemente !1", Frédéric Herbreteau

Communicating Finite State MachinesNetwork of finite automata communicating over unbounded FIFO channels.

!a !c ?a ?cP Q R

Reachability: Every process is in a final state and channels are empty

!b ?bεε

Page 11: Reachability of Communicating Timed Processesvacsim.inria.fr/Reunions/2013-Avril/Labri.pdf · Reachability of Communicating Timed Processes Lorenzo Clemente !1", Frédéric Herbreteau

Communicating Finite State Machines

Reachability is in general undecidable [Brand&Zafiropulo].Decidabile restrictions:

• Bound the channel (→ finite state system).

• Restrict the message alphabet to a singleton (→ Petri nets) [Karp&Miller’69].

• Make the channel lossy [Abdulla&Jonsson’96, Cece&Finkel&Iyer’96].

• Restrict to mutex communication [Heussner&Leroux&Muscholl&Sutre’10].

Page 12: Reachability of Communicating Timed Processesvacsim.inria.fr/Reunions/2013-Avril/Labri.pdf · Reachability of Communicating Timed Processes Lorenzo Clemente !1", Frédéric Herbreteau

Communicating Finite State Machines

Reachability is in general undecidable [Brand&Zafiropulo].Decidabile restrictions:

• Bound the channel (→ finite state system).

• Restrict the message alphabet to a singleton (→ Petri nets) [Karp&Miller’69].

• Make the channel lossy [Abdulla&Jonsson’96, Cece&Finkel&Iyer’96].

• Restrict to mutex communication [Heussner&Leroux&Muscholl&Sutre’10].

• Restrict the communication topology [La Torre&Madhusudan&Parlato’08].

Page 13: Reachability of Communicating Timed Processesvacsim.inria.fr/Reunions/2013-Avril/Labri.pdf · Reachability of Communicating Timed Processes Lorenzo Clemente !1", Frédéric Herbreteau

Communicating Finite State MachinesDecidability for restricted topologies.

!a !c ?a ?cP Q R

Topology: P → Q → R

!b ?b

Page 14: Reachability of Communicating Timed Processesvacsim.inria.fr/Reunions/2013-Avril/Labri.pdf · Reachability of Communicating Timed Processes Lorenzo Clemente !1", Frédéric Herbreteau

Communicating Finite State MachinesDecidability for restricted topologies.

Theorem [La Torre&Madhusudan&Parlato’08].Reachability for CFSMs is decidable iff the topology is a polyforest.

Theorem [La Torre&Madhusudan&Parlato’08].Reachability is PSPACE-complete on polyforest topologies.

Our aim: Extend this results to models with time.

Examples of polyforest: Non-example:P

QRP Q R

(no undirected cycle)

P QR

S

Page 15: Reachability of Communicating Timed Processesvacsim.inria.fr/Reunions/2013-Avril/Labri.pdf · Reachability of Communicating Timed Processes Lorenzo Clemente !1", Frédéric Herbreteau

Communicating FSMs + Time

Discrete time Dense time

• Each process is a tick automaton [Gruber&Holzer&Kiehn&Koenig]

• Add a synchronising action τ

• All processes perform τ at the same time

• Each process is a timed automaton [Alur&Dill’94]

• Clocks are local to each process

• All clocks evolve at the same rate

Page 16: Reachability of Communicating Timed Processesvacsim.inria.fr/Reunions/2013-Avril/Labri.pdf · Reachability of Communicating Timed Processes Lorenzo Clemente !1", Frédéric Herbreteau

Discrete time

!a !b ?a τP Q

Rτ τ

τ ?b

• Add a synchronising action τ • All processes perform τ at the same time

Page 17: Reachability of Communicating Timed Processesvacsim.inria.fr/Reunions/2013-Avril/Labri.pdf · Reachability of Communicating Timed Processes Lorenzo Clemente !1", Frédéric Herbreteau

Discrete time

!a !b ?a τP Q

Rτ τ

τ ?b

• Add a synchronising action τ • All processes perform τ at the same time

ε ε

Page 18: Reachability of Communicating Timed Processesvacsim.inria.fr/Reunions/2013-Avril/Labri.pdf · Reachability of Communicating Timed Processes Lorenzo Clemente !1", Frédéric Herbreteau

Discrete time

!a !b ?a τP Q

Rτ τ

τ ?b

• Add a synchronising action τ • All processes perform τ at the same time

a ε

Page 19: Reachability of Communicating Timed Processesvacsim.inria.fr/Reunions/2013-Avril/Labri.pdf · Reachability of Communicating Timed Processes Lorenzo Clemente !1", Frédéric Herbreteau

Discrete time

!a !b ?a τP Q

Rτ τ

τ ?b

• Add a synchronising action τ • All processes perform τ at the same time

a ε

Page 20: Reachability of Communicating Timed Processesvacsim.inria.fr/Reunions/2013-Avril/Labri.pdf · Reachability of Communicating Timed Processes Lorenzo Clemente !1", Frédéric Herbreteau

Discrete time

!a !b ?a

P QR

τ ττ ?b

• Add a synchronising action τ • All processes perform τ at the same time

a ε τ

Page 21: Reachability of Communicating Timed Processesvacsim.inria.fr/Reunions/2013-Avril/Labri.pdf · Reachability of Communicating Timed Processes Lorenzo Clemente !1", Frédéric Herbreteau

Discrete time

!a !b ?a

P QR

τ τ

τ ?b

• Add a synchronising action τ • All processes perform τ at the same time

a b τ

Page 22: Reachability of Communicating Timed Processesvacsim.inria.fr/Reunions/2013-Avril/Labri.pdf · Reachability of Communicating Timed Processes Lorenzo Clemente !1", Frédéric Herbreteau

Discrete time

!a !b ?a

P QR

τ τ

τ ?b

• Add a synchronising action τ • All processes perform τ at the same time

b τε

Page 23: Reachability of Communicating Timed Processesvacsim.inria.fr/Reunions/2013-Avril/Labri.pdf · Reachability of Communicating Timed Processes Lorenzo Clemente !1", Frédéric Herbreteau

Discrete time

!a !b ?a

P QR

τ τ

τ ?b

• Add a synchronising action τ • All processes perform τ at the same time

τε ε

Page 24: Reachability of Communicating Timed Processesvacsim.inria.fr/Reunions/2013-Avril/Labri.pdf · Reachability of Communicating Timed Processes Lorenzo Clemente !1", Frédéric Herbreteau

Dense time• Each process is a timed

automaton with local clocks • All clocks evolve at the same rate

0<x<1,!a,{x}P x=1,!b

0<y<1,?a,{y}Q 0<y<1,?b

Page 25: Reachability of Communicating Timed Processesvacsim.inria.fr/Reunions/2013-Avril/Labri.pdf · Reachability of Communicating Timed Processes Lorenzo Clemente !1", Frédéric Herbreteau

Dense time

0<x<1,!a,{x}P

• Each process is a timed automaton with local clocks • All clocks evolve at the same rate

x=1,!b

0<y<1,?a,{y}Q 0<y<1,?b

ε

x=0

y=0

Page 26: Reachability of Communicating Timed Processesvacsim.inria.fr/Reunions/2013-Avril/Labri.pdf · Reachability of Communicating Timed Processes Lorenzo Clemente !1", Frédéric Herbreteau

Dense time

0<x<1,!a,{x}P

• Each process is a timed automaton with local clocks • All clocks evolve at the same rate

x=1,!b

0<y<1,?a,{y}Q 0<y<1,?b

ε

x=0.5

y=0.5

Elapse 0.5

Page 27: Reachability of Communicating Timed Processesvacsim.inria.fr/Reunions/2013-Avril/Labri.pdf · Reachability of Communicating Timed Processes Lorenzo Clemente !1", Frédéric Herbreteau

Dense time

0<x<1,!a,{x}P

• Each process is a timed automaton with local clocks • All clocks evolve at the same rate

x=1,!b

0<y<1,?a,{y}Q 0<y<1,?b

a

x=0

y=0.5

Elapse 0.5

Page 28: Reachability of Communicating Timed Processesvacsim.inria.fr/Reunions/2013-Avril/Labri.pdf · Reachability of Communicating Timed Processes Lorenzo Clemente !1", Frédéric Herbreteau

Dense time

0<x<1,!a,{x}P

• Each process is a timed automaton with local clocks • All clocks evolve at the same rate

x=1,!b

0<y<1,?a,{y}Q 0<y<1,?b

a

x=0.2

y=0.7

Elapse 0.5+0.2

Page 29: Reachability of Communicating Timed Processesvacsim.inria.fr/Reunions/2013-Avril/Labri.pdf · Reachability of Communicating Timed Processes Lorenzo Clemente !1", Frédéric Herbreteau

Dense time

0<x<1,!a,{x}P

• Each process is a timed automaton with local clocks • All clocks evolve at the same rate

x=1,!b

0<y<1,?a,{y}Q 0<y<1,?b

x=0.2

y=0

Elapse 0.5+0.2 ε

Page 30: Reachability of Communicating Timed Processesvacsim.inria.fr/Reunions/2013-Avril/Labri.pdf · Reachability of Communicating Timed Processes Lorenzo Clemente !1", Frédéric Herbreteau

Dense time

0<x<1,!a,{x}P

• Each process is a timed automaton with local clocks • All clocks evolve at the same rate

x=1,!b

0<y<1,?a,{y}Q 0<y<1,?b

Elapse 0.5+0.2+0.8 ε

y=0.8

x=1

Page 31: Reachability of Communicating Timed Processesvacsim.inria.fr/Reunions/2013-Avril/Labri.pdf · Reachability of Communicating Timed Processes Lorenzo Clemente !1", Frédéric Herbreteau

Dense time

0<x<1,!a,{x}P

• Each process is a timed automaton with local clocks • All clocks evolve at the same rate

x=1,!b

0<y<1,?a,{y}Q 0<y<1,?b

Elapse 0.5+0.2+0.8 b

y=0.8

x=1

Page 32: Reachability of Communicating Timed Processesvacsim.inria.fr/Reunions/2013-Avril/Labri.pdf · Reachability of Communicating Timed Processes Lorenzo Clemente !1", Frédéric Herbreteau

Dense time

0<x<1,!a,{x}P

• Each process is a timed automaton with local clocks • All clocks evolve at the same rate

x=1,!b

0<y<1,?a,{y}Q 0<y<1,?b

Elapse 0.5+0.2+0.8

y=0.8

x=1

ε

Page 33: Reachability of Communicating Timed Processesvacsim.inria.fr/Reunions/2013-Avril/Labri.pdf · Reachability of Communicating Timed Processes Lorenzo Clemente !1", Frédéric Herbreteau

Communicating FSMs + Time

Discrete time Dense time

• Each process is a tick automaton [Gruber&Holzer&Kiehn&Koenig]

• Add a synchronising action τ

• All processes perform τ at the same time

• Each process is a timed automaton [Alur&Dill’94]

• Clocks are local to each process

• All clocks evolve at the same rate

We study discrete time first

and then extend to dense time

Page 34: Reachability of Communicating Timed Processesvacsim.inria.fr/Reunions/2013-Avril/Labri.pdf · Reachability of Communicating Timed Processes Lorenzo Clemente !1", Frédéric Herbreteau

Discrete time

Network of Communicating Tick Automata

Petri NetsPetri Nets

Theorem: Reachability decidable iff polyforest topology

Theorem: The complexity is the same as Petri nets

(polyforest topologies)

(with a fixed polyforest topology)

Page 35: Reachability of Communicating Timed Processesvacsim.inria.fr/Reunions/2013-Avril/Labri.pdf · Reachability of Communicating Timed Processes Lorenzo Clemente !1", Frédéric Herbreteau

Discrete time

Network of Communicating Tick Automata

Petri NetsPetri Nets

Theorem: Reachability decidable iff polyforest topology

Theorem: The complexity is the same as Petri nets

(polyforest topologies)

(with a fixed polyforest topology)

Page 36: Reachability of Communicating Timed Processesvacsim.inria.fr/Reunions/2013-Avril/Labri.pdf · Reachability of Communicating Timed Processes Lorenzo Clemente !1", Frédéric Herbreteau

Discrete time Network of

Communicating Tick Automata

PetriNets

(polyforest topologies)

Page 37: Reachability of Communicating Timed Processesvacsim.inria.fr/Reunions/2013-Avril/Labri.pdf · Reachability of Communicating Timed Processes Lorenzo Clemente !1", Frédéric Herbreteau

Discrete time Network of

Communicating Tick Automata

Network of Communicating

Counter Automata

un-tickingbound

channels

(any topology) (polyforest topology)

PetriNets

Page 38: Reachability of Communicating Timed Processesvacsim.inria.fr/Reunions/2013-Avril/Labri.pdf · Reachability of Communicating Timed Processes Lorenzo Clemente !1", Frédéric Herbreteau

Discrete time Network of

Communicating Tick Automata

Network of Communicating

Counter Automata

un-tickingbound

channels

(any topology) (polyforest topology)

PetriNets

τP

Q

!a

τ

!τP

Q

!a

c++?a

?τ; c-- ?τ; c--

un-ticking

• P sends its ticks

• Q increments a counter instead of doing a tick

• In any state, Q can receive a tick

?a

Page 39: Reachability of Communicating Timed Processesvacsim.inria.fr/Reunions/2013-Avril/Labri.pdf · Reachability of Communicating Timed Processes Lorenzo Clemente !1", Frédéric Herbreteau

Discrete time P:

Q:

τP

Q

!a

τ

!τP

Q

!a

c++?a

?τ; c-- ?τ; c--

un-ticking

• P sends its ticks

• Q increments a counter instead of doing a tick

• In any state, Q can receive a tick

?a

ε ε

P:

Q:

P:

Q:

c=0

Page 40: Reachability of Communicating Timed Processesvacsim.inria.fr/Reunions/2013-Avril/Labri.pdf · Reachability of Communicating Timed Processes Lorenzo Clemente !1", Frédéric Herbreteau

Discrete time P:

Q:

τP

Q

!a

τ

!τP

Q

!a

c++?a

?τ; c-- ?τ; c--

un-ticking

• P sends its ticks

• Q increments a counter instead of doing a tick

• In any state, Q can receive a tick

?a

ε ε

P: τ Q: τ

P:

Q:

c=0

Page 41: Reachability of Communicating Timed Processesvacsim.inria.fr/Reunions/2013-Avril/Labri.pdf · Reachability of Communicating Timed Processes Lorenzo Clemente !1", Frédéric Herbreteau

Discrete time P:

Q:

τP

Q

!a

τ

!τP

Q

!a

c++?a

?τ; c-- ?τ; c--

un-ticking

• P sends its ticks

• Q increments a counter instead of doing a tick

• In any state, Q can receive a tick

?a

ε τ

P: τ Q: τ

P: !τ Q:

c=0

Page 42: Reachability of Communicating Timed Processesvacsim.inria.fr/Reunions/2013-Avril/Labri.pdf · Reachability of Communicating Timed Processes Lorenzo Clemente !1", Frédéric Herbreteau

Discrete time P:

Q:

τP

Q

!a

τ

!τP

Q

!a

c++?a

?τ; c-- ?τ; c--

un-ticking

• P sends its ticks

• Q increments a counter instead of doing a tick

• In any state, Q can receive a tick

?a

a τ

P: τ !aQ: τ

P: !τ Q:

c=0

Page 43: Reachability of Communicating Timed Processesvacsim.inria.fr/Reunions/2013-Avril/Labri.pdf · Reachability of Communicating Timed Processes Lorenzo Clemente !1", Frédéric Herbreteau

Discrete time P:

Q:

τP

Q

!a

τ

!τP

Q

!a

c++?a

?τ; c-- ?τ; c--

un-ticking

• P sends its ticks

• Q increments a counter instead of doing a tick

• In any state, Q can receive a tick

?a

P: τ !aQ: τ

P: !τ !aQ:

a

c=0

Page 44: Reachability of Communicating Timed Processesvacsim.inria.fr/Reunions/2013-Avril/Labri.pdf · Reachability of Communicating Timed Processes Lorenzo Clemente !1", Frédéric Herbreteau

Discrete time P:

Q:

τP

Q

!a

τ

!τP

Q

!a

c++?a

?τ; c-- ?τ; c--

un-ticking

• P sends its ticks

• Q increments a counter instead of doing a tick

• In any state, Q can receive a tick

?aτ

P: τ !aQ: τ ?a

P: !τ !aQ:

c=0

Page 45: Reachability of Communicating Timed Processesvacsim.inria.fr/Reunions/2013-Avril/Labri.pdf · Reachability of Communicating Timed Processes Lorenzo Clemente !1", Frédéric Herbreteau

Discrete time P:

Q:

τP

Q

!a

τ

!τP

Q

!a

c++?a

?τ; c-- ?τ; c--

un-ticking

• P sends its ticks

• Q increments a counter instead of doing a tick

• In any state, Q can receive a tick

?aτ

P: τ !aQ: τ ?a

P: !τ !aQ: c++

c=1

Page 46: Reachability of Communicating Timed Processesvacsim.inria.fr/Reunions/2013-Avril/Labri.pdf · Reachability of Communicating Timed Processes Lorenzo Clemente !1", Frédéric Herbreteau

Discrete time P:

Q:

τP

Q

!a

τ

!τP

Q

!a

c++?a

?τ; c-- ?τ; c--

un-ticking

• P sends its ticks

• Q increments a counter instead of doing a tick

• In any state, Q can receive a tick

?a

P: τ !aQ: τ ?a

P: !τ !aQ: c++ ?τ c--

c=0

Page 47: Reachability of Communicating Timed Processesvacsim.inria.fr/Reunions/2013-Avril/Labri.pdf · Reachability of Communicating Timed Processes Lorenzo Clemente !1", Frédéric Herbreteau

Discrete time P:

Q:

τP

Q

!a

τ

!τP

Q

!a

c++?a

?τ; c-- ?τ; c--

un-ticking

• P sends its ticks

• Q increments a counter instead of doing a tick

• In any state, Q can receive a tick

?a

P: τ !aQ: τ ?a

P: !τ !aQ: c++ ?τ c-- ?a

ε

c=0

ε

Page 48: Reachability of Communicating Timed Processesvacsim.inria.fr/Reunions/2013-Avril/Labri.pdf · Reachability of Communicating Timed Processes Lorenzo Clemente !1", Frédéric Herbreteau

Discrete time Network of

Communicating Tick Automata

Network of Communicating

Counter Automata

un-tickingbound

channels

(any topology) (polyforest topology)

PetriNets

τP

Q

!a

τ

!τP

Q

!a

c++?a

?τ; c-- ?τ; c--

un-ticking

?a

bound channels Product

construction

Page 49: Reachability of Communicating Timed Processesvacsim.inria.fr/Reunions/2013-Avril/Labri.pdf · Reachability of Communicating Timed Processes Lorenzo Clemente !1", Frédéric Herbreteau

Discrete time Network of

Communicating Tick Automata

Network of Communicating

Counter Automata

un-tickingbound

channels PetriNets

un-counter

Page 50: Reachability of Communicating Timed Processesvacsim.inria.fr/Reunions/2013-Avril/Labri.pdf · Reachability of Communicating Timed Processes Lorenzo Clemente !1", Frédéric Herbreteau

Discrete time Network of

Communicating Tick Automata

PetriNets

un-counter

A c++ c--

d++

P c!m d!m; τ

d!m

Pc c?m

τ

Pd d?m

τ• Replace c++ by c!m

• Replace c-- by d!m; τ

c

d

Page 51: Reachability of Communicating Timed Processesvacsim.inria.fr/Reunions/2013-Avril/Labri.pdf · Reachability of Communicating Timed Processes Lorenzo Clemente !1", Frédéric Herbreteau

Discrete time

A c++ c--

d++

P c!m d!m; τ

d!m

Pc c?m

τ

Pd d?m

τ

ε

ε

c

d

c=0

d=0

• Replace c++ by c!m

• Replace c-- by d!m; τ

Page 52: Reachability of Communicating Timed Processesvacsim.inria.fr/Reunions/2013-Avril/Labri.pdf · Reachability of Communicating Timed Processes Lorenzo Clemente !1", Frédéric Herbreteau

Discrete time

A c++ c--

d++

P c!m d!m; τ

d!m

Pc c?m

τ

Pd d?m

τ

ε

ε

c

d

c=1

d=0

• Replace c++ by c!m

• Replace c-- by d!m; τ

Page 53: Reachability of Communicating Timed Processesvacsim.inria.fr/Reunions/2013-Avril/Labri.pdf · Reachability of Communicating Timed Processes Lorenzo Clemente !1", Frédéric Herbreteau

Discrete time

A c++ c--

d++

P c!m d!m; τ

d!m

Pc c?m

τ

Pd d?m

τ

m

ε

c

d

c=1

d=0

• Replace c++ by c!m

• Replace c-- by d!m; τ

Page 54: Reachability of Communicating Timed Processesvacsim.inria.fr/Reunions/2013-Avril/Labri.pdf · Reachability of Communicating Timed Processes Lorenzo Clemente !1", Frédéric Herbreteau

Discrete time

A c++ c--

d++

P c!m d!m; τ

d!m

Pc c?m

τ

Pd d?m

τ

m

ε

c

d

c=2

d=0

• Replace c++ by c!m

• Replace c-- by d!m; τ

Page 55: Reachability of Communicating Timed Processesvacsim.inria.fr/Reunions/2013-Avril/Labri.pdf · Reachability of Communicating Timed Processes Lorenzo Clemente !1", Frédéric Herbreteau

Discrete time

A c++ c--

d++

P c!m d!m; τ

d!m

Pc c?m

τ

Pd d?m

τ

m

ε

c

d

c=2

d=0m

• Replace c++ by c!m

• Replace c-- by d!m; τ

Page 56: Reachability of Communicating Timed Processesvacsim.inria.fr/Reunions/2013-Avril/Labri.pdf · Reachability of Communicating Timed Processes Lorenzo Clemente !1", Frédéric Herbreteau

Discrete time

A c++ c--

d++

P c!m d!m; τ

d!m

Pc c?m

τ

Pd d?m

τ

m

ε

c

d

c=2

d=0m

• Replace c++ by c!m

• Replace c-- by d!m; τ

Page 57: Reachability of Communicating Timed Processesvacsim.inria.fr/Reunions/2013-Avril/Labri.pdf · Reachability of Communicating Timed Processes Lorenzo Clemente !1", Frédéric Herbreteau

Discrete time

A c++ c--

d++

P c!m d!m; τ

d!m

Pc c?m

τ

Pd d?m

τ

m

ε

c

d

c=2

d=0m

• Replace c++ by c!m

• Replace c-- by d!m; τ

Page 58: Reachability of Communicating Timed Processesvacsim.inria.fr/Reunions/2013-Avril/Labri.pdf · Reachability of Communicating Timed Processes Lorenzo Clemente !1", Frédéric Herbreteau

Discrete time

A c++ c--

d++

P c!m d!m; τ

d!m

Pc c?m

τ

Pd d?m

τ

m

ε

c

d

c=1

d=0m

• Replace c++ by c!m

• Replace c-- by d!m; τ

Page 59: Reachability of Communicating Timed Processesvacsim.inria.fr/Reunions/2013-Avril/Labri.pdf · Reachability of Communicating Timed Processes Lorenzo Clemente !1", Frédéric Herbreteau

Discrete time

A c++ c--

d++

P c!m d!m; τ

d!m

Pc c?m

τ

Pd d?m

τ

m

m

c

d

c=1

d=0m

• Replace c++ by c!m

• Replace c-- by d!m; τ

Page 60: Reachability of Communicating Timed Processesvacsim.inria.fr/Reunions/2013-Avril/Labri.pdf · Reachability of Communicating Timed Processes Lorenzo Clemente !1", Frédéric Herbreteau

Discrete time

A c++ c--

d++

P c!m d!m; τ

d!m

Pc c?m

τ

Pd d?m

τ

m

c

d

c=1

d=0

ε

• Replace c++ by c!m

• Replace c-- by d!m; τ

Page 61: Reachability of Communicating Timed Processesvacsim.inria.fr/Reunions/2013-Avril/Labri.pdf · Reachability of Communicating Timed Processes Lorenzo Clemente !1", Frédéric Herbreteau

Discrete time

A c++ c--

d++

P c!m d!m; τ

d!m

Pc c?m

τ

Pd d?m

τ

m

c

d

c=1

d=0

ε

• Replace c++ by c!m

• Replace c-- by d!m; τ

Page 62: Reachability of Communicating Timed Processesvacsim.inria.fr/Reunions/2013-Avril/Labri.pdf · Reachability of Communicating Timed Processes Lorenzo Clemente !1", Frédéric Herbreteau

Discrete time

A c++ c--

d++

P c!m d!m; τ

d!m

Pc c?m

τ

Pd d?m

τ

m

c

d

c=1

d=1

ε

• Replace c++ by c!m

• Replace c-- by d!m; τ

Page 63: Reachability of Communicating Timed Processesvacsim.inria.fr/Reunions/2013-Avril/Labri.pdf · Reachability of Communicating Timed Processes Lorenzo Clemente !1", Frédéric Herbreteau

Discrete time

A c++ c--

d++

P c!m d!m; τ

d!m

Pc c?m

τ

Pd d?m

τ

m

c

d

m

c=1

d=1

• Replace c++ by c!m

• Replace c-- by d!m; τ

Page 64: Reachability of Communicating Timed Processesvacsim.inria.fr/Reunions/2013-Avril/Labri.pdf · Reachability of Communicating Timed Processes Lorenzo Clemente !1", Frédéric Herbreteau

Discrete time

A c++ c--

d++

P c!m d!m; τ

d!m

Pc c?m

τ

Pd d?m

τ

m

c

d

m

c=0

d=1

• Replace c++ by c!m

• Replace c-- by d!m; τ

Page 65: Reachability of Communicating Timed Processesvacsim.inria.fr/Reunions/2013-Avril/Labri.pdf · Reachability of Communicating Timed Processes Lorenzo Clemente !1", Frédéric Herbreteau

Discrete time

A c++ c--

d++

P c!m d!m; τ

d!m

Pc c?m

τ

Pd d?m

τ

ε

c

d

m

c=0

d=1

• Replace c++ by c!m

• Replace c-- by d!m; τ

Page 66: Reachability of Communicating Timed Processesvacsim.inria.fr/Reunions/2013-Avril/Labri.pdf · Reachability of Communicating Timed Processes Lorenzo Clemente !1", Frédéric Herbreteau

Discrete time

A c++ c--

d++

P c!m d!m; τ

d!m

Pc c?m

τ

Pd d?m

τ

c

d

m

c=0

d=2ε

• Replace c++ by c!m

• Replace c-- by d!m; τ

Page 67: Reachability of Communicating Timed Processesvacsim.inria.fr/Reunions/2013-Avril/Labri.pdf · Reachability of Communicating Timed Processes Lorenzo Clemente !1", Frédéric Herbreteau

Discrete time

A c++ c--

d++

P c!m d!m; τ

Pc c?m

τ

Pd d?m

τ

c

d

c=0

d=2ε

d!m m m• Replace c++ by c!m

• Replace c-- by d!m; τ

Page 68: Reachability of Communicating Timed Processesvacsim.inria.fr/Reunions/2013-Avril/Labri.pdf · Reachability of Communicating Timed Processes Lorenzo Clemente !1", Frédéric Herbreteau

Discrete time Network of

Communicating Tick Automata

PetriNets

un-counter

The construction can be adapted to work for any given star topology

P

Pd1

Pdn

given countersd_1...d_n

...

Page 69: Reachability of Communicating Timed Processesvacsim.inria.fr/Reunions/2013-Avril/Labri.pdf · Reachability of Communicating Timed Processes Lorenzo Clemente !1", Frédéric Herbreteau

Discrete time Network of

Communicating Tick Automata

PetriNets

un-counter

The construction can be adapted to work for any given star topology

P

Pd1

Pdn

given countersc_1...c_m andd_1...d_n

Pc1

Pcm

... ...

Page 70: Reachability of Communicating Timed Processesvacsim.inria.fr/Reunions/2013-Avril/Labri.pdf · Reachability of Communicating Timed Processes Lorenzo Clemente !1", Frédéric Herbreteau

Discrete time (summary)

Network of Communicating Tick Automata

Petri NetsPetri Nets

Theorem: Reachability decidable iff polyforest topology

Theorem: The complexity is the same as Petri nets

(polyforest topologies)

(for any fixed star topology)

Page 71: Reachability of Communicating Timed Processesvacsim.inria.fr/Reunions/2013-Avril/Labri.pdf · Reachability of Communicating Timed Processes Lorenzo Clemente !1", Frédéric Herbreteau

Dense time

Network of Communicating Timed Automata

Theorem: Reachability decidable iff polyforest topology

Theorem: The complexity is Petri net-hard and in Exp-Petri net

(polyforest topologies)

(any topology)

Network of Communicating Tick Automata

un-timing (exponential blow-up)

Page 72: Reachability of Communicating Timed Processesvacsim.inria.fr/Reunions/2013-Avril/Labri.pdf · Reachability of Communicating Timed Processes Lorenzo Clemente !1", Frédéric Herbreteau

Dense time

Network of Communicating Timed Automata

(polyforest topologies)Network of

Communicating Tick Automata

un-timing (exponential blow-up)

Page 73: Reachability of Communicating Timed Processesvacsim.inria.fr/Reunions/2013-Avril/Labri.pdf · Reachability of Communicating Timed Processes Lorenzo Clemente !1", Frédéric Herbreteau

Network of Communicating Timed Automata

Network of Communicating Tick Automata

Dense time

In order to preserve the topology, we would like to apply the region construction locally to each automaton. But this is incorrect.

P

Q

RS

P’’

Q’’

R’’S’’

Page 74: Reachability of Communicating Timed Processesvacsim.inria.fr/Reunions/2013-Avril/Labri.pdf · Reachability of Communicating Timed Processes Lorenzo Clemente !1", Frédéric Herbreteau

Network of Communicating Timed Automata

Network of Communicating Tick Automata

Dense time Network of

Instrumented Timed Automata

Instrumented automaton: just a timed automaton with tick actions

instrumentation

region construction

.

P

Q

RS

P’’

Q’’

R’’S’’

P’

Q’

R’S’

instrumentation region construction

Page 75: Reachability of Communicating Timed Processesvacsim.inria.fr/Reunions/2013-Avril/Labri.pdf · Reachability of Communicating Timed Processes Lorenzo Clemente !1", Frédéric Herbreteau

Network of Communicating Timed Automata

Network of Communicating Tick Automata

Dense time Network of

Instrumented Timed Automata

instrumentation

region construction

.

Intuition for instrumentation:add ticks to mark the beginning and end of integer time points

timed run instrumented run

...0 1 2

a0 a1 a2 ......

0 1 2

a0 a1 a2 ...τ τ τ τ τ

This can be achieved by a simple construction on each timed automaton

Page 76: Reachability of Communicating Timed Processesvacsim.inria.fr/Reunions/2013-Avril/Labri.pdf · Reachability of Communicating Timed Processes Lorenzo Clemente !1", Frédéric Herbreteau

Network of Communicating Timed Automata

Network of Communicating Tick Automata

Dense time Network of

Instrumented Timed Automata

instrumentation

region construction

.

Realising instrumentation:add a new clock t

x>0,!a,{x}P

t=0&x>0,!a,{x}P,0

0<t<1&x>0,!a,{x}P,1

t=0,τ

t=1,τ,{t}

t=0,τ

t=1,τ,{t}

Page 77: Reachability of Communicating Timed Processesvacsim.inria.fr/Reunions/2013-Avril/Labri.pdf · Reachability of Communicating Timed Processes Lorenzo Clemente !1", Frédéric Herbreteau

Network of Communicating Timed Automata

Network of Communicating Tick Automata

Dense time Network of

Instrumented Timed Automata

instrumentation

region construction

.

P

Q

RS

P’’

Q’’

R’’S’’

P’

Q’

R’S’

instrumentation region construction

has an accepting run

has an accepting run

has an accepting runiff only if

The other direction follows from a Rescheduling Lemma for timed automata

Page 78: Reachability of Communicating Timed Processesvacsim.inria.fr/Reunions/2013-Avril/Labri.pdf · Reachability of Communicating Timed Processes Lorenzo Clemente !1", Frédéric Herbreteau

Dense time P’’

Q’’

R’’S’’

P’

Q’

R’S’

region construction

has an accepting run

has an accepting runif

• An accepting run on the left induces a local accepting run in each P’’, Q’’, etc...

• Instrumentation guarantees that integral timestamps agree.

• What about non-integral ones?Instrumentation just ensures that they are in the same interval (k, k+1)

...0 1 2

a0 a1 a2 ...τ τ τ τ τ

Need to preserve send/receive causality ordering!

A Rescheduling Lemma ensures that on polyforest topologies timestamps can be chosen to preserve causality

Page 79: Reachability of Communicating Timed Processesvacsim.inria.fr/Reunions/2013-Avril/Labri.pdf · Reachability of Communicating Timed Processes Lorenzo Clemente !1", Frédéric Herbreteau

Dense time

Network of Communicating Timed Automata

(polyforest topologies)

(any topology)

Network of Communicating Tick Automata

un-timing (exponential blow-up)

Page 80: Reachability of Communicating Timed Processesvacsim.inria.fr/Reunions/2013-Avril/Labri.pdf · Reachability of Communicating Timed Processes Lorenzo Clemente !1", Frédéric Herbreteau

Network of Communicating Timed Automata

Network of Communicating Tick Automata

Dense time

Simulate ticks locally by interpreting τ as one time unit

τP !a t=1, {t}P’ t=0,!a

(any topology)

Page 81: Reachability of Communicating Timed Processesvacsim.inria.fr/Reunions/2013-Avril/Labri.pdf · Reachability of Communicating Timed Processes Lorenzo Clemente !1", Frédéric Herbreteau

Dense time (summary)

Network of Communicating Timed Automata

Theorem: Reachability decidable iff polyforest topology

Theorem: The complexity is Petri net-hard and in Exp-Petri net

(polyforest topologies)

(any topology)

Network of Communicating Tick Automata

un-timing (exponential blow-up)

Page 82: Reachability of Communicating Timed Processesvacsim.inria.fr/Reunions/2013-Avril/Labri.pdf · Reachability of Communicating Timed Processes Lorenzo Clemente !1", Frédéric Herbreteau

Extension: UrgencyNot shown in this presentation: Urgent channels

• Urgency: receptions have priority over internal actions.

• We show that urgent channel are equivalent to zero tests on counters.

Theorem (Discrete time): Rechability decidable iff at most 1 urgent channel for each weakly connected component.

• [Krcal&Yi’06]: Reachability is undecidable in the urgent pipeline of length 2.

Extension (Dense time): Reachabiliy undecidable if any weakly connected component contains at least 2 urgent channels.

P Q R

Page 83: Reachability of Communicating Timed Processesvacsim.inria.fr/Reunions/2013-Avril/Labri.pdf · Reachability of Communicating Timed Processes Lorenzo Clemente !1", Frédéric Herbreteau

Future directions

• Our generic topology-preserving transformation dense --> discrete time does not work in the presence of urgency.

• Obtain a complete characterisation in the presence of urgency also for dense time.

• Study richer models where timestamps can be sent along the channel.