• No results found

A Practical Algorithm for Upper-Bounding

wherex0 =ex(x, π).

Proposition 6. For anyx,→π, andvs, if∂(x,→π ,vs) = []then: (i)xvs =ex(x, →

π)vs and (ii) there

is→π0whereex(x,→π) =ex(x,→π0)and|→π0| ≤d(δ•|x vs).

Proposition 7. For two statesxandx0, a sequence of states→x, a set of variablesvs, and an action sequence→π, if∂(x,→π ,vs) =x0 ::→x, then there are→π1,πand

π2such that (i) → π =→π1_π:: → π2, (ii)∂(x,→π1,vs) = [], (iii)ex(ex(x, → π1), π) =x0, and (iv)ex(x0, → π2) =ex(x, → π). Proposition 8. For anyx,→π1,

π2, andvs, we have that

∂(x,→π1_ → π2,vs) =∂(x, → π1,vs)_∂(ex(x, → π1), → π2,vs).

Lemma 6. For anyδ andvs whereδvs is acyclic,s∈ U(δ), and →

π ∈δ∗, there is→π0 such that

ex(s,→π) =ex(s,→π0)and|→π0| ≤Shdi(svs,vs, δ).8

Proof. The proof is by induction on∂(s,→π). The base case, where,∂(s,→π) = [], is trivial. In the step case we have that ∂(s,→π) = s0 :: →x and the induction hypothesis: for any s∗ ∈ U(δ), and→π∗ ∈ δ∗ if ∂(s∗,→π∗) = →x then there is→π∗0 whereex(s∗,→π∗) = ex(s∗,→π∗0) and|→π∗0| ≤ Shdi(s∗vs).

Since∂(s,→π) = s0 :: →x, we have→π1, πand →

π2 satisfying the conclusions of Proposition 7.

Based on conclusion i, ii, and iii of Proposition 7 and Proposition 8 we have ∂(s0,→π2) = →x. Accordingly, lettings∗, and→π∗from the inductive hypothesis bes0, and→π2, respectively, there is →

π02such thatex(s0,→π2) =ex(s,→π02)and|→π02| ≤Shdi(s0vs).†

From conclusion ii of Proposition 7 and conclusion ii of Proposition 6 there is →π01 where

ex(s,→π1) =ex(s, →

π01)and|→π10| ≤d(δ•|s

vs). Letting →

π0 =→π01#π ::→π02, from conclusions iii and iv of Proposition 7 and†we haveex(s,→π) =ex(s,→π0)and|→π0| ≤d(δ•|s

vs) + 1 +Shdi(s 0

vs).‡

Lastly, from conclusion i of Proposition 6 and conclusion ii of Proposition 7 we havesvs =

ex(s,→π1)vs = ex(s, →

π01)vs and accordingly ex(svs, πvs) = s0vs. Based on that we have

s0vs ∈childrenδvs(svs). Then from Proposition 5 and‡we have| →

π0| ≤Shdi(svs).

Theorem 13 follows from Lemma 6 and Definitions 6 and 13.

In closing, it is worth noting that for the above example, the dependency graph ofδROOM1is comprised of one SCC. Therefore there is no lifted dependency graph providing further decom- position. Indeed, exploiting acyclicity in dependency between variables alone, one cannot further decompose the subproblemδROOM1. We were able to achieve a more fine grained decomposition of that component above, by exploiting state space acyclicity.

3.8

A Practical Algorithm for Upper-Bounding

Theorem 13 suggests the possibility of compositional upper-bounding of the diameter given the presence of acyclicity in a transition system’s state space. In this section we investigate building a practical compositional algorithm to upper-bound the diameter based on Theorem 13. One straightforward approach is given by Algorithm 4.

In PUR, Ω is an oracle that returns a set of strict subsets of D(δ), where∀vs ∈ Ω(δ).δvs is

acyclic. PUR terminates because a snapshot has fewer variables than the concrete system. In PURthe function UPBNDprovides upper bounds for the diameters of “base-case” problems – i.e.

Algorithm 4:PUR(δ)

S=min({SmaxhPURi(vs, δ)|vs ∈Ω(δ)} ∪ ∞) ifS=∞returnUPBND(δ)else returnS

problems that are not further decomposed. Given this assumption and Theorem 13, PUR itself computes valid upper bounds for the diameter of the whole problem.

A main question for a practical implementation of PURis the choice ofΩ. The trivial choice of all strict subsets ofD(δ)is impractical. A pragmatic solution which we have adopted, is to take the situation that elements inD(δ)model individual assignments in the SAS+ model generated using Fast-Downward’s preprocessing step Helmert (2006a). Each element inΩ(δ)then corresponds to a set of elements fromD(δ)that model one multi-valued state variable whose domain transition graph is acyclic.

A source of intractability in PURcomes from the minoperator. For a full evaluation, Smax

is recursively called as many as |Ω(δ)|!times. In practice we only evaluate Smax on onearbi-

trarilychosen element fromΩ(δ). Our experimentation never uncovered a problem where a full evaluation of themin, where computationally feasible, produced a better bound. A second source of computational expense comes from the definition of Smax: PUR can be recursively called a

number of times that is linear in the size of the state space ofδ. This happens ifΩ(δ)is a parti- tion ofD(δ). Although this worst case scenario is contrived, in practiceΩ(δ)can cover sufficient elements fromD(δ)to render PURimpractical. This is demonstrated in the following example. Example 18. Taking D(δ) associated with the hotel key protocol example, the Fast-Downward preprocessor Helmert (2006a) identifies partition:

       ck1,ck2,lk1,lk2, {gk1,2},{gk1,3},{gk1,5},{gk1,6}, {gk2,2},{gk2,3},{gk2,5},{gk2,6}, {s1},{s2}       

as SAS+ variable assignments. Let Ω(δ) denote that set, excluding {s1} and {s2}. Note,

∀vs ∈ Ω(δ) we have that δvs is acyclic. Consequently, we have that PUR(δ) evaluates after

Π

vs∈Ω(δ)|vs|,i.e.34 = 81, calls toSmax.

3.8.1 Hybrid Algorithm

We have just observed a situation where PURcan exhibit a runtime that is linear in the size of the state space. That is favourable compared to exact calculations of diameter, which in our opening remarks we noted to have worse-than-quadratic runtime. Nevertheless this is unacceptable in our factored setting, and we now seek to alleviate this computational burden by applying Smax to

abstract sub-systems obtained using projections that motivated Definition 17. Such abstractions can be significantly smaller than the concrete systems, thus motivating a hybrid approach that can exponentially reduce bound computation times.

Example 19. Consider applying the approach outlined in Example 14 to computePURonly on the abstractions δROOM1 andδROOM2. PUR(δROOM1) can be evaluated in

Π

vs∈Ω(δROOM1)|vs| calls to Smax, where Ω(δROOM1)={ck1,lk1,{gk1,2},{gk1,3},{gk2,2}, {gk2,3}}. The same

observation can be made for the evaluation time of PUR(δROOM2). Thus the product expression in Example 18 is split into a sum ifPURis called on projections.