<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta>
      <issn pub-type="ppub">1613-0073</issn>
    </journal-meta>
    <article-meta>
      <title-group>
        <article-title>Abstractions for Generalized Planning - Extended Abstract</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Giuseppe De Giacomo</string-name>
          <email>giuseppe.degiacomo@cs.ox.ac.uk</email>
          <xref ref-type="aff" rid="aff0">0</xref>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Yves Lespérance</string-name>
          <xref ref-type="aff" rid="aff2">2</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Matteo Mancanelli</string-name>
          <email>mancanelli@diag.uniroma1.it</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Workshop</string-name>
        </contrib>
        <contrib contrib-type="editor">
          <string-name>Generalized Planning, Situation Calculus, Nondeterministic Domains, Abstractions, Strategy Synthesis</string-name>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Sapienza University</institution>
          ,
          <addr-line>Rome</addr-line>
          ,
          <country country="IT">Italy</country>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>University of Oxford</institution>
          ,
          <addr-line>Oxford</addr-line>
          ,
          <country country="UK">UK</country>
        </aff>
        <aff id="aff2">
          <label>2</label>
          <institution>York University</institution>
          ,
          <addr-line>Toronto, ON</addr-line>
          ,
          <country country="CA">Canada</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>We present a new formal framework for generalized planning (GP) based on the situation calculus extended with LTL constraints. The GP problem is specified by a first-order basic action theory whose models are the problem instances. This low-level theory is then abstracted into a high-level propositional nondeterministic basic action theory with a single model. A refinement mapping relates the two theories. LTL formulas are used to specify the temporally extended goals as well as assumed trace constraints. If all LTL trace constraints hold at the low level and the high-level model can simulate all the low-level models with respect to the mapping, we say that we have a temporally lifted abstraction . We prove that if we have such an abstraction and the agent has a strategy to achieve a LTL goal under some trace constraints at the abstract level, then there exists a refinement of the strategy to achieve the refinement of the goal at the concrete level. We use LTL synthesis to generate the strategy at the abstract level. We illustrate our approach by synthesizing a program that solves a data structure manipulation problem.</p>
      </abstract>
      <kwd-group>
        <kwd>Abstract</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1. Overview</title>
      <p>
        In generalized planning (GP), one tries to generate a typically iterative policy that solves an infinite set
of similar planning problem instances [
        <xref ref-type="bibr" rid="ref2 ref3 ref4">2, 3, 4</xref>
        ]. For example, we may want to synthesize a program for
ifnding the minimum value in a list, for lists of any lengths. Many approaches to generalized planning
involve constructing an abstraction and finding a solution for this abstraction which handles all the
actual problem instances [
        <xref ref-type="bibr" rid="ref5 ref6">5, 6</xref>
        ]. We propose a new formal framework for generalized planning based
on the situation calculus [
        <xref ref-type="bibr" rid="ref7 ref8">7, 8</xref>
        ] that allows one to provide an abstract description of the domain and
associated LTL trace constraints [
        <xref ref-type="bibr" rid="ref6 ref9">6, 9</xref>
        ], and prove that a controller synthesized for the abstract theory
can be refined into one that achieves the goal at the concrete level.
      </p>
      <p>
        Our framework is based on the nondeterministic situation calculus [
        <xref ref-type="bibr" rid="ref10">10</xref>
        ] (DL21) where each agent
action ( )⃗
      </p>
      <p>is accompanied by an environment reaction  outside the agent’s control that determines
the action’s outcome, e.g., a flipped coin may fall head or tail. A nondeterministic basic action theory
(NDBAT) can be seen as a special kind of action theory, where we have system actions ( ,⃗)
, successor
state axioms   , describing how predicates and functions change after system actions are performed,
and action precondition axioms</p>
      <p>
        , stating when each system action can occur. [
        <xref ref-type="bibr" rid="ref11">11</xref>
        ] (BDL23) have
proposed an account of abstraction for NDBATs. They relate a high-level NDBAT to a low-level NDBAT
through a refinement mapping that specifies how a high-level action is implemented at the low level by
a ConGolog program [
        <xref ref-type="bibr" rid="ref12 ref13">12, 13</xref>
        ]. They then define notions of sound and/or complete abstraction for such
NDBATs in terms of a notion of bisimulation between their models. [
        <xref ref-type="bibr" rid="ref14 ref15">14, 15</xref>
        ] have adapted and extended
this kind of approach to solve GP problems, focusing on QNP abstractions.
      </p>
      <p>CEUR</p>
      <p>ceur-ws.org</p>
      <p>Here, we assume that the modeler specifies a propositional high-level (HL) action theory/model with
a limited set of HL fluents and nondeterministic actions, which abstracts over a concrete low-level (LL)
action theory with multiple models, with a given refinement mapping  . At the LL, in each model we
have complete information about the state of the world, while at the HL, we have actions that may
have several outcomes, e.g., after advancing to the next item in a list, we may or may not reach the
list’s end. We extend the HL theory with LTL trace constraints to impose fairness assumptions on
the possible sequences of nondeterministic actions, e.g., ensuring that if we keep advancing we will
eventually reach the list’s end. Finally, we define a notion of temporally lifted abstraction , where every
LL trace that is a refinement of a sequence of HL actions is  -similar to a trace involving this action
sequence in the HL model, and where the LTL trace constraints are satisfied by the LL theory. The
NDBATs represent our GP problem, where each LL model specifies the planning problem instances,
and the HL model abstracts away the LL details, retaining only the shared features. We then provide
a method for solving all the planning problem instances simultaneously. In particular, we show that
given such an abstraction, if we can use LTL synthesis on the HL model to obtain a HL strategy that
achieves a LTL goal under the given trace constraints, then we can automatically refine it to get a LL
strategy that achieves the mapped LTL goal in all concrete instances of the problem.</p>
      <p>
        We illustrate how our approach works by using it to synthesize a program to find the minimum value
of a list. This application is inspired by [
        <xref ref-type="bibr" rid="ref16">16</xref>
        ], which proposed an approach for solving program synthesis
tasks [
        <xref ref-type="bibr" rid="ref17 ref18">17, 18, 19, 20, 21</xref>
        ] that involve the manipulation of data structures such as lists, trees, and graphs
by viewing them as instances of generalized planning. They provide several examples of how their
method can be applied, but they do not provide complete formal specifications of the data structures
used and formal proofs that the assumed temporal constraints and goal specifications hold for them.
      </p>
    </sec>
    <sec id="sec-2">
      <title>2. Methodology</title>
      <p>Our methodology involves the following main steps:
1. Formalize the concrete planning problem instances in situation calculus - this consists of writing
the specification for the domain of interest; hence, it is straightforward
2. Specify a propositional temporally lifted abstraction as a HL NDBAT - this abstracts over some
details and includes nondeterministic actions; some LTL trace constraints will also be introduced
to capture restrictions on the possible future histories; obtaining the HL NDBAT is similar to the
previous step and, in many cases, we can reuse the specification of one GP task for other similar
tasks (i.e., involving the same data structure)
3. Write the LTL goals - this step is domain-dependent
4. Run a LTL synthesis engine on the abstraction - this automatically derives a HL strategy to reach the
goals; note that our HL propositional abstraction can always be interpreted as an LTL specification
5. Translate the HL strategy to a LL program - this step can be simply addressed by using the
refinement mapping
This methodology yields provably correct solutions with strong formal guarantees. Note that there
should be no need to generate the entire situation calculus specifications from scratch. Instead, one
could build a library of specifications and reuse them in a modular way. Thus, the modeler can just
specify her problem in terms of HL trace and goal constraints, exploiting this library, and then run the
automatic synthesis engines.</p>
    </sec>
    <sec id="sec-3">
      <title>Acknowledgments</title>
      <p>This work has been partially supported by the ERC Advanced Grant WhiteMech (No. 834228), the PNRR
MUR project FAIR (No. PE0000013), the Italian National Ph.D. on Artificial Intelligence at Sapienza
University of Rome, the National Science and Engineering Research Council of Canada, and York
University.
[19] A. Church, Logic, arithmetics, and automata, in: Proc. Int. Congress of Mathematicians, 1963, pp.</p>
      <p>23–35.
[20] M. Abadi, L. Lamport, P. Wolper, Realizable and unrealizable specifications of reactive systems, in:</p>
      <p>ICALP, volume 372 of Lecture Notes in Computer Science, Springer, 1989, pp. 1–17.
[21] A. Pnueli, R. Rosner, On the synthesis of a reactive module, in: Proceedings of the 16th ACM
SIGPLAN-SIGACT symposium on Principles of programming languages, 1989, pp. 179–190.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <given-names>D.</given-names>
            <surname>Aineto</surname>
          </string-name>
          , R. De Benedictis,
          <string-name>
            <given-names>M.</given-names>
            <surname>Maratea</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Mittelmann</surname>
          </string-name>
          ,
          <string-name>
            <given-names>G.</given-names>
            <surname>Monaco</surname>
          </string-name>
          ,
          <string-name>
            <given-names>E.</given-names>
            <surname>Scala</surname>
          </string-name>
          ,
          <string-name>
            <given-names>L.</given-names>
            <surname>Serafini</surname>
          </string-name>
          ,
          <string-name>
            <given-names>I.</given-names>
            <surname>Serina</surname>
          </string-name>
          ,
          <string-name>
            <given-names>F.</given-names>
            <surname>Spegni</surname>
          </string-name>
          ,
          <string-name>
            <given-names>E.</given-names>
            <surname>Tosello</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Umbrico</surname>
          </string-name>
          , M. Vallati (Eds.),
          <source>Proceedings of the International Workshop on Artificial Intelligence for Climate Change, the Italian workshop on Planning and Scheduling</source>
          , the RCRA Workshop on
          <article-title>Experimental evaluation of algorithms for solving problems with combinatorial explosion, and</article-title>
          the Workshop on Strategies, Prediction, Interaction, and
          <article-title>Reasoning in Italy (AI4CC-IPS-RCRA-SPIRIT 2024), co-located with 23rd International Conference of the Italian Association for Artificial Intelligence</article-title>
          (AIxIA
          <year>2024</year>
          ), CEUR Workshop Proceedings, CEUR-WS.org,
          <year>2024</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <given-names>S.</given-names>
            <surname>Srivastava</surname>
          </string-name>
          ,
          <string-name>
            <given-names>N.</given-names>
            <surname>Immerman</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Zilberstein</surname>
          </string-name>
          ,
          <article-title>Learning generalized plans using abstract counting</article-title>
          ,
          <source>in: AAAI</source>
          ,
          <year>2008</year>
          , pp.
          <fpage>991</fpage>
          -
          <lpage>997</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <given-names>Y.</given-names>
            <surname>Hu</surname>
          </string-name>
          , G. De Giacomo,
          <article-title>Generalized planning: Synthesizing plans that work for multiple environments</article-title>
          , in: IJCAI,
          <year>2011</year>
          , pp.
          <fpage>918</fpage>
          -
          <lpage>923</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <given-names>V.</given-names>
            <surname>Belle</surname>
          </string-name>
          ,
          <string-name>
            <given-names>H. J.</given-names>
            <surname>Levesque</surname>
          </string-name>
          ,
          <article-title>Foundations for generalized planning in unbounded stochastic domains</article-title>
          ,
          <source>in: KR</source>
          ,
          <year>2016</year>
          , pp.
          <fpage>380</fpage>
          -
          <lpage>389</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <given-names>B.</given-names>
            <surname>Bonet</surname>
          </string-name>
          ,
          <string-name>
            <given-names>H.</given-names>
            <surname>Gefner</surname>
          </string-name>
          ,
          <article-title>Policies that generalize: Solving many planning problems with the same policy</article-title>
          .,
          <source>in: IJCAI</source>
          , volume
          <volume>15</volume>
          ,
          <year>2015</year>
          , pp.
          <fpage>2798</fpage>
          -
          <lpage>2804</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [6]
          <string-name>
            <given-names>B.</given-names>
            <surname>Bonet</surname>
          </string-name>
          , G. De Giacomo,
          <string-name>
            <given-names>H.</given-names>
            <surname>Gefner</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Rubin</surname>
          </string-name>
          ,
          <article-title>Generalized planning: non-deterministic abstractions and trajectory constraints</article-title>
          ,
          <source>in: IJCAI</source>
          ,
          <year>2017</year>
          , pp.
          <fpage>873</fpage>
          -
          <lpage>879</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [7]
          <string-name>
            <given-names>J.</given-names>
            <surname>McCarthy</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P. J.</given-names>
            <surname>Hayes</surname>
          </string-name>
          ,
          <source>Some Philosophical Problems From the Standpoint of Artificial Intelligence, Machine Intelligence</source>
          <volume>4</volume>
          (
          <year>1969</year>
          )
          <fpage>463</fpage>
          -
          <lpage>502</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          [8]
          <string-name>
            <given-names>R.</given-names>
            <surname>Reiter</surname>
          </string-name>
          ,
          <article-title>Knowledge in Action. Logical Foundations for Specifying and Implementing Dynamical Systems</article-title>
          , The MIT Press,
          <year>2001</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          [9]
          <string-name>
            <given-names>B.</given-names>
            <surname>Aminof</surname>
          </string-name>
          , G. De Giacomo,
          <string-name>
            <given-names>A.</given-names>
            <surname>Murano</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Rubin</surname>
          </string-name>
          ,
          <article-title>Planning under LTL environment specifications</article-title>
          ,
          <source>in: ICAPS</source>
          ,
          <year>2019</year>
          , pp.
          <fpage>31</fpage>
          -
          <lpage>39</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          [10]
          <string-name>
            <surname>G. De Giacomo</surname>
            ,
            <given-names>Y. Lespérance,</given-names>
          </string-name>
          <article-title>The nondeterministic situation calculus</article-title>
          , in: M.
          <string-name>
            <surname>Bienvenu</surname>
            ,
            <given-names>G.</given-names>
          </string-name>
          <string-name>
            <surname>Lakemeyer</surname>
          </string-name>
          , E. Erdem (Eds.),
          <source>Proceedings of the 18th International Conference on Principles of Knowledge Representation and Reasoning</source>
          , KR 2021,
          <article-title>Online event</article-title>
          ,
          <source>November</source>
          <volume>3</volume>
          -
          <issue>12</issue>
          ,
          <year>2021</year>
          ,
          <year>2021</year>
          , pp.
          <fpage>216</fpage>
          -
          <lpage>226</lpage>
          . URL: https://doi.org/10.24963/kr.2021/21. doi:
          <volume>10</volume>
          .24963/KR.
          <year>2021</year>
          /21.
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          [11]
          <string-name>
            <given-names>B.</given-names>
            <surname>Banihashemi</surname>
          </string-name>
          , G. De Giacomo,
          <string-name>
            <given-names>Y.</given-names>
            <surname>Lespérance</surname>
          </string-name>
          ,
          <article-title>Abstraction of nondeterministic situation calculus action theories</article-title>
          ,
          <source>in: Proceedings of the Thirty-Second International Joint Conference on Artificial Intelligence, IJCAI</source>
          <year>2023</year>
          ,
          <fpage>19th</fpage>
          -25th
          <source>August</source>
          <year>2023</year>
          , Macao,
          <string-name>
            <surname>SAR</surname>
          </string-name>
          , China,
          <year>2023</year>
          , pp.
          <fpage>3112</fpage>
          -
          <lpage>3122</lpage>
          . URL: https://doi.org/10.24963/ijcai.
          <year>2023</year>
          /347. doi:
          <volume>10</volume>
          .24963/IJCAI.
          <year>2023</year>
          /347.
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          [12]
          <string-name>
            <surname>G. De Giacomo</surname>
            ,
            <given-names>Y.</given-names>
          </string-name>
          <string-name>
            <surname>Lespérance</surname>
            ,
            <given-names>H. J.</given-names>
          </string-name>
          <string-name>
            <surname>Levesque</surname>
          </string-name>
          ,
          <article-title>ConGolog, a concurrent programming language based on the situation calculus</article-title>
          ,
          <source>Artificial Intelligence</source>
          <volume>121</volume>
          (
          <year>2000</year>
          )
          <fpage>109</fpage>
          -
          <lpage>169</lpage>
          . URL: https://doi.org/10. 1016/S0004-
          <volume>3702</volume>
          (
          <issue>00</issue>
          )
          <fpage>00031</fpage>
          -
          <lpage>X</lpage>
          . doi:
          <volume>10</volume>
          .1016/S0004-
          <volume>3702</volume>
          (
          <issue>00</issue>
          )
          <fpage>00031</fpage>
          -
          <lpage>X</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          [13]
          <string-name>
            <surname>G. De Giacomo</surname>
            ,
            <given-names>Y.</given-names>
          </string-name>
          <string-name>
            <surname>Lespérance</surname>
            ,
            <given-names>A. R.</given-names>
          </string-name>
          <string-name>
            <surname>Pearce</surname>
          </string-name>
          ,
          <article-title>Situation calculus based programs for representing and reasoning about game structures</article-title>
          ,
          <source>in: Principles of Knowledge Representation and Reasoning: Proceedings of the Twelfth International Conference, KR 2010</source>
          , Toronto, Ontario, Canada, May 9-
          <issue>13</issue>
          ,
          <year>2010</year>
          , AAAI Press,
          <year>2010</year>
          . URL: http://aaai.org/ocs/index.php/KR/KR2010/paper/view/1388.
        </mixed-citation>
      </ref>
      <ref id="ref14">
        <mixed-citation>
          [14]
          <string-name>
            <given-names>Z.</given-names>
            <surname>Cui</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Y.</given-names>
            <surname>Liu</surname>
          </string-name>
          ,
          <string-name>
            <given-names>K.</given-names>
            <surname>Luo</surname>
          </string-name>
          ,
          <article-title>A uniform abstraction framework for generalized planning</article-title>
          .,
          <source>in: IJCAI</source>
          ,
          <year>2021</year>
          , pp.
          <fpage>1837</fpage>
          -
          <lpage>1844</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref15">
        <mixed-citation>
          [15]
          <string-name>
            <given-names>Z.</given-names>
            <surname>Cui</surname>
          </string-name>
          ,
          <string-name>
            <given-names>W.</given-names>
            <surname>Kuang</surname>
          </string-name>
          , Y. Liu,
          <article-title>Automatic verification for soundness of bounded qnp abstractions for generalized planning</article-title>
          ,
          <source>in: Proceedings of the Thirty-Second International Joint Conference on Artificial Intelligence</source>
          ,
          <year>2023</year>
          , pp.
          <fpage>3149</fpage>
          -
          <lpage>3157</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref16">
        <mixed-citation>
          [16]
          <string-name>
            <given-names>B.</given-names>
            <surname>Bonet</surname>
          </string-name>
          , G. De Giacomo,
          <string-name>
            <given-names>H.</given-names>
            <surname>Gefner</surname>
          </string-name>
          ,
          <string-name>
            <given-names>F.</given-names>
            <surname>Patrizi</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Rubin</surname>
          </string-name>
          ,
          <article-title>High-level programming via generalized planning and ltl synthesis</article-title>
          ,
          <source>in: Proceedings of the International Conference on Principles of Knowledge Representation and Reasoning</source>
          , volume
          <volume>17</volume>
          ,
          <year>2020</year>
          , pp.
          <fpage>152</fpage>
          -
          <lpage>161</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref17">
        <mixed-citation>
          [17]
          <string-name>
            <given-names>C. C.</given-names>
            <surname>Green</surname>
          </string-name>
          ,
          <article-title>Application of theorem proving to problem solving</article-title>
          ,
          <source>in: IJCAI</source>
          ,
          <year>1969</year>
          , pp.
          <fpage>219</fpage>
          -
          <lpage>240</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref18">
        <mixed-citation>
          [18]
          <string-name>
            <given-names>R. J.</given-names>
            <surname>Waldinger</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R. C. T.</given-names>
            <surname>Lee</surname>
          </string-name>
          ,
          <string-name>
            <surname>PROW:</surname>
          </string-name>
          <article-title>A step toward automatic program writing</article-title>
          ,
          <source>in: IJCAI</source>
          ,
          <year>1969</year>
          , pp.
          <fpage>241</fpage>
          -
          <lpage>252</lpage>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>