Skip to main content
Log in

Discovering state constraints for planning with conditional effects in Discoplan (part I)

  • Published:
Annals of Mathematics and Artificial Intelligence Aims and scope Submit manuscript

Abstract

Discoplan is a durable and efficient system for inferring state constraints (invariants) in planning domains, specified in the PDDL language. It is exceptional in the range of constraint types it can discover and verify, and it directly allows for conditional effects in action operators. However, although various aspects of Discoplan have been previously described and its utility in planning demonstrated, the underlying methodology, the algorithms for the discovery and inductive verification of constraints, and the proofs of correctness of the algorithms and their complexity analysis have never been laid out in adequate detail. The purpose of this paper is to remedy these lacunae.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Similar content being viewed by others

Notes

  1. However, for the unifiers u, v, v of the lemma an equivalence class cannot consist entirely of variables or entirely of parameters. The former is the case because in our asymmetric form of unification, where a parameter can be substituted for a variable but not vice versa, and where variables can occur only in the hypothesis literal, variables can become equated only by having the same constants or parameters substituted for them. The latter is the case because parameters occur only in \(\underline {x}\), so that two parameters can become equal only via equality to a constant or variable occurring in \(\underline {X}\) or \(\underline {b}\).

  2. Although we will not make use of this, note that another way of writing this in our Discoplan notation would be as (P? X ?⋆Y), where by definition ∀x, y.P(x, y) ⇔ S(x, y) ∧ P(x, y). In other words, we are asserting the (nonstrict) sv-ness of P, which is P conjunctively augmented with the supplementary conditions.

References

  1. Alcázari, V., Torralba, A.: A reminder about the importance of computing and exploiting invariants in planning. In: Proceedings of the Twenty-Fifth International Conference on Automated Planning and Scheduling, pp 2–6 (2015)

  2. Allen, J., Schubert, L., Ferguson, G., Heeman, P., Hwang, C., Kato, T., Light, M., Martin, N., Miller, B., Poesio, M., Traum, D.: The TRAINS project: a case study in defining a conversational planning agent. J Exp. Theor. AI 7, 7–48 (1995)

    Article  Google Scholar 

  3. Asai, M., Fukunaga, A.: Fully automated cyclic planning for large-scale manufacturing domains. In: Proceedings of the Twenty-Fourth International Conference on Automated Planning and Scheduling (2014)

  4. Bacchus, F., Fraser, C.B.: Inner and outer boundaries of literals: a mechanism for computing domain specific information. In: Working Notes of the AIPS00 Workshop on Analysing and Exploiting Domain Knowledge for Efficient Planning, pp 29–36. AAAI Press (2000)

  5. Bac̈kstrom̈, C., Nebel, B.: Complexity results for SAS + planning. Comput. Intell. 11(4), 625–655 (1995)

    Article  MathSciNet  Google Scholar 

  6. Bernardini, S., Fagnani, F., Smith, D.E.: Extracting mutual exclusion invariants from lifted temporal planning domains. Artif. Intell. 258, 1–65 (2018)

    Article  MathSciNet  Google Scholar 

  7. Bonet, B., Geffner, H.: Planning as heuristic search: artificial intelligence 129(1–2) (2001)

  8. Cenk Gazen, B.C.B., Knoblock, C.A.C.A.: Combining the expressiveness of UCPOP with the efficiency of Graphplan. In: Steel, S., Alami, R. (eds.) Recent Advances in AI: Planning: 4th European Conference on Planning, ECP-97. Springer (1997)

  9. Chen, Y., Huang, R., Xingm, Z., Zhang, W.: Long-distance mutual exclusion for planning. Artif. Intell. 173(2), 365–391 (2009)

    Article  MathSciNet  Google Scholar 

  10. Cooper, M.C., de Roquemaurel, M., Régnieri, P.: A weighted CSP approach to cost-optimal planning. AI Commun. 24(1), 1–29 (2011)

    Article  MathSciNet  Google Scholar 

  11. Cormen, T., Leiserson, C., Rivest, R.: Introduction to Algorithms. MIT Press (1990)

  12. Domshlak, C., Hoffmann, J., Katz, M.: Red-black planning: a new systematic approach to partial delete relaxation. Artif. Intell. 221, 73–114 (2015)

    Article  MathSciNet  Google Scholar 

  13. Edelkamp, S., Helmert, M.: Exhibiting knowledge in planning problems to minimize state encoding length. In: Recent Advances in AI Planning. 5th European Conference on Planning (ECP-99), Volume 1809 of Lecture Notes in Artificial Intelligence, pp 135–147. Springer (1999)

  14. Fox, M., Long, D.: The automatic inference of state invariants in TIM. J. Artif. Intell. Res. (JAIR) 9, 367–421 (1998)

    Article  Google Scholar 

  15. Genesereth, M, Nilsson, NJ: Logical Foundations of Artificial Intelligence. Morgan Kaufmann, Los Altos (1987)

    MATH  Google Scholar 

  16. Gerevini, A., Schubert, L.: Discovering State Constraints for Planning: DISCOPLAN. Technical Report 2005-09-48, Dip. Di Elettronica per l’Automazione, Università Degli Studi di Brescia, 2005. Revised Version of Technical Report 811, Dept. of Computer Science, University of Rochester (2003)

  17. Gerevini, A., Saetti, A., Serina, I.: Planning through stochastic local search and temporal action graphs. J. Artif. Intell. Res. (JAIR), 20, 239–290 (2003)

    Article  Google Scholar 

  18. Gerevini, A., Schubert, L.: Accelerating partial-order planners: some techniques for effective search control and pruning. J. Artif. Intell. Res. (JAIR) 5, 95–137 (1996)

    Article  Google Scholar 

  19. Gerevini, A., Schubert, L.: Inferring state constraints for domain-independent planning. In: Proceedings of the Fifteenth National Conference of the American Association for Artificial Intelligence (AAAI-98), pp. 905–912. AAAI Press/The MIT Press (1998)

  20. Gerevini, A., Schubert, L.: Extending the types of state constraints discovered by discoplan. In: Working Notes of the AIPS00 Workshop on Analysing and Exploiting Domain Knowledge for Efficient Planning, pp. 4–11 (2000)

  21. Gerevini, A., Schubert, L.: Inferring state constraints in discoplan: some new results. In: Proceedings of the Seventeenth National Conference of the American Association for Artificial Intelligence (AAAI-00), pp. 761–767. AAAI Press/The MIT Press (2000)

  22. Gerevini, A., Schubert, L.K.: Discoplan: an efficient on-line system for computing planning domain invariants. In: Proceedings of the European Conference on Planning (ECP-01), pp. 284–288. AAAI Press (2014)

  23. Ghallab, M., Howe, A., Knoblock, G., McDermott, D., Ram, A., Veloso, M., Weld, D., Wilkins, D.: PDDL—planning domain definition language. Technical report. Available at http://cs-www.cs.yale.edu/homes/dvm/ (1998)

  24. Haslum, J., Scholz, U.: Domain knowledge in planning representation and use. In: Proceedings of the 13th International Conference on Automated Planning & Scheduling (ICAPS-03), Workshop on PDDL, pp. 69–78 (2003)

  25. Helmert, M.: Concise finite-domain representations for PDDL planning tasks. Artif. Intell. 173(5–6), 503–535 (2009)

    Article  MathSciNet  Google Scholar 

  26. Kelleher, G.: Determining general consequences of sets of actions. Technical Report TR CMS.14.96, Liverpool Moores University (1996)

  27. Kelleher, J., Cohn, A.: Automatically synthesising domain constraints from operator descriptions. In: Proceedings of the Tenth European Conference on Artificial Intelligence (ECAI-92), pp. 653–655. Wiley (1992)

  28. Kvarnström, J.: Applying domain analysis techniques for domain-dependent control in Talplanner. In: Proceedings of the Sixth International Conference on Artificial Intelligence Planning Systems, pp. 101–111 (2002)

  29. Lin, F.: Discovering state invariants. In: Proceedings of the Ninth International Conference on Principles of Knowledge Representation and Reasoning (KR-04), pp. 536–544. AAAI Press (2004)

  30. Lipovetzkyi, N., Muise, C.J., Geffner, G.: Traps, invariants, and dead-ends. In: Proceedings of the Twenty-Sixth International Conference on Automated Planning and Scheduling, ICAPS 2016, pp. 211–215 (2016)

  31. McAllester, D.: Observations on cognitive judgements. In: Proceedings of the Nineth National Conference of the American Association for Artificial Intelligence (AAAI-91), pp. 910–914. MIT Press (1991)

  32. Morris, P., Feldman, R.: Automatically derived heuristics for planning search. In: Proceedings of the Second Irish Conference on AI and Cognitive Science. School of Computer Science Applications, Dublin City University (1989)

  33. Nebel, B.: On the compilability and the expressive power of propositional planning formalisms. J. Artif. Intell. Res. (JAIR) 12, 271–315 (2000)

    Article  MathSciNet  Google Scholar 

  34. Penberthy, J.S., Weld, D.S.: UCPOP: a sound, complete, partial order planner for ADL. In: Proceedings of the Third International Conference on Principles of Knowledge Representation and Reasoning (KR-92), pp. 103–114. Morgan Kaufmann, Boston (1992)

  35. Rankoohi, M.F., Ghassem-sani, G.: ITSAT: an efficient sat-based temporal planner. J. Artif. Intell. Res. 53, 541–632 (2015)

    Article  MathSciNet  Google Scholar 

  36. Rintanen, J.: A planning algorithm not based on directional search. In: Proceedings of the Sixth International Conference on Principles of Knowledge Representation and Reasoning (KR-98), pp. 617–624. Morgan Kaufmann (1998)

  37. Rintanen, J.: An iterative algorithm for synthesizing invariants. In: Proceedings of the Seventeenth National Conference of the American Association for Artificial Intelligence (AAAI-00), pp. 806–811. AAAI Press/The MIT Press (2000)

  38. Rintanen, J.: Regression for classical and nondeterministic planning. In: ECAI 2008 - 18th European Conference on Artificial Intelligence, Proceedings, pp. 568–572 (2008)

  39. Rintanen, J.: Constraint-based algorithm for computing temporal invariants. In: Logics in Artificial Intelligence - 14th European Conference, Proceedings, pp. 665–673 (2014)

  40. Rintanen, J.: Schematic invariants by reduction to ground invariants. In: Proceedings of the Thirty-First AAAI Conference on Artificial Intelligence, pp. 3644–3650 (2017)

  41. Scholz, U.: Extracting state constraints from PDDL-like planning domains. In: Working Notes of the AIPS00 Workshop on Analyzing and Exploiting Domain Knowledge for Efficient Planning, pp. 43–48. AAAI Press (2000)

Download references

Acknowledgments

This research was supported in part by NATO Collaborative Research Grant CRG951285, and by ARPA/SSTO grant F30602-95-1-0025 and DARPA grants F30602-98-2-0133 and W911NF-15-1-0542 (second author). We would like to thank Fabrizio Morbini for his valuable help in the construction of the on-line version of Discoplan, as well as in the implementation of a few parts of the system.

This work originated in the context of a collaboration between the Dept. of Computer Science of the University of Rochester and IRST in Trento, where the first author worked in a research group lead by Oliviero Stock who guided the start of his career in AI. We deeply thank Oliviero who initiated and supported this collaboration, initially focused on temporal reasoning and then extended to AI planning. This led to a very fruitful joint work between the authors of this paper, that has continued for several years.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Alfonso Emilio Gerevini.

Additional information

Publisher’s note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

This article revises and significantly extends material reported in several previous conference and workshop papers [19,20,21,22] – generally at a rather sketchy and abstract level, as necessitated by these venues. The most important contribution here is the detailed, unified presentation of the essential ideas and algorithms underlying Discoplan and their soundness proofs and complexity analyses.

Appendix A: Proofs of Theorems

Appendix A: Proofs of Theorems

As a preliminary to the proofs of the theorems, we provide a formalization of the notion of reachable states, and of the notions on which this depends. We will use the term ground atom in the sense of a predication whose arguments are constants (i.e., we do not consider functional terms), and correspondingly a ground literal is an unnegated or negated ground atom.

Definition 6 (Planning domain)

A planning domain consists of a finite set of PDDL operators each of which represents a STRIPS operator possibly augmented with negated preconditions, EQ/NEQ-constraints, typed parameters, and conditional effects (as described and illustrated in Section 1.2).

Recall that operators have a primarywhen-clause and possibly one or more secondarywhen-clauses (representing conditional effects), each with its own preconditions and effects, and these preconditions may include EQ/NEQ-constraints. All preconditions and effects are function-free literals over constants and parameters of the operator, and EQ/NEQ-preconditions use only the positive forms of EQ and NEQ.

Definition 7 (Planning domain states)

A state of a planning domain is any finite set of ground atoms. The reserved predicates EQ/NEQ do not appear explicitly in states.

Note that EQ(c, c) (i.e., c = c) and NEQ(c, c) (i.e., cc) are regarded as tacitly present in every state for every constant c and every constant c distinct from c. Also note that in principle we allow states to contain predicates that do not appear in any operator—these will simply remain invariant under any sequence of operator applications.

Definition 8 (Operator instance)

Let o be a planning domain operator with m parameters \(\underline {r}= r_{1},...,r_{m}\) and let \(\underline {d}=d_{1},...,d_{m}\) be an m-tuple of constants such that the substitution \(\underline {d}/\underline {r}\) for the parameters of o yields no primary preconditions of form NEQ(c, c) or EQ(c, c) for distinct constants c, c. Then the result of that substitution, written \(o(\underline {d})\), is an instance of operator o. Note that all preconditions and effects of \(o(\underline {d})\) are ground literals.

The non-violation of EQ/NEQ-preconditions required by Definition 8 removes from consideration operator “instances” that are not applicable in any state,

Definition 9 (Satisfaction of preconditions)

Let preconds(w)u be a set of ground literals obtained by applying ground substitution \(u = \underline { d}/\underline {r}\) to the preconditions of when-clause w of an operator with parameters \(\underline {r}\). Then preconds(w)u are satisfied by a state s iff every unnegated, non-EQ/NEQ literal of preconds(w)u is in s, no complement (unnegated version) of a negated literal of preconds(w)u is in s, and preconds(w)u contains no literals NEQ(c, c) or EQ(c, c) for any distinct constants c, c.

Definition 10 (Operator application and resulting state)

Let s be a state and let \(o(\underline {d})\) be an operator instance obtained from o via substitution \(u = \underline {d}/\underline {r}\), where the primary preconditions of \(o(\underline {d})\) are satisfied by s. Then o (and \(o(\underline {d})\)) is applicable in state s and the result of its application, written \(o(\underline {d})(s)\), is given by the following additions to, and deletions from, s:

  1. 1.

    For the primary when-clause w1 of \(o(\underline {d})\),

    1. (a)

      add the positive effects of w1 to s, and

    2. (b)

      delete the predications from s whose negations appear as effects of w1;

  2. 2.

    For each secondary when-clause w of \(o(\underline {d})\) such that preconds(w)u are satisfied by (the original) s,

    1. (a)

      add the positive effects of w to s, and

    2. (b)

      delete from s the predications whose negations appear as effects of w.

There is the usual problem here that some “additions” and “deletions” might be in conflict, adding and taking away the same atom. We could assume that deletions are performed before additions, i.e., additions win over deletions. But we generally make the stronger assumption that operators are designed to entirely avoid such inconsistent effects. Obviously, our definition implements the familiar STRIPS assumption, that the only effects of an operator are those it explicitly asserts. We are now able to define reachable states:

Definition 11 (Reachable states)

A state s is reachable from a given initial state s0 in a given planning domain O iff there is a sequence of operator instances \(o_{1}(\underline {d}^{(1)}), ..., o_{k}(\underline {d}^{(k)})\), where {o1,..., ok}⊆ O, and a corresponding sequence of states s0,..., sk, such that s = sk, and for i = 1,..., k, oi is applicable in si− 1 and \(o_{i}(\underline {d}^{(i)})(s_{i-1}) = s_{i}\).

We now turn to the proofs of the theorems. (Theorem 1 concerning Find-type-constraints was established in the main text.)

The following lemma establishes a relationship between unifiers obtained by matching hypothesis literals to operator effects or preconditions and the corresponding unifiers obtained by matching those literals to ground instances of the effects or preconditions. The lemma will facilitate the proof of correctness of the verification conditions for several types of constraints found by the hypothesize-and-test method. Where we speak of constrained unifiers, we refer tacitly to some given set of EQ/NEQ-constraints, relating the parameters occurring in an effect to each other or to constants. A constrained unifier must not equate two terms (directly, or through a chain of unifications) if either (i) these terms belong to two equality sets \(\mathcal {E}_{1}\), \(\mathcal {E}_{2}\) (as determined by the EQ-constraints) where for some \(\tau _{1}\in \mathcal {E}_{1}\) and \(\tau _{2}\in \mathcal {E}_{2}\), there is a NEQ-constraint between τ1 and τ2; or (ii) one of these terms is a constant, and the other equals another constant viaEQ-constraints. (Of course, if the terms are distinct constants, then even the unconstrained unification fails.)

Unification Lemma

Let \(\underline {X}\) be an m-tuple of variables and constants, \(\underline {x}\) be an m-tuple of parameters and constants, and \(\underline {b}\) be an m-tuple of constants.

Suppose \(\underline {x}\) and \(\underline {b}\) have constrained unifier v, and \(\underline {X}\) and \(\underline {b}\) have unifier v. Then \(\underline {X}\) and \(\underline {x}\) have constrained unifier u, the composition uv is also a constrained unifier, \(\underline {X}_{uv}=\underline {X}_{v^{\prime }}=\underline {b}\), and \(\underline {x}_{uv}=\underline { x}_{v}=\underline {b}\).

Remarks

We can interpret a unifier u as a set |u| of equivalence classes of size >1, where each u-equivalence class contains a set of directly or indirectly equated (unified) terms, distinct from the terms in other equivalence classes. Note that such an equivalence class may contain at most one constant, and any number of parameters and variables.Footnote 1 The composition uv of two unifiers can be thought of as the union of equations comprising u and v. Correspondingly, |uv| is obtained by repeatedly merging non-disjoint equivalence classes from |u| and |v| until we again have a set of (one or more) disjoint classes. However, if any of the resulting equivalence classes contain multiple constants, we say that uv does not exist (more accurately, is inconsistent). Note that a set of EQ-constraints also induces a set of equivalence classes on the equated terms, and so we can regard a unifier u constrained by a set \({\mathcal {C}}\) of EQ/NEQ-constraints as tacitly composed with the given EQ-constraints. But in this case consistency (existence) requires not only that each equivalence class of |u| contain at most one constant, but also that no two terms of an equivalence class be related by a NEQ-constraint. We will refer to such unifiers as \({\mathcal {C}}\)-consistent.

In these terms, the lemma states that whenever v and v are \({\mathcal {C}}\)-consistent, so are u and uv; furthermore any variable X occurring in \(\underline {X}\) will be in the uv-equivalence class of a constant b occurring in \(\underline {b}\) just in case it is in the v-equivalence class of b; and any parameter x occurring in \(\underline {x}\) will be in the uv-equivalence class of a constant b occurring in \(\underline {b}\) just in case it is in the v-equivalence class of b.

Proof

Suppose that v and v exist (are \({\mathcal {C}}\)-consistent). Consider vv. We claim this is \({\mathcal {C}}\)-consistent, since it merely adds certain variables of \(\underline {X}\) to the v-equivalence classes of certain constants; specifically, if Xi is a variable, then it is added to the v-equivalence class of bi (since Xi and bi are in the same v-equivalence class). It is not possible that the same variable is added to the equivalence classes of two different constants (thus forcing a merger of two v-equivalence classes) because this could only happen if the v-equivalence class of that variable contained two constants, which is impossible by the consistency of v. So, since furthermore EQ/NEQ-constraints don’t involve any variables, vv is \({\mathcal {C}}\)-consistent.

We now claim further that |uv| = |vv|. This is because for each i (1 ≤ im), uv contains just the equations Xi = xi and xi = bi while vv contains just the equations xi = bi and Xi = bi, and this obviously leads to the same equivalence classes for uv and vv. From this the \({\mathcal {C}}\)-consistency of uv and the consistency of u follow (since |u| is a refinement, in a set-partitioning sense, of |uv|); it also follows that uv equates variables of \(\underline {X}\) to the same constants as v; and finally it follows that uv equates parameters of \(\underline {x}\) to the same constants as v (for the latter the \({\mathcal {C}}\)-consistency of uv suffices). □

Corollary 1

Let the premises be as in the Unification Lemma. Then for anysequence\(\underline {X}^{\prime }\)whose componentsare variables of\(\underline {X}\)andconstants,

$$ \underline{X}^{\prime}_{uv} = \underline{X}^{\prime}_{v^{\prime}}, $$

and for any\(\underline {x}^{\prime }\)whose components are parameters of\(\underline {x}\)and constants,

$$ \underline{x}^{\prime}_{uv} = \underline{x}^{\prime}_{v}. $$

Proof

Immediate from the Unification Lemma. □

The following corollary slightly strengthens the Unification Lemma.

Corollary 2

Let\(\underline {X}\),\(\underline {x}\)and\(\underline {b}\)beas in the Unification Lemma. Suppose thatvis a constrained unifier suchthat\(\underline {x}_{v}=\underline {b}\),wherevmay involve parameters other than those occurringin\(\underline {x}\)(butno variables), andvis a unifier such that\(\underline {X}_{v^{\prime }}=\underline {b}\),wherevmay involve variables other than those occurring in\(\underline {X}\)(butno parameters). Then\(\underline {X}\)and\(\underline {x}\)havea constrained unifier u, the compositionuvis also a constrained unifier,and\(\underline {X}_{uv}=\underline {X}_{v^{\prime }}=\underline {x}_{uv}=\underline {x}_{v}=\underline {b}\).

Proof

Let v1 be the result of reducing v to a substitution of constants for the parameters of \(\underline {x}\). (In terms of equivalence classes, we delete parameters occurring in v but not in \(\underline {x}\) from their equivalence classes in |v|, and then extract the substitutions of constants for the remaining parameters.) Similarly let \(v^{\prime }_{1}\) be the result of reducing v to a substitution of constants for the variables of \(\underline {X}\). Clearly v1 is still a constrained unifier and \(\underline {x}_{v}=\underline {b}\), and \(v^{\prime }_{1}\) is still a unifier and \(\underline {X}_{v^{\prime }_{1}}=\underline {b}\).

But then \(\underline {X}\), \(\underline {x}\), \(\underline {b}\), v1, and \(v^{\prime }_{1}\) satisfy the conditions of the Lemma and so \(\underline {X}_{uv_{1}}=\underline {X}_{v^{\prime }_{1}}=\underline {x}_{uv_{1}}=\underline {x}_{v_{1}}=\underline {b}\). Since v differs from v1 only in (potentially) involving parameters that do not occur in \(\underline {x}\), and since \(\underline {X}_{u}\) cannot involve parameters other than those occurring in \(\underline {x}\), \(\underline {X}_{uv_{1}}=\underline {X}_{uv}\). Also, since \(\underline {x}_{u}\) cannot involve parameters that do not occur in \(\underline {x}\), \(\underline {x}_{uv_{1}}=\underline {x}_{uv}\); and for similar reasons it is easy to see that \(\underline {X}_{v^{\prime }_{1}}=\underline {X}_{v^{\prime }}\) and \(\underline {x}_{v_{1}}=\underline {x}_{v}\). The conclusion follows. □

Preliminary remarks about correctness proofs

In the following correctness proof for the discovery of simple implicative constraints by Discoplan, we show in detail the role of the Unification Lemma and its corollaries. We will not normally go into this much detail, as there is a trade-off between intuitive transparency of the reasoning and the level of detail. Typically, our correctness arguments are structured in the following way. We consider an instance of an operator o applied in a particular state, where in that state the constraint Γ under consideration holds. We then consider the various specific ways in which the constraint might be violated in the result state. In each case, we argue that the violation would have to be produced by an effect or multiple effects of the operator instance, and that the verification conditions for Γ rule out such a violation.

These case-by-case arguments are intuitively quite clear, if one thinks about the instance of o under consideration as if the verification conditions applied directly to operator instances. But in fact, verification conditions apply to parametrized operators, and this leads to some hidden subtleties in this mode of argumentation. Strictly, we have to argue that the occurrence of certain ground literals as effects of an operator instance, applied in a state satisfying certain conditions, entails the existence of certain parametric precondition and effect literals in the operator; further, these precondition and effect literals will unify with certain literals of Γ, and hence specific verification conditions will come into play, and impose requirements on various unification instances of the preconditions and effects of o; and these unification instances in turn must be shown to reduce to ground literals relevant to the operator instance, allowing completion of the reductio argument. It is the “ascent” from specific ground literals to parametric operator literals, and the “descent” from unification instances of the latter back down to the ground level, that the Unification Lemma is designed to facilitate. These moves are nontrivial because of the subtleties of unification involving both Γ-variables and operator parameters, and EQ/NEQ-preconditions constraining the latter. Still, as mentioned, such details can be distracting and we will generally suppress them, except in the case of simple implicative constraints, sv-constraints discovered by the “dedicated” method, and n-ary disjunctive + sv-constraints. In the last of these constraint types, the complexity of the details is such as to motivate a Verification Lemma (for the particular verification conditions concerned) showing that we can in fact argue as if the verification conditions applied directly to operator instances.

Theorem 2

If a simple implicative constraintΓ holds initially, and the verification conditions of Definition 2 for such constraints are met, then Γ holds in all reachable states. (Hence simple implicative constraints found by Discoplanarecorrect.)

Proof

Assume for induction that Γ holds prior to the application of an instance \(o(\underline {d})\) of an operator \(o(\underline {r})\), where \(\underline {r}\) is the list of parameters of o. We will show that Γ still holds after application of \(o(\underline {d})\). For clarity in the use of the Unification Lemma, we abbreviate the substitution \(\underline {d}/\underline {r}\) as v. Note that v necessarily satisfies the EQ/NEQ-constraints of the primary when-clause w1 of o, and of every other when-clause w whose preconditions are met when \(o(\underline {d})\) is applied. In other words, v is a constrained unifier relative to those EQ/NEQ-constraints.

Since Γ holds prior to application of o, therefore for every substitution v of constants (in the planning domain) for variables of Γ, at least one of \(\overline {\phi }_{v^{\prime }}\), \(\psi _{v^{\prime }}\), \((\overline {\sigma }_{1})_{v^{\prime }}\), ..., \((\overline {\sigma }_{k})_{v^{\prime }}\) holds in the prior state. We show for each case in turn that \({\Gamma }_{v^{\prime }}\) holds in the resultant state.

Case 1: \(\overline {\phi }_{v^{\prime }}\) holds in the prior state. If \(\overline {\phi }_{v^{\prime }}\) still holds in the resultant state, then \({\Gamma }_{v^{\prime }}\) still holds as well. So assume \(\overline {\phi }_{v^{\prime }}\) is false in the resultant state, i.e., \(\phi _{v^{\prime }}\) is true in it. Then by the semantics of operators, there must be some when-clause w of o such that preconds+(w)v hold in the prior state and which has an effect ϕ such that \(\phi ^{\prime }_{v} = \phi _{v^{\prime }}\). Then with \(\underline {X} =\) argument list of ϕ and \(\underline {x} =\) argument list of ϕ, Corollary 2 of the Unification Lemma applies, so that ϕ must be unifiable with ϕ with some unifier u (constrained by the EQ/NEQ-conditions of w and w1) such that \(\phi ^{\prime }_{uv}=\phi ^{\prime }_{v}=\phi _{v^{\prime }}\), where uv is also a constrained unifier. Hence by verification condition (2) one of the following holds: w or w1 has (a) an effect or (b) a w-persistent precondition ψ such that \(\psi ^{\prime }_{u} \equiv _{w_{1},w} \psi _{u}\); or (c) o has a when-clause w2 (≠w, w1) such that (σ1)u,..., (σk)upreconds (w2)u and w2 has an effect ψ such that \(\psi ^{\prime }_{u} \equiv _{w_{1},w_{2}} \psi _{u}\); or (d) preconds+(w)u⊧¬(σi)u, for some i (1 ≤ ik). But then each of (a-d) maintains the truth of \({\Gamma }_{v^{\prime }}\). In particular the effect ψ posited by (a) satisfies \(\psi ^{\prime }_{uv} = \psi _{uv}\), since all (ground) instances of two constrained-equivalent formulas are identical. But by Corollary 1 of the Unification Lemma \(\psi ^{\prime }_{uv}=\psi ^{\prime }_{v}\) and \(\psi _{uv}=\psi _{v^{\prime }}\), so that for the instance \(o(\underline {d})\) of o, the effect \(\psi ^{\prime }_{v}\) is identical with \(\psi _{v^{\prime }}\). This assures the truth of \({\Gamma }_{v^{\prime }}\) in the resultant state. For (b) the argument is similar, except that we also need to address the case where the persistence of \(\psi ^{\prime }_{v}\) is threatened by an effect \(\overline {\psi }^{\prime \prime }\) of some other secondary when-clause w2, whose preconditions also happen to hold, and where \(\psi ^{\prime \prime }_{v}=\psi _{v^{\prime }}\). As already noted, \(\psi _{v^{\prime }}=\psi _{uv}\), so \(\psi ^{\prime \prime }_{v}=\psi _{uv}\); hence applying Corollary 2 of the Unification Lemma to the argument lists of ψ and ψu (with v viewed as the unifier of both of those lists with the resulting identical lists of constants), we know that ψ and ψu are unifiable, with some unifier u (which also entails that uu is a unifier constrained by the EQ/NEQ conditions of w and w2); furthermore, uv is a unifier constrained by the EQ/NEQ conditions of w and w2 (keeping in mind that v is a unifier constrained by the EQ/NEQ conditions of w), \(\psi ^{\prime \prime }_{u^{\prime }v}=\psi ^{\prime \prime }_{v}\), and \(\psi _{uu^{\prime }v}=\psi _{uv}=\psi _{v^{\prime }}\). So by the details of verification condition 2(b), preconds\(^{+}(w_{2})_{uu^{\prime }} \models \neg (\sigma _{i})_{uu^{\prime }}\), for some i (1 ≤ ik). Hence preconds\(^{+}(w_{2})_{uu^{\prime }v} \models \neg (\sigma _{i})_{uu^{\prime }v}\). But preconds\(^{+}(w_{2})_{uu^{\prime }v}\) = preconds+(w2)uv = preconds+(w2)v (by two applications of Corollary 1 of the Unification Lemma, first with the arguments of preconds+(w2)u in the role of \(\underline {x}^{\prime }\), then with the arguments of preconds+(w2) in that role) and \(\neg (\sigma _{i})_{uu^{\prime }v}=\neg (\sigma _{i})_{v^{\prime }}\) (again by two applications of Corollary 1). Then preconds\(^{+}(w_{2})_{v} \models \neg (\sigma _{i})_{v^{\prime }}\), so that \({\Gamma }_{v^{\prime }}\) is again true in the resultant state. If (c) holds, we can argue much as for (a), except that we also need to ascertain that \((\sigma _{1})_{v^{\prime }},...,(\sigma _{k})_{v^{\prime }} \models \) preconds(w2)v. This is so since in this case (σ1)u,..., (σk)u⊧ preconds(w2)u, and \((\sigma _{i})_{uv}=(\sigma _{i})_{v^{\prime }}\) (1 ≤ ik) (by Corollary 1, with the arguments of σi in the role of \(\underline {X}^{\prime }\)) and preconds(w2)uv = preconds(w2)v (by Corollary 1, with the arguments of preconds(w2) in the role of \(\underline {x}^{\prime }\)). If (d) holds, then preconds+(w)u⊧¬(σi)u for some i; hence preconds\(^{+}(w)_{v} \models \neg (\sigma _{i})_{v^{\prime }}\), using preconds+(w)uv = preconds+(w)v and \((\sigma _{i})_{uv}=(\sigma _{i})_{uv^{\prime }}\), by uses of Corollary 1 much as in (b) and (c). So with \(\neg (\sigma _{i})_{v^{\prime }}\) true, \({\Gamma }_{v^{\prime }}\) again holds in the resultant state.

Case 2: \(\psi _{v^{\prime }}\) holds in the prior state. The argument for the truth of \({\Gamma }_{v^{\prime }}\) in the resultant state is completely analogous to that for case 1, using the verification conditions (3a-c) (which mirror those of (2a-c)).

Case 3: \((\overline {\sigma }_{i})_{v^{\prime }}\) holds in the prior state for some i (1 ≤ ik). Then since σi is a static condition, \((\overline {\sigma }_{i})_{v^{\prime }}\) still holds in the resultant state.

Theorem 3

The computation of simple implicative constraints in accordance withthe hypothesize-and-test scheme is completed in polynomial time for anybound max on the allowable number of supplementary conditions, specificallyin

$$ O\left ({\displaystyle {\sum}_{o\in O}}\left[ l_o^3 \left( \underset{o^{\prime}\in O}{\sum} l_{o^{\prime}}^2 + \frac{\textit{max}}{l_o}\cdot \underset{o^{\prime}\in O}{\sum}l_{o^{\prime}}^{\textit{max}+ 2} + l_o n_{init} \right) \right] \right) $$

steps, whereOis the set of planning operators, lois the size of operatoro, andninitis the number of initial conditions.

Proof

The outer summation of the above complexity bound, and a part \({l_{o}^{2}}\) of the factor \({l_{o}^{3}}\), corresponds to the iteration over all effect-effect (or effect-precondition) combinations of all operators in the formation of hypotheses. The first inner summation reflects the checking of a hypothesis against all preconditions and effects (contributing \(l_{o^{\prime }}\)) and the collection of excuses for every apparent violation. The latter phase contributes a factor \(l_{o} l_{o^{\prime }}\) per violation. This collapses (i) a factor \(l_{o} l_{o^{\prime }}\) for singleton excuses that relate an operator precondition to the negation of a candidate supplementary condition, keeping in mind that candidate supplementary conditions originated in operator o; and (ii) a similar term \((l_{o} l_{o^{\prime }} + l_{o^{\prime }})\) for collection of groups of candidate supplementary conditions that entail the preconditions of a when-clause and thereby ensure the generation of a “missing effect”. (The \( l_{o} l_{o^{\prime }}\)-part comes from the pairwise matching of preconditions to supplementary conditions, and the \(l_{o^{\prime }}\)-part from the scan of effects for the “missing effect”.) The second inner summation comes from the search for minimal sets of supplementary conditions (see footnote 6) and the third element of the sum reflects the verification of the hypothesis in the initial conditions (see the discussion of the algorithm in Fig. 2, and note that lc is bounded by lo). □

Theorem 4

If the verification conditions of Definition 3 for sv-constraints hold for an sv-constraint(ϕσ1...σk),then the constraint holds in all reachable states for all values of its variables. (Hencesv-constraints found by Discoplanby the “dedicated” method are correct.)

Proof

For clarity we consider the special case where (ϕσ1...σk) is

$$ \texttt{((P ? X ?*Y) (S1 ? X ?*Y) ... (Sk ? X ?*Y))}. $$

The generalization to multiple “unstarred” and “starred” variables (and possibly constants) is fairly straightforward (think of ? X, ?⋆Y as sets of arguments); the remarks following the proof will provide some relevant specifics. The supplementary conditions (Si ? X ?⋆Y) of course need not depend on both ? X and ?⋆Y, but they may. In the absence of supplementary conditions, the notation (P ? X ?⋆Y) means that

$$ \forall x,y,z. P(x,y)\wedge P(x,z) \Rightarrow y=z~\text{(in all reachable states).} $$

Let us abbreviate S1(x, y) ∧ ... ∧ Sk(x, y) as S(x, y). Then the sv-constraint including supplementary conditions states thatFootnote 2

$$ \forall x,y,z. S(x,y)\wedge S(x,z)\wedge P(x,y)\wedge P(x,z) \Rightarrow y=z~\text{(in all reachable states).} $$

We can take the sv-constraint to be true in the initial state, since Discoplan straightforwardly verifies this, as per verification condition (1). Given any instance of any operator o, and a prior state sprior in which the preconditions of the primary when-clause w1 of that operator instance are true, we assume for induction that the constraint holds in sprior. We want to show that it also holds in the resultant state sresult. Assume otherwise, i.e., for some constants a, b, c, where bc, we have

  1. (C1)

    S(a, b), S(a, c), P(a, b), P(a, c) true in sresult.

    Since S is static, we also had

  2. (C2)

    S(a, b), S(a, c) true in sprior.

    But by the induction assumption, at least one of the literals in (C1) must have been false in sprior, and so

  3. (C3)

    either P(a, b) or P(a, c) was false in sprior.

We consider the case where P(a, b) was false (and P(a, c) was true or false). The case where P(a, c) was false is completely symmetrical and need not be separately considered. If P(a, b) was false in sprior, then its truth in sresult must be due to some effect P(h, k) of some when-clause w of o, where h, k were respectively instantiated to a, b (if not already equal to them) and where the preconditions of w are true for the operator instance under consideration. (We have already assumed the preconditions of the primary when-clause w1 to be true.) We now show three things for the operator instance under consideration: (i) there is no additional effect P(a, c) of the operator instance, with cb; (ii) w or w1 has a precondition P(q, r), which was true for q = a, r = d for some db for the operator instance, and (iii) w1, w, or some other secondary when-clause w2 generated an effect ¬P(a, d), for the operator instance.

Concerning (i), if there were an effect P(a, c), there would be an effect literal P(q, r) of o in w or some other when-clause w2 (which could be w1 or a secondary when-clause) where we cannot prove that qh, or cannot prove that r = k. (Keep in mind we are assuming a w-effect P(h, k) instantiated as P(a, b).) But then in view of the way Discoplan tests (P ? X ?⋆Y) and adds supplementary conditions (i.e., by the contrapositive of verification conditions (2a,b)), there would be a supplementary condition which entails the falsity of a precondition of w, w1, or w2. (We will provide a more detailed version of this argument in the supplementary remarks following the proof.) But since we have assumed those preconditions to be true for the operator instance under consideration, S(a, b) or S(a, c) must be false in sprior, contrary to (C2). So there is no effect P(a, c).

Concerning (ii), suppose neither w nor w1 has such a precondition. Then they have no precondition of form P(q, r) at all, or if they do, it is not provable that qr, or it is not provable that r = k. Then again from the way Discoplan tests (P ? X ?⋆Y) and adds supplementary conditions (i.e., by the contrapositive of verification condition (3b)), there is a supplementary condition that entails the falsity of a precondition of w or w1, and since these preconditions are true for the instance in question, S(a, b) or S(a, c) must be false in sprior, contrary to (C2). So there is a precondition P(q, r) as specified in (ii).

Concerning (iii), suppose there is no such effect of w or w1. Then there is no effect of w or w1 of form ¬P(q, r) at all or for any such effect it is not provable that q = q or it is not provable that r = r (with q, r determined by (ii)). Then from verification condition (3a(ii)) (i.e., from the way Discoplan tests (P ? X ?⋆Y) and adds supplementary conditions to assure a “concomitant change”) and from (C2) (which precludes alternative verification condition (3b)), there is a subset of the supplementary conditions that entails the preconditions of some when-clause w2 other than w or w1, where that when-clause has an effect ¬P(q, r), and provably q = q and r = r. But then (iii) is true.

Having established the truth of (i-iii), we note that from (i) and (C1) it follows that P(a, c) was true in sprior. Hence by the induction assumption P(a, y) was false for all yc in sprior. Hence the constant d referred to in (ii) and (iii) is the same as c; so by (iii), ¬P(a, c) holds in sresult, contrary to (C1). □

Supplementary remarks concerning the proof of Theorem 5

In part (i) of the preceding proof, the appeal to verification condition (2) to infer the falsity of a precondition of w, w1, or w2 may seem clear enough. However, this is one of the places where some subtle details dependent on the Unification Lemma have been suppressed. It is instructive to take a closer look at this part of the argument, as an illustration of how such suppressed details may be filled in. Strictly, the existence of effect literals P(h, k) and P(q, r), where we cannot prove qh or cannot prove r = k, is insufficient to support the argument based on verification condition (2). This condition also requires that each of P(h, k) and P(q, r) be (constrained-) unifiable with (P ? X ?⋆Y), say with unifiers u and u respectively, and the particularized relations \(q_{u^{\prime }}\neq h_{u}\), \(r_{u^{\prime }} = k_{u}\) (rather than qh, r = k) should not both be provable. Now, the existence of unifiers u and u is obvious for the special case of ϕ assumed in the proof, but note that both EQ/NEQ-preconditions and generalization of the proof to predicates with more than 2 arguments can complicate matters. For example, unification of (P ? X ? X ?⋆Y) with an effect (P ?h ?k ?r) would fail if there is a precondition (NEQ ?h ?k). Of course, an instance of this effect, such as (P a b c), would then not create a threat to single-valuedness of (P ? X ? X ?⋆Y) in ?⋆Y. So only those instances of the effects of o that unify with ϕ create a threat to single-valuedness, and it suffices to ensure that the verification conditions apply to those instances. And that is precisely where the Unification Lemma helps out. Corollary 2 guarantees that if an effect literal \(P(\underline {r})\) yields ground instance \(P(\underline {b})\) under unifier v (where v instantiates the parameters of o), and at the same time hypothesis literal ϕ is unifiable with \(P(\underline {b})\), with unifier v, then the unifier u of ϕ with \(P(\underline {r})\) also exists; this guarantees that verification condition (2) applies to all relevant effect literals. Furthermore, Corollary 2 also assures us that we can compose u with v, and (returning to the special case considered in the proof) that huv = hv; and similarly we have \(q_{u^{\prime }v}=q_{v}\) for the second effect literal P(q, r). So, since hv = qv = a, it follows that the relation \(h_{u} \neq q_{u^{\prime }}\) cannot be provable. Similarly we can argue that the relation \(k_{u}=r_{u^{\prime }}\) cannot be provable. At this point we have established incontrovertibly that (a) or (b) in verification condition (2) must hold. But it takes one more application of Corollary 2 to establish that a relevant instance of (a) or (b) holds. In the case of (a), i.e., if the truth of (σi)u entails falsity of preconds+(w)u, then \((\sigma _{i})_{v^{\prime }}\) (a ground instance of σi) entails falsity of the preconditions preconds+(w)v of the instance of o under consideration, in virtue of the equivalence of (σi)uv with \((\sigma _{i})_{v^{\prime }}\) and of preconds+(w)uv with preconds\(^{+}(w)_{v^{\prime }}\). Similarly for case (b).

Parts (ii) and (iii) of the proof can be elaborated in the same way, but we will not belabor the matter further. Only in the correctness proof for n-ary disjunctive + sv-constraints (Theorem 12) will we again spell out some of the details involving the Unification Lemma.

Theorem 5

The “dedicated” computation of sv-constraints in accordance with the hypothesize-and-test scheme is completedin polynomial time for any bound max on the allowable number of supplementary conditions, specificallyin

$$ O\left( {\displaystyle {\sum}_{o\in O}}{l_{o}^{4}}\left[\underset{o^{\prime}\in O}{\sum}l_{o^{\prime}}^{3} + \frac{\textit{max}}{l_{o}}\cdot \underset{o^{\prime}\in O}{\sum}l_{o^{\prime}}^{\textit{max}+ 2} + n^{2}_{init} \right] \right) $$

steps, where O is the set of planning operators, lo is the size of operator o, and ninit is the number of initial conditions.

Proof

The stated complexity bound is a simplification of

$$ O\left( {\sum}_{o\in O}{l_{o}^{3}}\left[ \underset{o^{\prime}\in O}{\sum} l_{o} l_{o}^{\prime3}{+} \underset{o^{\prime}\in O}{\sum}l_{o^{\prime}}\left[ l_{o^{\prime}}(l_{o^{\prime}} + l_{o} l_{o^{\prime}} + l_{o^{\prime}}) + l_{o} l_{o^{\prime}}\right]{ +} \textit{max}\cdot\underset{o^{\prime}\in O}{\sum}l_{o^{\prime}}^{\textit{max}+ 2}{+}l_{o} n^{2}_{init} \right] \right). $$

As in the proof of Theorem 3, the outer summation corresponds to the iteration over operators in the formation of hypotheses. The overall factor \(l_{o}^{3}\) derives from the iteration over an operator’s effects and concomitant changes (preconditions and effects) on which hypothesis formation is based. The first inner sum corresponds to verification condition (2), and reflects the iteration over pairs of effects threatening single-valuedness (factor \(l_{o}^{\prime 2}\)) and if appropriate the search for singleton excuses as per verification conditions (2a,b) (factor \(l_{o} l_{o^{\prime }}\)). In the second inner sum, corresponding to verification condition (3), the overall multiplier \(l_{o^{\prime }}\) comes from the iteration over effects. The term \(l_{o^{\prime }}(l_{o^{\prime }} + l_{o} l_{o^{\prime }} + l_{o^{\prime }})\) reflects (3a), with a multiplier \(l_{o^{\prime }}\) from the search for an appropriate precondition, and an embedded sum of three terms where the first, \(l_{o^{\prime }}\), corresponds to the search for a complementary effect (as per (3a(i))), and the second and third, \(l_{o^{\prime }}l_{o} + l_{o^{\prime }}\), correspond to the search for a when-clause whose preconditions are entailed by a subset of the candidate supplementary conditions, and the search for a complementary effect in such a when-clause (as per (3a(ii))). The remaining term \(l_{o} l_{o^{\prime }}\) derives from the search for a singleton excuse (verification condition (3b)) when verification condition (3a) fails. The inner sum max\(\cdot \underset {o^{\prime }\in O}{\Sigma } l{o^{\prime }}^{\textit {max}+ 2}\) corresponds to the selection of irredundant sets of up to max supplementary conditions. (This relies on set-cover complexity, as in Theorem 3.) The final term \(l_{o} n^{2}_{init}\) reflects the check of the hypothesis in the initial conditions; as discussed at the end of Section 3.5, this could be improved to loninit. □

Theorem 6

Any implicative + sv-constraint

$$ \text{\texttt{((IMPLIES (P ? X ?*Y) (NOT (Q ? X))) (S1 ? X)...(Sk ? X))}} $$

(i.e., with the consequent variables subsumed by the antecedent variables) produced byDiscoplanis correct.

The notation (Si ? X) as before means that the i th supplementary condition may (but need not) involve ? X. The theorem and its proof are easily generalized to the case where P and Q have several unstarred shared arguments, and P has several starred variables not occurring in the other. (Again, think of ? X, ?⋆Y as two sets of arguments.)

Remark: We use (S ? X) for the conjunction of all supplementary conditions. Then the simultaneous constraints of the theorem, including supplementary conditions, state that in all reachable states,

  1. (C1)

    x, y, y.S(x) ∧ P(x, y) ∧ P(x, y) ⇒ y = y,

  2. (C2)

    x, y.S(x) ∧ P(x, y) ⇒¬Q(x).

Proof

As in Theorems 3 and 5 the correctness proof is based on the sufficiency of the relevant verification conditions (as stated in Section 4.3.1). We can take both constraints to be true in the initial state, since Discoplan straightforwardly verifies them (verification condition 1). Given any instance of any operator o, and a prior state sprior in which the preconditions of the primary when-clause w1 of that operator instance are true, we assume for induction that the 2 constraints hold in sprior. We want to show that they also hold in the resultant state sresult. Assume otherwise, i.e., assume that

  1. (C3)

    for some constants a, b, c, where bc, S(a), P(a, b), and P(a, c) hold in sresult; or

  2. (C4)

    for some constants a, b, c, S(a), P(a, b), and ¬Q(a) hold in sresult.

We derive a contradiction for each of the two cases. First consider case (C3). Since S is static, we also had

  1. (C5)

    S(a) true in sprior.

But by induction assumption (C1), at least one of the literals in (C3) must have been false in sprior, and so

  1. (C6)

    P(a, b) or P(a, c) was false in sprior.

We now argue as follows. (A few details are added below.) (i) Since according to (C3) P(a, b) and P(a, c) are both true in sresult while according to (C6) one of them was false in sprior, by the semantics of operators there must be an effect literal that was instantiated to P(a, b) or P(a, c). (ii) At least one of P(a, b), P(a, c) was true in sprior, otherwise there would need to be multiple effects P(a, b), P(a, c) to render (C3) true, and this is ruled out by verification condition 2 (according to which a precondition of o would entail ¬S(a), contrary to (C3)). (Details can be filled in as in subargument (i) in the proof of Theorem 5.) (iii) Since there was an effect P(a, b) or P(a, c) by (i), verification condition 3(a) or (b) applies. 3(b) entails that ¬S(a) held in sprior, contrary to assumption (C3); so 3(a) applies. Now by 3(a)(ii) we have a precondition ¬Q(a) or a change from P(a, d) to ¬P(a, d) for some value of d, compensating for effect P(a, b) or P(a, c). If the former were true, S(a) ∧ P(a, y) would be false for all values of y in sprior, by the induction assumption. But S(a) is true so P(a, b) and P(a, c) would be false in sprior, contrary to (ii). So we are left with the possibility of a compensating change from P(a, d) to ¬P(a, d) for some db or ≠c depending on whether we have an effect P(a, b) or P(a, c). But if P(a, d) held in sprior, then by induction assumption (C1) P(a, b) and P(a, c) were false in sprior, contrary to (ii).

Now consider case (C4). We begin much as before by noting that since S is static, (C5) holds, and that by (C5) and induction assumption (C2),

  1. (C7)

    either P(a, b) or ¬Q(a) was false in sprior.

We argue that there is an effect literal that was instantiated to P(a, b) or ¬Q(a) (by (C4) and (C7) and the semantics of operators). For the possibility that P(a, b) was generated, verification condition 3(a) or 3(b) applies, but (b) implies ¬S(a), which cannot be true by (C5); so 3(a) applies. By 3(a)(i) there should then be an effect or persistent precondition Q(a), but this is contradicted by the assumption in (C4) that ¬Q(a) holds in sresult. This eliminates the possibility that P(a, b) was generated, so that

  1. (C8)

    P(a, b) was true in sprior,

and we are left with the possibility that ¬Q(a) was generated, and Q(a) was true in sprior. This brings into play verification condition 4. Now 4(b) entails ¬S(a), contrary to (C5), leaving us with 4(a), requiring a concomitant change from P(a, d) to ¬P(a, d) for some d. But then by (C8) and induction assumption (C1), either S(a) was false in the prior state or d = b. The former is again ruled out by (C5); so with d = b, we have a concomitant change from P(a, b) to ¬P(a, b). But this contradicts (C4). □

Theorem 7

Any exclusive state constraint

$$ \text{\texttt{((IMPLIES (P ? X ?*Y) (NOT (Q ? X ?*Z))) (S1 ? X)...(Sk ? X))}} $$

produced by Discoplan is correct.

The notation (Si ? X) as before means that the i th supplementary condition may (but need not) involve ? X. The theorem and its proof are easily generalized to the case where P and Q have several unstarred shared arguments, and each has several starred arguments not occurring in the other. (Again, think of ? X, ?⋆Y, ?⋆Z as sets of arguments.)

Remark: We use (S ? X) for the conjunction of all supplementary conditions. Then the simultaneous constraints of the theorem, including supplementary conditions, state that in all reachable states,

  1. (C1)

    x, y, y.S(x) ∧ P(x, y) ∧ P(x, y) ⇒ y = y,

  2. (C2)

    x, z, z.S(x) ∧ Q(x, z) ∧ Q(x, z) ⇒ z = z, and

  3. (C3)

    x, y, z.S(x) ∧ P(x, y) ⇒¬Q(x, z).

Proof

As in Theorems 3, 5 and 7 the correctness proof is based on the sufficiency of the relevant verification conditions (as stated in Section 4.3.2). Much as in the previous proofs we can take all three constraints to be true in the initial state, since Discoplan straightforwardly verifies them (verification condition 1). Given any instance of any operator o, and a prior state in which the preconditions of the primary when-clause w1 of that operator instance are true, we assume for induction that the 3 constraints hold in that prior state. We want to show that they also hold in the resultant state. Assume otherwise, i.e., assume that

  1. (C4)

    for some constants a, b, c, where bc, S(a), P(a, b), and P(a, c) hold in the resultant state; or

  2. (C5)

    for some constants a, b, c, where bc, S(a), Q(a, b), and Q(a, c) hold in the resultant state; or

  3. (C6)

    for some constants a, b, c, S(a), P(a, b), and Q(a, c) hold in the resultant state.

We derive a contradiction for each of the three cases. First consider case (C4). Since S is static, we also had

  1. (C7)

    S(a) true in the prior state.

But by the induction assumption, at least one of the literals in (C4) must have been false in the prior state, and so

  1. (C8)

    P(a, b) or P(a, c) was false in the prior state.

We now argue, much as in the proof of Theorem 7, that (i) there is an effect literal that was instantiated to P(a, b) or P(a, c); (ii) at least one of P(a, b), P(a, c) was true in the prior state; (iii) by (i), and the way hypotheses are tested and augmented with supplementary conditions (verification condition 4a,b), Q(a, d) was true for some d in the prior state; (iv) so, by the induction assumption (C3) and by (C7), P(a, y) was false for all y in the prior state, contrary to (ii).

The details for steps (i) and (ii) of the argument are just as in the proof of Theorem 7, and we will not repeat them. Proceeding to (iii), we note that in testing the exclusion hypothesis under consideration, we ensure that whenever an effect of form P(x, y) is present, a precondition of form Q(x, z) is present in the corresponding when-clause or primary when-clause with x, x provably equal (verification condition 4a), or else we introduce a supplementary condition that is false whenever the preconditions of effect P(x, y) hold (verification conditions 4b). But by (i) such an effect is indeed present, namely P(r, s), so either there is a precondition Q(r, z) of w or w1, with r, r provably equal, or else S(r) is false whenever the preconditions of w and w1 hold. The latter is ruled out by (C7) (the truth of S(a)) and the presumed truth of the preconditions of w and w1 in the prior state. Thus Q(a, d) holds for some d in the prior state. But then from induction assumption (C3) in the prior state, we have ∀yS(a) ∨¬P(a, y) in the prior state; in particular, ¬S(a) ∨¬P(a, b) and ¬S(a) ∨¬P(a, c), but at least one of these is false by (C7) and (ii).

The derivation of a contradiction from (C5) is completely analogous to the previous argument for (C4) (with P and Q interchanged), so we proceed to (C6). We begin as before by noting that (C7) holds, and that by (C7) and the induction assumption,

  1. (C9)

    either P(a, b) or Q(a, c) was false in the prior state.

We argue that (i) there is an effect literal that was instantiated to P(a, b) or Q(a, c); for the case where P(a, b) was generated, we argue further that (ii) Q(a, d) was verified as a precondition and ¬Q(a, d) was generated as an effect for some d, and (iii) consequently ¬Q(a, z) holds for all z in the resultant state, contrary to (C6); and (iv) an analogous argument holds for the case where Q(a, c) was generated.

(i) is immediate from (C6) and (C9). So assume that the effect P(a, b) was generated by an effect literal P(r, s) of some when-clause w (possibly w1). Concerning (ii), in virtue of verification conditions (4a,b), either there exists a precondition Q(r, z) of w or w1 where r and r are provably identical, or else there is a supplementary condition among the conjuncts in S(r) whose falsity is entailed by the preconditions of w or w1. The latter is impossible by the presumed truth of the preconditions of w and w1 and by (C7) for the operator instance under consideration. So precondition Q(a, d) is verified in the prior state. Verification conditions (4a,b) further guarantee that either there is an effect ¬Q(r, z) of w or w1, where r, r are provably equal and z, z are provably equal, or else there is such an effect of some other when-clause w2, where the supplementary conditions of the hypothesis entail the truth of the preconditions of w2. So in view of (C7), we do indeed have an effect ¬Q(a, d) for the operator instance in question. Concerning (iii), by induction assumption (C2) in the prior state, by (C7), and by the truth of Q(a, d) in the prior state we have ∀z.Q(a, z) ⇒ z = d in the prior state. But since we have an effect ¬Q(a, d), we will have ∀zQ(a, z) in the resultant state, unless there is some additional effect of form Q(u, v) of some when-clause w3 (not necessarily distinct from w, w1, or w2) with true preconditions and with u instantiated to a. But this latter possibility is ruled out by verification condition (6), i.e., if there were such an effect (given that there is an effect P(r, s)) there would be a supplementary condition whose falsity is entailed by the preconditions of w, w1, or w3. So since ∀zQ(a, z) contradicts (C6) in the resultant state, we have established (iii). Finally the analogous argument for (iv) essentially just interchanges the roles of P and Q and of b and c. □

Theorem 8

The computation of exclusive state constraints in accordance with the hypothesize-and-testscheme is completed in polynomial time for any bound max on the allowable number ofsupplementary conditions.

Proof sketch

We omit details. The analysis here is very much as in Theorems 3 and 5. Verification conditions (1–6) for exclusive state constraints closely resemble those for simple implicative constraints and for (independently verifiable) sv-constraints, and lead to similar time bounds, polynomial in the sizes lo of operators and the number ninit of initial conditions, for any fixed upper bound max on the number of supplementary conditions.

Rights and permissions

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Gerevini, A.E., Schubert, L. Discovering state constraints for planning with conditional effects in Discoplan (part I). Ann Math Artif Intell 88, 641–686 (2020). https://doi.org/10.1007/s10472-019-09618-w

Download citation

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s10472-019-09618-w

Keywords

Mathematics Subject Classification (2010)

Navigation