Reachability Graphs of Two-Transition Petri Nets
Total Page:16
File Type:pdf, Size:1020Kb
Reachability Graphs of Two-Transition Petri Nets Evgeny Erofeev? and Harro Wimmel?? Parallel Systems, Department of Computing Science Carl von Ossietzky Universit¨at,D-26111 Oldenburg, Germany evgeny.erofeev,harro.wimmel @informatik.uni-oldenburg.de { } Abstract. The reachability graph of a Petri net is a labelled transition system that can have a very complex structure. A characterisation of reachability graphs of Petri nets with only two transitions gives insight into typical structures that also might occur with arbitrarily large nets. An important means for such a characterisation is region theory, which allows to draw conclusions from cycles occurring in labelled transition systems. Attention is drawn especially to generalised cycles, i.e. cycles in the underlying undirected graph. Our characterisation also gives rise to an algorithm for the over-approximation of a given prefix-closed language by a Petri net language. 1 Introduction When looking at a Petri net [5] and its reachability graph we can take system analysis or system synthesis as a point of view on their relationship. In system analysis, we can e.g. model a system by a marked Petri net and construct its (unique) reachability graph to analyse its behaviour [6]. In system synthesis, a behavioural specification is typically given, and a system implementing it is sought. For example, one may try to find a Petri net whose reachability graph is isomorphic to a given labelled transition system [1]. Our ultimate aim is to characterise, graph-theoretically, exactly the labelled transition systems that are synthesisable into a place/transition Petri net. To our knowledge, such a characterisation is difficult and has not yet been achieved in general. In the special case of binary words, there have been approaches via pattern matching and via letter counting [2–4] which successfully lead to a char- acterisation of Petri net synthesisable words, i.e. where the reachability graph consists of a single, specific sequence of states without any branching. In this paper, we try to lift this limitation a bit and find the common structure of reachability graphs of Petri nets with only two transitions (generating sets of binary words). Based on region theory [1], we show how these reachability graphs can be partitioned into only a few classes each having strong common properties. ? Supported by DFG through grant Be 1267/14-1 CAVER and Graduiertenkolleg GRK- 1765 SCARE http://www.uni-oldenburg.de/en/scare/ ?? Supported by DFG through grant Be 1267/15-1 ARS and grant Be 1267/16-1 ASYST 39 The classes closely depend on the presence or absence of generalised cycles in the reachability graph (i.e. cycles in the underlying undirected graph). In case a given behaviour cannot be synthesised, we might ask for a small over-approximation, i.e. a reachability graph including all the required behaviour and allowing as few as possible additional words. If the given behaviour is finite, we can extend our results to obtain an algorithm for computing the minimal over-approximation by computing a convex hull for a subset of N2. In section 2 we briefly recapitulate some basic definitions about labelled tran- sition systems, Petri nets, and regions. Section 3 describes shapes of reachability graphs containing generalized cycles with non-zero Parikh vectors, while sec- tion 4 handles those where all generalised cycles have Parikh vector zero, essen- tially allowing a transformation to some subset of N2. In section 5 we present the algorithm for over-approximating the behaviour of a finite, binary, prefix-closed language, before concluding the paper in section 6. 2 Basic Concepts LTS. A labelled transition system (LTS) with initial state is a tuple TS = (S, , → T, s0) with nodes S (a countable set of states), edge labels T (a finite set of letters), edges (S T S), and an initial state s0 S. An edge (s, t, s0) → ⊆ ×t × t t ∈ ∈ → may be written as s s0 or s0 s. We use s s0 as an abbreviation for t t → ← (s s0 s s0) and call it a generalised edge or g-edge (in the underlying → ∨ ← σ undirected graph). A path (g-path) σ T ∗ from s to s0, written as s s0 σ ∈ → (s s0), is given inductively by s = s0 for the empty word σ = ε and by w t w t s00 S: s s00 s0 (s s00 s0) for σ = wt with w T ∗ and t T .A ∃ ∈ σ → → σ ∈ ∈ path s s0 (g-path s s0) is a cycle (g-cycle) if and only if s = s0. It is called elementary→ if σ is the number of different states occurring on the path, i.e. every | | σ state appears only once. The Parikh vector ℘(σ): T Z of a g-path s s0 is a mapping defined by ℘(ε) = 0 (with 0(t) = 0 for all t→ T ) for the empty word ∈ σ = ε, by ℘(wt)(t0) = ℘(w)(t0) for σ = wt and t = t0, by ℘(wt)(t) = ℘(w)(t) + 1 w t 6 in case the g-path is s s00 s0, and ℘(wt)(t) = ℘(w)(t) 1 if the g-path is w t → − s s00 s0 for some s00 S. ← ∈ Two labelled transition systems TS1 = (S1, 1, T, s01) and TS2 = (S2, 2, T, s ) are isomorphic if there is a bijection ζ→: S S with ζ(s ) =→s 02 1 → 2 01 02 and (s, t, s0) (ζ(s), t, ζ(s0)) , for all s, s0 S . We call TS a ∈ →1 ⇔ ∈ →2 ∈ 1 1 sub-LTS of TS2 if S1 S2, 1 2, and s01 = s02.A binary LTS (bLTS) is an LTS (S, , T, s )⊆ with →T ⊆= → 2, in this paper usually with T = a, b . → 0 | | { } A word over T is a sequence w T ∗, and it is binary if T = 2. A word ∈ | | w = t1t2 . tn of length n N uniquely corresponds to a finite transition system ∈ TS(w) = ( ℘(), ℘(t1), . , ℘(t1 . tn) , (℘(t1 . ti 1), ti, ℘(t1 . ti)) 0 < i { } { − | ≤ n t T , T, ℘()). A language over T is a set L T ∗. For a finite language ∧ i ∈ } ⊆ L we can uniquely define a transition system TS(L) = w L TS(w), where for ∈ words w1, w2 T ∗ and TS(w1) = (S1, 1, T, ℘()), TS(w2) = (S2, 2, T, ℘()) we write TS(w∈ ) TS(w ) = (S S ,→ , T, ℘()).S → 1 ∪ 2 1 ∪ 2 →1 ∪ →2 40 Since we are interested in behaviour expressed as an LTS, we will assume LTS to be totally reachable, i.e. for every state there is a path from the initial state to it. This also means that each two states are connected by a g-path. In case of a not totally reachable LTS we may drop all unreachable states without loss of behaviour. Petri net. An initially marked Petri net is denoted as N = (P, T, F, M0) where P is a finite set of places, T is a finite set of transitions, F is the flow function F : ((P T ) (T P )) N specifying the arc weights, and M0 is the initial × ∪ × → marking (where a marking is a mapping M : P N, indicating the number of → tokens in each place). A side-place is a place p with p• •p = , where p• = t ∩ 6 ∅ { ∈ T F (p, t)>0 and •p = t T F (t, p)>0 . N is pure or side-place free if it has| no side-places.} A transition{ ∈ t| T is enabled} at a marking M, denoted by ∈ M[t , if p P : M(p) F (p, t). The firing of t leads from M to M 0, denoted i ∀ ∈ ≥ by M[t M 0, if M[t and M 0(p) = M(p) F (p, t)+F (t, p). This can be extended, i i − as usual, to M[σ M 0 for sequences σ T ∗, and [M denotes the set of markings reachable from Mi. The reachability graph∈ RG(N) ofi a Petri net N is the labelled transition system with the set of vertices [M , initial state M , label set T , and 0i 0 set of edges (M, t, M 0) M, M 0 [M0 M[t M 0 . If a labelled transition system TS is{ isomorphic to| the reachability∈ i ∧ graphi of a} Petri net N, we say that N PN-solves (or simply solves) TS, and that TS is synthesisable to N. We say that N solves a word w if it solves TS(w). We frequently identify the states of TS with the markings of N then, writing e.g. s(p) F (p, t). Reachability graphs (and their underlying LTS)≥ have some nice properties we σ1 σ2 can make use of: They are fully deterministic (s1 s s2 ℘(σ1) = ℘(σ2) = σ1 σ2 ← → ∧ ⇒ s1 = s2 and s1 s s2 ℘(σ1) = ℘(σ2) = s1 = s2), totally reachable → σ ← ∧ ⇒ σ ( s S σ T ∗: s s), and zero-path-cyclic (s s0 ℘(σ) = 0 = s = s0). ∀ ∈ ∃ ∈ 0 → ∧ ⇒ Separation problem. Let a labelled transition system TS = (S, , T, s0) be given. If we want to synthesise a Petri net with isomorphic reachability→ graph, T must be used directly as the set of transitions, since we do not consider any 1 transition labels. In case the LTS is finite, we have to solve 2 S ( S 1) state separation problems for the places and up to S T event/state·| separation|· | |− prob- lems, as follows: | |·| | – A state separation problem consists of a set of states s, s0 with s = s0, and it can be solved by a place that distinguishes them,{ i.e.} has a different6 number of tokens in the markings corresponding to the two states.