techniques and tools for the analysis of timed workflowsicetcs.ru.is/nwpt2015/slides/jiri.pdf ·...

77
Techniques and Tools for the Analysis of Timed Workflows Jiri Srba Department of Computer Science, Aalborg University, Selma Lagerl¨ofs Vej 300, 9220 Aalborg East, Denmark NWPT’15, Iceland, October 22nd, 2015 Joint work with Peter G. Jensen, Jos´ e A. Mateo and Mathias G. Sørensen.

Upload: others

Post on 18-Oct-2020

1 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Techniques and Tools for the Analysis of Timed Workflowsicetcs.ru.is/nwpt2015/SLIDES/Jiri.pdf · Techniques and Tools for the Analysis of Timed Work ows Jiri Srba Department of Computer

Techniques and Tools for the Analysis ofTimed Workflows

Jiri Srba

Department of Computer Science, Aalborg University,Selma Lagerlofs Vej 300, 9220 Aalborg East, Denmark

NWPT’15, Iceland, October 22nd, 2015

Joint work with Peter G. Jensen, Jose A. Mateo and Mathias G. Sørensen.

Page 2: Techniques and Tools for the Analysis of Timed Workflowsicetcs.ru.is/nwpt2015/SLIDES/Jiri.pdf · Techniques and Tools for the Analysis of Timed Work ows Jiri Srba Department of Computer

Workflow Definition

Workflows [Wikipedia]

A workflow consists of

an orchestrated and repeatable pattern of business activity

enabled by the systematic organization of resources intoprocesses that transform materials, provide services, or processinformation.

Examples:

Car assembly line.

Insurance claim.

Blood transfusion.

All these are examples of time-critical workflows.

There is a need for methods and tools for timed workflow analysis.

2 / 26

Page 3: Techniques and Tools for the Analysis of Timed Workflowsicetcs.ru.is/nwpt2015/SLIDES/Jiri.pdf · Techniques and Tools for the Analysis of Timed Work ows Jiri Srba Department of Computer

Workflow Definition

Workflows [Wikipedia]

A workflow consists of

an orchestrated and repeatable pattern of business activity

enabled by the systematic organization of resources intoprocesses that transform materials, provide services, or processinformation.

Examples:

Car assembly line.

Insurance claim.

Blood transfusion.

All these are examples of time-critical workflows.

There is a need for methods and tools for timed workflow analysis.

2 / 26

Page 4: Techniques and Tools for the Analysis of Timed Workflowsicetcs.ru.is/nwpt2015/SLIDES/Jiri.pdf · Techniques and Tools for the Analysis of Timed Work ows Jiri Srba Department of Computer

Introduction — Workflow Nets

Workflow nets by Wil van der Aalst [ICATPN’97] are widelyused for workflow modelling.

Based on Petri nets.

Abstraction from data, focus on execution flow.

Early detection of design errors like deadlocks, livelocks andother abnormal behaviour.

Classical soundness for workflow nets:

option to complete,proper termination, andabsence of redundant tasks.

3 / 26

Page 5: Techniques and Tools for the Analysis of Timed Workflowsicetcs.ru.is/nwpt2015/SLIDES/Jiri.pdf · Techniques and Tools for the Analysis of Timed Work ows Jiri Srba Department of Computer

Focus of the Talk

Theory of workflow nets based on timed-arc Petri nets.

Definition of soundness and strong soundness.

Results about decidability/undecidability of soundness.

Minimum and maximum execution time of workflow nets.

Integration within the tool TAPAAL and case studies.

Discrete vs. continuous time.

4 / 26

Page 6: Techniques and Tools for the Analysis of Timed Workflowsicetcs.ru.is/nwpt2015/SLIDES/Jiri.pdf · Techniques and Tools for the Analysis of Timed Work ows Jiri Srba Department of Computer

Timed-Arc Petri Net: Booking/Payment Example

0

in

inv: ≤ 5

booking

inv: ≤ 10

payment

successful

out

start

book pay

success

[2, 5]

5 / 26

Page 7: Techniques and Tools for the Analysis of Timed Workflowsicetcs.ru.is/nwpt2015/SLIDES/Jiri.pdf · Techniques and Tools for the Analysis of Timed Work ows Jiri Srba Department of Computer

Timed-Arc Petri Net: Booking/Payment Example

in

0

inv: ≤ 5

booking

inv: ≤ 10

payment

successful

out

start

book pay

success

[2, 5]

5 / 26

Page 8: Techniques and Tools for the Analysis of Timed Workflowsicetcs.ru.is/nwpt2015/SLIDES/Jiri.pdf · Techniques and Tools for the Analysis of Timed Work ows Jiri Srba Department of Computer

Timed-Arc Petri Net: Booking/Payment Example

in

1

inv: ≤ 5

booking

inv: ≤ 10

payment

successful

out

start

book pay

success

[2, 5]

5 / 26

Page 9: Techniques and Tools for the Analysis of Timed Workflowsicetcs.ru.is/nwpt2015/SLIDES/Jiri.pdf · Techniques and Tools for the Analysis of Timed Work ows Jiri Srba Department of Computer

Timed-Arc Petri Net: Booking/Payment Example

in

2

inv: ≤ 5

booking

inv: ≤ 10

payment

successful

out

start

book pay

success

[2, 5]

5 / 26

Page 10: Techniques and Tools for the Analysis of Timed Workflowsicetcs.ru.is/nwpt2015/SLIDES/Jiri.pdf · Techniques and Tools for the Analysis of Timed Work ows Jiri Srba Department of Computer

Timed-Arc Petri Net: Booking/Payment Example

in

5

inv: ≤ 5

booking

inv: ≤ 10

payment

successful

out

start

book pay

success

[2, 5]

5 / 26

Page 11: Techniques and Tools for the Analysis of Timed Workflowsicetcs.ru.is/nwpt2015/SLIDES/Jiri.pdf · Techniques and Tools for the Analysis of Timed Work ows Jiri Srba Department of Computer

Timed-Arc Petri Net: Booking/Payment Example

in

inv: ≤ 5

booking

5

inv: ≤ 10

payment

successful

out

start

book pay

success

[2, 5]

5 / 26

Page 12: Techniques and Tools for the Analysis of Timed Workflowsicetcs.ru.is/nwpt2015/SLIDES/Jiri.pdf · Techniques and Tools for the Analysis of Timed Work ows Jiri Srba Department of Computer

Timed-Arc Petri Net: Booking/Payment Example

in

inv: ≤ 5

booking

8

inv: ≤ 10

payment

successful

out

start

book pay

success

[2, 5]

5 / 26

Page 13: Techniques and Tools for the Analysis of Timed Workflowsicetcs.ru.is/nwpt2015/SLIDES/Jiri.pdf · Techniques and Tools for the Analysis of Timed Work ows Jiri Srba Department of Computer

Timed-Arc Petri Net: Booking/Payment Example

in

inv: ≤ 5

booking

inv: ≤ 10

payment

0

successful

out

start

book pay

success

[2, 5]

5 / 26

Page 14: Techniques and Tools for the Analysis of Timed Workflowsicetcs.ru.is/nwpt2015/SLIDES/Jiri.pdf · Techniques and Tools for the Analysis of Timed Work ows Jiri Srba Department of Computer

Timed-Arc Petri Net: Booking/Payment Example

in

inv: ≤ 5

booking

inv: ≤ 10

payment

successful

0

out

start

book pay

success

[2, 5]

5 / 26

Page 15: Techniques and Tools for the Analysis of Timed Workflowsicetcs.ru.is/nwpt2015/SLIDES/Jiri.pdf · Techniques and Tools for the Analysis of Timed Work ows Jiri Srba Department of Computer

Timed-Arc Petri Net: Booking/Payment Example

in

inv: ≤ 5

booking

inv: ≤ 10

payment

successful

out

start

book pay

restart restart success

fail

[5,5]

fail

[10,10]

[2, 5]

5 / 26

Page 16: Techniques and Tools for the Analysis of Timed Workflowsicetcs.ru.is/nwpt2015/SLIDES/Jiri.pdf · Techniques and Tools for the Analysis of Timed Work ows Jiri Srba Department of Computer

Timed-Arc Petri Net: Booking/Payment Example

in

inv: ≤ 5

booking

inv: ≤ 10

payment

successful

out

attempts

start 3×

book pay

restart restart empty success

fail

[5,5]

fail

[10,10]

[2, 5]

5 / 26

Page 17: Techniques and Tools for the Analysis of Timed Workflowsicetcs.ru.is/nwpt2015/SLIDES/Jiri.pdf · Techniques and Tools for the Analysis of Timed Work ows Jiri Srba Department of Computer

Timed-Arc Petri Net: Booking/Payment Example

0

in

inv: ≤ 5

booking

inv: ≤ 10

payment

successful

out

attempts

start 3×

book pay

restart restart empty success

fail

[5,5]

fail

[10,10]

[2, 5]

5 / 26

Page 18: Techniques and Tools for the Analysis of Timed Workflowsicetcs.ru.is/nwpt2015/SLIDES/Jiri.pdf · Techniques and Tools for the Analysis of Timed Work ows Jiri Srba Department of Computer

Timed-Arc Petri Net: Booking/Payment Example

in

0

inv: ≤ 5

booking

inv: ≤ 10

payment

successful

out

0 0 0attempts

start 3×

book pay

restart restart empty success

fail

[5,5]

fail

[10,10]

[2, 5]

5 / 26

Page 19: Techniques and Tools for the Analysis of Timed Workflowsicetcs.ru.is/nwpt2015/SLIDES/Jiri.pdf · Techniques and Tools for the Analysis of Timed Work ows Jiri Srba Department of Computer

Timed-Arc Petri Net: Booking/Payment Example

in

2

inv: ≤ 5

booking

inv: ≤ 10

payment

successful

out

2 2 2attempts

start 3×

book pay

restart restart empty success

fail

[5,5]

fail

[10,10]

[2, 5]

5 / 26

Page 20: Techniques and Tools for the Analysis of Timed Workflowsicetcs.ru.is/nwpt2015/SLIDES/Jiri.pdf · Techniques and Tools for the Analysis of Timed Work ows Jiri Srba Department of Computer

Timed-Arc Petri Net: Booking/Payment Example

in

0

inv: ≤ 5

booking

inv: ≤ 10

payment

successful

out

2 2attempts

start 3×

book pay

restart restart empty success

fail

[5,5]

fail

[10,10]

[2, 5]

5 / 26

Page 21: Techniques and Tools for the Analysis of Timed Workflowsicetcs.ru.is/nwpt2015/SLIDES/Jiri.pdf · Techniques and Tools for the Analysis of Timed Work ows Jiri Srba Department of Computer

Timed-Arc Petri Net: Booking/Payment Example

in

3

inv: ≤ 5

booking

inv: ≤ 10

payment

successful

out

5 5attempts

start 3×

book pay

restart restart empty success

fail

[5,5]

fail

[10,10]

[2, 5]

5 / 26

Page 22: Techniques and Tools for the Analysis of Timed Workflowsicetcs.ru.is/nwpt2015/SLIDES/Jiri.pdf · Techniques and Tools for the Analysis of Timed Work ows Jiri Srba Department of Computer

Timed-Arc Petri Net: Booking/Payment Example

in

inv: ≤ 5

booking

3

inv: ≤ 10

payment

successful

out

7 7attempts

start 3×

book pay

restart restart empty success

fail

[5,5]

fail

[10,10]

[2, 5]

5 / 26

Page 23: Techniques and Tools for the Analysis of Timed Workflowsicetcs.ru.is/nwpt2015/SLIDES/Jiri.pdf · Techniques and Tools for the Analysis of Timed Work ows Jiri Srba Department of Computer

Timed-Arc Petri Net: Booking/Payment Example

in

inv: ≤ 5

booking

5

inv: ≤ 10

payment

successful

out

9 9attempts

start 3×

book pay

restart restart empty success

fail

[5,5]

fail

[10,10]

[2, 5]

5 / 26

Page 24: Techniques and Tools for the Analysis of Timed Workflowsicetcs.ru.is/nwpt2015/SLIDES/Jiri.pdf · Techniques and Tools for the Analysis of Timed Work ows Jiri Srba Department of Computer

Timed-Arc Petri Net: Booking/Payment Example

in

inv: ≤ 5

booking

inv: ≤ 10

payment

0

successful

out

9 9attempts

start 3×

book pay

restart restart empty success

fail

[5,5]

fail

[10,10]

[2, 5]

5 / 26

Page 25: Techniques and Tools for the Analysis of Timed Workflowsicetcs.ru.is/nwpt2015/SLIDES/Jiri.pdf · Techniques and Tools for the Analysis of Timed Work ows Jiri Srba Department of Computer

Timed-Arc Petri Net: Booking/Payment Example

in

inv: ≤ 5

booking

inv: ≤ 10

payment

0

successful

out

9attempts

start 3×

book pay

restart restart empty success

fail

[5,5]

fail

[10,10]

[2, 5]

5 / 26

Page 26: Techniques and Tools for the Analysis of Timed Workflowsicetcs.ru.is/nwpt2015/SLIDES/Jiri.pdf · Techniques and Tools for the Analysis of Timed Work ows Jiri Srba Department of Computer

Timed-Arc Petri Net: Booking/Payment Example

in

inv: ≤ 5

booking

inv: ≤ 10

payment

0

successful

out

attempts

start 3×

book pay

restart restart empty success

fail

[5,5]

fail

[10,10]

[2, 5]

5 / 26

Page 27: Techniques and Tools for the Analysis of Timed Workflowsicetcs.ru.is/nwpt2015/SLIDES/Jiri.pdf · Techniques and Tools for the Analysis of Timed Work ows Jiri Srba Department of Computer

Timed-Arc Petri Net: Booking/Payment Example

in

inv: ≤ 5

booking

inv: ≤ 10

payment

successful

0

out

attempts

start 3×

book pay

restart restart empty success

fail

[5,5]

fail

[10,10]

[2, 5]

5 / 26

Page 28: Techniques and Tools for the Analysis of Timed Workflowsicetcs.ru.is/nwpt2015/SLIDES/Jiri.pdf · Techniques and Tools for the Analysis of Timed Work ows Jiri Srba Department of Computer

Monotonic Timed-Arc Petri Nets

Timed-Arc Petri Nets (TAPN) Modelling Features:

Timed tokens, intervals (guards) on arcs.

Weighted arcs.

Transport arcs.

Inhibitor arcs.

Age invariants.

Urgent transitions.

Monotonic Timed-Arc Petri Nets (MTAPN)

No inhibitor arcs, no age invariants, no urgent transitions.

We consider the integer-delay (discrete-time) semantics (for now).

6 / 26

Page 29: Techniques and Tools for the Analysis of Timed Workflowsicetcs.ru.is/nwpt2015/SLIDES/Jiri.pdf · Techniques and Tools for the Analysis of Timed Work ows Jiri Srba Department of Computer

Monotonic Timed-Arc Petri Nets

Timed-Arc Petri Nets (TAPN) Modelling Features:

Timed tokens, intervals (guards) on arcs.

Weighted arcs.

Transport arcs.

Inhibitor arcs.

Age invariants.

Urgent transitions.

Monotonic Timed-Arc Petri Nets (MTAPN)

No inhibitor arcs, no age invariants, no urgent transitions.

We consider the integer-delay (discrete-time) semantics (for now).

6 / 26

Page 30: Techniques and Tools for the Analysis of Timed Workflowsicetcs.ru.is/nwpt2015/SLIDES/Jiri.pdf · Techniques and Tools for the Analysis of Timed Work ows Jiri Srba Department of Computer

Marking Extrapolation

Marking in TAPN

M : P → B(N0)

Problem

Infinitely many markings even for bounded nets.

We define cut(M) extrapolation for a marking M:

compute for each place maximum relevant token ages

Cmax : P → (N0 ∪ {−1})

change the age of each token in place p exceeding the boundCmax(p) into Cmax(p) + 1.

7 / 26

Page 31: Techniques and Tools for the Analysis of Timed Workflowsicetcs.ru.is/nwpt2015/SLIDES/Jiri.pdf · Techniques and Tools for the Analysis of Timed Work ows Jiri Srba Department of Computer

Monotonicity Lemma for MTAPN

Monotonicity Lemma (t is transition, d is delay)

Let M and M ′ be markings in an MTAPN s.t. cut(M) v cut(M ′).

If Mt−→ M1 then M ′

t−→ M ′1 and cut(M1) v cut(M ′1).

If Md−→ M1 then M ′

d−→ M ′1 and cut(M1) v cut(M ′1).

Fact: inhibitor arcs, age invariants and urgency break monotonicity.

8 / 26

Page 32: Techniques and Tools for the Analysis of Timed Workflowsicetcs.ru.is/nwpt2015/SLIDES/Jiri.pdf · Techniques and Tools for the Analysis of Timed Work ows Jiri Srba Department of Computer

Timed-Arc Workflow Net

Definition

A TAPN is called a timed-arc workflow net if

it has a unique place in ∈ P s.t. •in = ∅ and in• 6= ∅,it has a unique place out ∈ P s.t. out• = ∅ and •out 6= ∅,•p 6= ∅ and p• 6= ∅ for all p ∈ P \ {in, out}, and•t 6= ∅ for all t ∈ T .

in outstart working

inv: ≤ 10

finish[5, 10]

An initial marking has just one token of age 0 in the place in.

A final marking has exactly one token in place out and allother places are empty.

9 / 26

Page 33: Techniques and Tools for the Analysis of Timed Workflowsicetcs.ru.is/nwpt2015/SLIDES/Jiri.pdf · Techniques and Tools for the Analysis of Timed Work ows Jiri Srba Department of Computer

Timed-Arc Workflow Net

Definition

A TAPN is called a timed-arc workflow net if

it has a unique place in ∈ P s.t. •in = ∅ and in• 6= ∅,it has a unique place out ∈ P s.t. out• = ∅ and •out 6= ∅,•p 6= ∅ and p• 6= ∅ for all p ∈ P \ {in, out}, and•t 6= ∅ for all t ∈ T .

in outstart working

inv: ≤ 10

finish[5, 10]

An initial marking has just one token of age 0 in the place in.

A final marking has exactly one token in place out and allother places are empty.

9 / 26

Page 34: Techniques and Tools for the Analysis of Timed Workflowsicetcs.ru.is/nwpt2015/SLIDES/Jiri.pdf · Techniques and Tools for the Analysis of Timed Work ows Jiri Srba Department of Computer

Timed-Arc Workflow Net

Definition

A TAPN is called a timed-arc workflow net if

it has a unique place in ∈ P s.t. •in = ∅ and in• 6= ∅,it has a unique place out ∈ P s.t. out• = ∅ and •out 6= ∅,•p 6= ∅ and p• 6= ∅ for all p ∈ P \ {in, out}, and•t 6= ∅ for all t ∈ T .

0

in outstart working

inv: ≤ 10

finish[5, 10]

An initial marking has just one token of age 0 in the place in.

A final marking has exactly one token in place out and allother places are empty.

9 / 26

Page 35: Techniques and Tools for the Analysis of Timed Workflowsicetcs.ru.is/nwpt2015/SLIDES/Jiri.pdf · Techniques and Tools for the Analysis of Timed Work ows Jiri Srba Department of Computer

Timed-Arc Workflow Net

Definition

A TAPN is called a timed-arc workflow net if

it has a unique place in ∈ P s.t. •in = ∅ and in• 6= ∅,it has a unique place out ∈ P s.t. out• = ∅ and •out 6= ∅,•p 6= ∅ and p• 6= ∅ for all p ∈ P \ {in, out}, and•t 6= ∅ for all t ∈ T .

in outstart

0

working

inv: ≤ 10

finish[5, 10]

An initial marking has just one token of age 0 in the place in.

A final marking has exactly one token in place out and allother places are empty.

9 / 26

Page 36: Techniques and Tools for the Analysis of Timed Workflowsicetcs.ru.is/nwpt2015/SLIDES/Jiri.pdf · Techniques and Tools for the Analysis of Timed Work ows Jiri Srba Department of Computer

Timed-Arc Workflow Net

Definition

A TAPN is called a timed-arc workflow net if

it has a unique place in ∈ P s.t. •in = ∅ and in• 6= ∅,it has a unique place out ∈ P s.t. out• = ∅ and •out 6= ∅,•p 6= ∅ and p• 6= ∅ for all p ∈ P \ {in, out}, and•t 6= ∅ for all t ∈ T .

in outstart

7

working

inv: ≤ 10

finish[5, 10]

An initial marking has just one token of age 0 in the place in.

A final marking has exactly one token in place out and allother places are empty.

9 / 26

Page 37: Techniques and Tools for the Analysis of Timed Workflowsicetcs.ru.is/nwpt2015/SLIDES/Jiri.pdf · Techniques and Tools for the Analysis of Timed Work ows Jiri Srba Department of Computer

Timed-Arc Workflow Net

Definition

A TAPN is called a timed-arc workflow net if

it has a unique place in ∈ P s.t. •in = ∅ and in• 6= ∅,it has a unique place out ∈ P s.t. out• = ∅ and •out 6= ∅,•p 6= ∅ and p• 6= ∅ for all p ∈ P \ {in, out}, and•t 6= ∅ for all t ∈ T .

in

0

outstart working

inv: ≤ 10

finish[5, 10]

An initial marking has just one token of age 0 in the place in.

A final marking has exactly one token in place out and allother places are empty.

9 / 26

Page 38: Techniques and Tools for the Analysis of Timed Workflowsicetcs.ru.is/nwpt2015/SLIDES/Jiri.pdf · Techniques and Tools for the Analysis of Timed Work ows Jiri Srba Department of Computer

Soundness of Timed-Arc Workflow Nets

Definition

A timed-arc workflow net is sound if for any marking M reachablefrom the initial marking holds:

1 from M it is possible to reach some final marking, and

2 if M(out) contains a token then M is a final marking.

Soundness Implies Boundedness

If N is a sound and monotonic timed-arc workflow net then N isbounded.

10 / 26

Page 39: Techniques and Tools for the Analysis of Timed Workflowsicetcs.ru.is/nwpt2015/SLIDES/Jiri.pdf · Techniques and Tools for the Analysis of Timed Work ows Jiri Srba Department of Computer

Soundness of Timed-Arc Workflow Nets

Definition

A timed-arc workflow net is sound if for any marking M reachablefrom the initial marking holds:

1 from M it is possible to reach some final marking, and

2 if M(out) contains a token then M is a final marking.

Soundness Implies Boundedness

If N is a sound and monotonic timed-arc workflow net then N isbounded.

10 / 26

Page 40: Techniques and Tools for the Analysis of Timed Workflowsicetcs.ru.is/nwpt2015/SLIDES/Jiri.pdf · Techniques and Tools for the Analysis of Timed Work ows Jiri Srba Department of Computer

Sound and Unbounded Net with Age Invariants

in

p1

inv: ≤ 0

p2

out

t1

[0, 0]

[1,∞]

t2

Sound and Unbounded Net with Urgent Transitions

Remove age invariant ≤ 0 at place p2 and make t2 urgent.

11 / 26

Page 41: Techniques and Tools for the Analysis of Timed Workflowsicetcs.ru.is/nwpt2015/SLIDES/Jiri.pdf · Techniques and Tools for the Analysis of Timed Work ows Jiri Srba Department of Computer

Sound and Unbounded Net with Age Invariants

0

in

p1

inv: ≤ 0

p2

out

t1

[0, 0]

[1,∞]

t2

Sound and Unbounded Net with Urgent Transitions

Remove age invariant ≤ 0 at place p2 and make t2 urgent.

11 / 26

Page 42: Techniques and Tools for the Analysis of Timed Workflowsicetcs.ru.is/nwpt2015/SLIDES/Jiri.pdf · Techniques and Tools for the Analysis of Timed Work ows Jiri Srba Department of Computer

Sound and Unbounded Net with Age Invariants

in

0

p1

inv: ≤ 0

p2

out

t1

[0, 0]

[1,∞]

t2

Sound and Unbounded Net with Urgent Transitions

Remove age invariant ≤ 0 at place p2 and make t2 urgent.

11 / 26

Page 43: Techniques and Tools for the Analysis of Timed Workflowsicetcs.ru.is/nwpt2015/SLIDES/Jiri.pdf · Techniques and Tools for the Analysis of Timed Work ows Jiri Srba Department of Computer

Sound and Unbounded Net with Age Invariants

in

0

p1

0 inv: ≤ 0

p2

out

t1

[0, 0]

[1,∞]

t2

Sound and Unbounded Net with Urgent Transitions

Remove age invariant ≤ 0 at place p2 and make t2 urgent.

11 / 26

Page 44: Techniques and Tools for the Analysis of Timed Workflowsicetcs.ru.is/nwpt2015/SLIDES/Jiri.pdf · Techniques and Tools for the Analysis of Timed Work ows Jiri Srba Department of Computer

Sound and Unbounded Net with Age Invariants

in

0

p1

0 0 inv: ≤ 0

p2

out

t1

[0, 0]

[1,∞]

t2

Sound and Unbounded Net with Urgent Transitions

Remove age invariant ≤ 0 at place p2 and make t2 urgent.

11 / 26

Page 45: Techniques and Tools for the Analysis of Timed Workflowsicetcs.ru.is/nwpt2015/SLIDES/Jiri.pdf · Techniques and Tools for the Analysis of Timed Work ows Jiri Srba Department of Computer

Sound and Unbounded Net with Age Invariants

in

0

p1

0 inv: ≤ 0

p2

out

t1

[0, 0]

[1,∞]

t2

Sound and Unbounded Net with Urgent Transitions

Remove age invariant ≤ 0 at place p2 and make t2 urgent.

11 / 26

Page 46: Techniques and Tools for the Analysis of Timed Workflowsicetcs.ru.is/nwpt2015/SLIDES/Jiri.pdf · Techniques and Tools for the Analysis of Timed Work ows Jiri Srba Department of Computer

Sound and Unbounded Net with Age Invariants

in

0

p1

inv: ≤ 0

p2

out

t1

[0, 0]

[1,∞]

t2

Sound and Unbounded Net with Urgent Transitions

Remove age invariant ≤ 0 at place p2 and make t2 urgent.

11 / 26

Page 47: Techniques and Tools for the Analysis of Timed Workflowsicetcs.ru.is/nwpt2015/SLIDES/Jiri.pdf · Techniques and Tools for the Analysis of Timed Work ows Jiri Srba Department of Computer

Sound and Unbounded Net with Age Invariants

in

1

p1

inv: ≤ 0

p2

out

t1

[0, 0]

[1,∞]

t2

Sound and Unbounded Net with Urgent Transitions

Remove age invariant ≤ 0 at place p2 and make t2 urgent.

11 / 26

Page 48: Techniques and Tools for the Analysis of Timed Workflowsicetcs.ru.is/nwpt2015/SLIDES/Jiri.pdf · Techniques and Tools for the Analysis of Timed Work ows Jiri Srba Department of Computer

Sound and Unbounded Net with Age Invariants

in

p1

inv: ≤ 0

p2

0

out

t1

[0, 0]

[1,∞]

t2

Sound and Unbounded Net with Urgent Transitions

Remove age invariant ≤ 0 at place p2 and make t2 urgent.

11 / 26

Page 49: Techniques and Tools for the Analysis of Timed Workflowsicetcs.ru.is/nwpt2015/SLIDES/Jiri.pdf · Techniques and Tools for the Analysis of Timed Work ows Jiri Srba Department of Computer

Sound and Unbounded Net with Age Invariants

in

p1

////inv://////≤ 0

p2

out

t1

[0, 0]

[1,∞]

t2

Sound and Unbounded Net with Urgent Transitions

Remove age invariant ≤ 0 at place p2 and make t2 urgent.

11 / 26

Page 50: Techniques and Tools for the Analysis of Timed Workflowsicetcs.ru.is/nwpt2015/SLIDES/Jiri.pdf · Techniques and Tools for the Analysis of Timed Work ows Jiri Srba Department of Computer

Decidability of Soundness

Theorem

Soundness is undecidable for timed-arc workflow nets.

Undecidable even for monotonic nets with only inhibitor arcs, oronly age invariants, or only urgent transitions.

Theorem

Soundness is decidable for

bounded timed-arc workflow nets, and for

monotonic timed-arc workflow nets.

Proof: Forward and backward search through the extrapolatedstate-space (using the function cut). Termination for MTAPN dueto the monotonicity lemma.

12 / 26

Page 51: Techniques and Tools for the Analysis of Timed Workflowsicetcs.ru.is/nwpt2015/SLIDES/Jiri.pdf · Techniques and Tools for the Analysis of Timed Work ows Jiri Srba Department of Computer

Decidability of Soundness

Theorem

Soundness is undecidable for timed-arc workflow nets.

Undecidable even for monotonic nets with only inhibitor arcs, oronly age invariants, or only urgent transitions.

Theorem

Soundness is decidable for

bounded timed-arc workflow nets, and for

monotonic timed-arc workflow nets.

Proof: Forward and backward search through the extrapolatedstate-space (using the function cut). Termination for MTAPN dueto the monotonicity lemma.

12 / 26

Page 52: Techniques and Tools for the Analysis of Timed Workflowsicetcs.ru.is/nwpt2015/SLIDES/Jiri.pdf · Techniques and Tools for the Analysis of Timed Work ows Jiri Srba Department of Computer

Compare Decidability of Soundness with Reachability

Notice that for the subclass of monotonic timed-arc Petri nets

reachability is undecidable [Ruiz, Gomez, Escrig’99], but

soundness is decidable.

Question

Is soundness always sufficient for timed workflows?

13 / 26

Page 53: Techniques and Tools for the Analysis of Timed Workflowsicetcs.ru.is/nwpt2015/SLIDES/Jiri.pdf · Techniques and Tools for the Analysis of Timed Work ows Jiri Srba Department of Computer

Compare Decidability of Soundness with Reachability

Notice that for the subclass of monotonic timed-arc Petri nets

reachability is undecidable [Ruiz, Gomez, Escrig’99], but

soundness is decidable.

Question

Is soundness always sufficient for timed workflows?

13 / 26

Page 54: Techniques and Tools for the Analysis of Timed Workflowsicetcs.ru.is/nwpt2015/SLIDES/Jiri.pdf · Techniques and Tools for the Analysis of Timed Work ows Jiri Srba Department of Computer

Customer Complaint Workflow

in out

start

req info provide info

decision

Sound workflow, no timing information, no progress.

14 / 26

Page 55: Techniques and Tools for the Analysis of Timed Workflowsicetcs.ru.is/nwpt2015/SLIDES/Jiri.pdf · Techniques and Tools for the Analysis of Timed Work ows Jiri Srba Department of Computer

Customer Complaint Workflow

in

inv ≤ 14

out

inv ≤ 14

start

req info provide info

decision

Progress is ensured, infinite time-divergent behaviour.

14 / 26

Page 56: Techniques and Tools for the Analysis of Timed Workflowsicetcs.ru.is/nwpt2015/SLIDES/Jiri.pdf · Techniques and Tools for the Analysis of Timed Work ows Jiri Srba Department of Computer

Customer Complaint Workflow

in

inv ≤ 14

out

inv ≤ 14

start

req info provide info

decision

Strongly sound workflow with time-bounded execution.

14 / 26

Page 57: Techniques and Tools for the Analysis of Timed Workflowsicetcs.ru.is/nwpt2015/SLIDES/Jiri.pdf · Techniques and Tools for the Analysis of Timed Work ows Jiri Srba Department of Computer

Strong Soundness

Definition

A timed-arc workflow net is strongly sound if

it is sound,

has no time-divergent markings (except for the final ones), and

every infinite computation is time-bounded.

We can define maximum execution time for strongly sound nets.

Theorem

Strong soundness of timed-arc workflow nets is undecidable.

Theorem

Strong soundness of bounded timed-arc workflow nets is decidable.

Proof: By reduction to reachability on timed-arc Petri nets.

15 / 26

Page 58: Techniques and Tools for the Analysis of Timed Workflowsicetcs.ru.is/nwpt2015/SLIDES/Jiri.pdf · Techniques and Tools for the Analysis of Timed Work ows Jiri Srba Department of Computer

Strong Soundness

Definition

A timed-arc workflow net is strongly sound if

it is sound,

has no time-divergent markings (except for the final ones), and

every infinite computation is time-bounded.

We can define maximum execution time for strongly sound nets.

Theorem

Strong soundness of timed-arc workflow nets is undecidable.

Theorem

Strong soundness of bounded timed-arc workflow nets is decidable.

Proof: By reduction to reachability on timed-arc Petri nets.

15 / 26

Page 59: Techniques and Tools for the Analysis of Timed Workflowsicetcs.ru.is/nwpt2015/SLIDES/Jiri.pdf · Techniques and Tools for the Analysis of Timed Work ows Jiri Srba Department of Computer

Decidability of Strong Soundness (Proof Sketch)

Perform normal soundness check and remember the size S ofits state-space (in the extrapolated semantics).

Let B be the maximum possible delay in any marking.

Check if the given workflow net can delay more thanU = S · B + 1 time units before reaching a final marking.

If yes, it is not strongly sound.If no, it is strongly sound.

0

in out

0

timer

inv: ≤ U

late nok

workflow net N

tick

[U,U]

ok

ups

16 / 26

Page 60: Techniques and Tools for the Analysis of Timed Workflowsicetcs.ru.is/nwpt2015/SLIDES/Jiri.pdf · Techniques and Tools for the Analysis of Timed Work ows Jiri Srba Department of Computer

Implementation and Experiments

All algorithms implemented within TAPAAL (www.tapaal.net).

Publicly available and open-source.

Graphical editor with components, visual simulator.

Efficient engine implementation (including furtheroptimizations).

Case studies:

Break System Control Unit, a part of the SAE standardARP4761 (certification of civil aircrafts).

MPEG-2 encoding algorithm on multi-core processors.

Blood transfusion workflow, a larger benchmarking case-studydescribed in little-JIL workflow language.

Home automation system for light control in a family housewith 16 lights/25 buttons, motion sensors and alarm.

17 / 26

Page 61: Techniques and Tools for the Analysis of Timed Workflowsicetcs.ru.is/nwpt2015/SLIDES/Jiri.pdf · Techniques and Tools for the Analysis of Timed Work ows Jiri Srba Department of Computer

TAPAAL Verification of Break System Control Unit

18 / 26

Page 62: Techniques and Tools for the Analysis of Timed Workflowsicetcs.ru.is/nwpt2015/SLIDES/Jiri.pdf · Techniques and Tools for the Analysis of Timed Work ows Jiri Srba Department of Computer

TAPAAL Verification of Break System Control Unit

18 / 26

Page 63: Techniques and Tools for the Analysis of Timed Workflowsicetcs.ru.is/nwpt2015/SLIDES/Jiri.pdf · Techniques and Tools for the Analysis of Timed Work ows Jiri Srba Department of Computer

Recent TAPAAL Development

TAPAAL is being continuously improved and extended(MPEG-2 workflow analysis with two B-frames took 10s lastyear, now it takes only 1.4s).

Memory preserving data structure PTrie.

MPEG-2 with three B-frames

soundness strong soundness

no PTrie 33s / 1071MB 30s / 970MB

PTrie 42s / 276MB 45s / 191MB

Approximate analysis (smaller constants, less precision).

Compositional, resource-aware analysis.

19 / 26

Page 64: Techniques and Tools for the Analysis of Timed Workflowsicetcs.ru.is/nwpt2015/SLIDES/Jiri.pdf · Techniques and Tools for the Analysis of Timed Work ows Jiri Srba Department of Computer

Future TAPAAL Development

Resources with quantitative aspects (cost, energy).

Two player timed workflow games (also with stochasticopponent).

Integration with UPPAAL Stratego.

Workflow analysis in the continuous time semantics.

20 / 26

Page 65: Techniques and Tools for the Analysis of Timed Workflowsicetcs.ru.is/nwpt2015/SLIDES/Jiri.pdf · Techniques and Tools for the Analysis of Timed Work ows Jiri Srba Department of Computer

Continuous Semantics vs. Discrete Semantics

Theorem (For Closed TAPNs)

Let M0 be a marking with integer ages only. If

M0d0,t0−→ M1

d1,t1−→ M2d2,t2−→ . . .

dn−1,tn−1−→ Mn

where di ∈ R≥0 then also

M0d ′0,t0−→ M ′1

d ′1,t1−→ M ′2d ′2,t2−→ . . .

d ′n−1,tn−1−→ M ′n

where d ′i ∈ N0.

We construct a set of linear inequalities that describe allpossible delays allowed in the real-time execution.We only need difference constraints, hence the correspondingmatrix in LP is totally unimodular.As the instance of LP has a real solution, it has also anoptimal integral solution.

21 / 26

Page 66: Techniques and Tools for the Analysis of Timed Workflowsicetcs.ru.is/nwpt2015/SLIDES/Jiri.pdf · Techniques and Tools for the Analysis of Timed Work ows Jiri Srba Department of Computer

Continuous Semantics Implies Discrete Semantics

Theorem

If a timed-arc workflow net is sound in the continuous semanticsthen it is also sound in the discrete semantics.

Proof:

Let N be sound in the continuous semantics.

Let M be a marking reachable from the initial marking Min inthe discrete semantics.

Hence some final marking Mout is reachable from M in thecontinuous semantics.

We can conclude using the theorem that a marking M ′out withthe same distribution of tokens as Mout is reachable from Malso in the discrete semantics.

22 / 26

Page 67: Techniques and Tools for the Analysis of Timed Workflowsicetcs.ru.is/nwpt2015/SLIDES/Jiri.pdf · Techniques and Tools for the Analysis of Timed Work ows Jiri Srba Department of Computer

Discrete Semantics Implies Continuous Semantics

Theorem

If a timed-arc workflow net with no age invariants and no urgenttransitions is sound in the discrete semantics then it is sound alsoin the continuous semantics.

Proof:

We can arbitrarily delay in any marking.

Hence the token ages exceed the maximum constants.

Now there is no difference between discrete and continuoussemantics.

The theorem does not hold for general timed-arc workflow nets.

23 / 26

Page 68: Techniques and Tools for the Analysis of Timed Workflowsicetcs.ru.is/nwpt2015/SLIDES/Jiri.pdf · Techniques and Tools for the Analysis of Timed Work ows Jiri Srba Department of Computer

Discrete Semantics Implies Continuous Semantics

Theorem

If a timed-arc workflow net with no age invariants and no urgenttransitions is sound in the discrete semantics then it is sound alsoin the continuous semantics.

Proof:

We can arbitrarily delay in any marking.

Hence the token ages exceed the maximum constants.

Now there is no difference between discrete and continuoussemantics.

The theorem does not hold for general timed-arc workflow nets.

23 / 26

Page 69: Techniques and Tools for the Analysis of Timed Workflowsicetcs.ru.is/nwpt2015/SLIDES/Jiri.pdf · Techniques and Tools for the Analysis of Timed Work ows Jiri Srba Department of Computer

Continuous Semantics Challenge

0

in out

waiting

deadline

inv: ≤ 1

finished

init

service

late

early

[0, 0]

[1, 1]

Sound in discrete semantics but unsound in continuous semantics.

24 / 26

Page 70: Techniques and Tools for the Analysis of Timed Workflowsicetcs.ru.is/nwpt2015/SLIDES/Jiri.pdf · Techniques and Tools for the Analysis of Timed Work ows Jiri Srba Department of Computer

Continuous Semantics Challenge

in out

0

waiting

0deadline

inv: ≤ 1

finished

init

service

late

early

[0, 0]

[1, 1]

Sound in discrete semantics but unsound in continuous semantics.

24 / 26

Page 71: Techniques and Tools for the Analysis of Timed Workflowsicetcs.ru.is/nwpt2015/SLIDES/Jiri.pdf · Techniques and Tools for the Analysis of Timed Work ows Jiri Srba Department of Computer

Continuous Semantics Challenge

in out

0.5

waiting

0.5deadline

inv: ≤ 1

finished

init

service

late

early

[0, 0]

[1, 1]

Sound in discrete semantics but unsound in continuous semantics.

24 / 26

Page 72: Techniques and Tools for the Analysis of Timed Workflowsicetcs.ru.is/nwpt2015/SLIDES/Jiri.pdf · Techniques and Tools for the Analysis of Timed Work ows Jiri Srba Department of Computer

Continuous Semantics Challenge

in out

waiting

0.5deadline

inv: ≤ 1

0

finished

init

service

late

early

[0, 0]

[1, 1]

Sound in discrete semantics but unsound in continuous semantics.

24 / 26

Page 73: Techniques and Tools for the Analysis of Timed Workflowsicetcs.ru.is/nwpt2015/SLIDES/Jiri.pdf · Techniques and Tools for the Analysis of Timed Work ows Jiri Srba Department of Computer

Continuous Semantics Challenge

in out

waiting

1deadline

inv: ≤ 1

0.5

finished

init

service

late

early

[0, 0]

[1, 1]

Sound in discrete semantics but unsound in continuous semantics.

24 / 26

Page 74: Techniques and Tools for the Analysis of Timed Workflowsicetcs.ru.is/nwpt2015/SLIDES/Jiri.pdf · Techniques and Tools for the Analysis of Timed Work ows Jiri Srba Department of Computer

Continuous Semantics Summary

Continuous soundness implies discrete soundness.

Opposite implication holds only for nets without urgency.

Strong soundness is not an issue.

Theorem

Let N be a workflow net is sound in the continuous-time semantics.

The net N is strongly sound in the discrete-time semantics iff it isstrongly sound in the continuous-time semantics.

25 / 26

Page 75: Techniques and Tools for the Analysis of Timed Workflowsicetcs.ru.is/nwpt2015/SLIDES/Jiri.pdf · Techniques and Tools for the Analysis of Timed Work ows Jiri Srba Department of Computer

Continuous Semantics Summary

Continuous soundness implies discrete soundness.

Opposite implication holds only for nets without urgency.

Strong soundness is not an issue.

Theorem

Let N be a workflow net is sound in the continuous-time semantics.

The net N is strongly sound in the discrete-time semantics iff it isstrongly sound in the continuous-time semantics.

25 / 26

Page 76: Techniques and Tools for the Analysis of Timed Workflowsicetcs.ru.is/nwpt2015/SLIDES/Jiri.pdf · Techniques and Tools for the Analysis of Timed Work ows Jiri Srba Department of Computer

Conclusion

Framework for the study of timed-arc workflow nets.

Undecidability of soundness and strong soundness.

Efficient algorithms for the decidable subclasses.

Relationship to continuous soundness.

Integration into the tool TAPAAL.

www.tapaal.net

Reachability Formulas:ReachabilityCardinalityComparison

Trophies for the “Known” Models Trophies for the “Surprise” Models

LoLA174 (points)

LoLA optimistic174 (points)

LoLA optimisticincomplete148 (points)

marcie24 (points)

LoLA12 (points)

LoLA optimistic12 (points)

LoLA optimisticincomplete12 (points)

Trophies for All Models

LoLA198 (points)

LoLA optimistic198 (points)

LoLA optimisticincomplete172 (points)

Silver medal at Model Checking Contest 2014 and 2015.(reachability category)

26 / 26

Page 77: Techniques and Tools for the Analysis of Timed Workflowsicetcs.ru.is/nwpt2015/SLIDES/Jiri.pdf · Techniques and Tools for the Analysis of Timed Work ows Jiri Srba Department of Computer

Conclusion

Framework for the study of timed-arc workflow nets.

Undecidability of soundness and strong soundness.

Efficient algorithms for the decidable subclasses.

Relationship to continuous soundness.

Integration into the tool TAPAAL.

www.tapaal.net

Reachability Formulas:ReachabilityCardinalityComparison

Trophies for the “Known” Models Trophies for the “Surprise” Models

LoLA174 (points)

LoLA optimistic174 (points)

LoLA optimisticincomplete148 (points)

marcie24 (points)

LoLA12 (points)

LoLA optimistic12 (points)

LoLA optimisticincomplete12 (points)

Trophies for All Models

LoLA198 (points)

LoLA optimistic198 (points)

LoLA optimisticincomplete172 (points)

Silver medal at Model Checking Contest 2014 and 2015.(reachability category)

26 / 26