<!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 />
    <article-meta>
      <title-group>
        <article-title>Winning CaRet Games with Modular Strategies?</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Ilaria De Crescenzo</string-name>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Salvatore La Torre</string-name>
        </contrib>
      </contrib-group>
      <abstract>
        <p>Recursive state machines are a well-accepted formalism for modelling the control ow of systems with potentially recursive procedure calls. In the open systems setting, i.e., systems where an execution depends on the interaction of the system with the environment, the natural counterpart is two-player recursive game graphs which essentially are recursive state machines where vertices are split into two sets each controlled by one of the players. We focus on solving games played on such graphs with respect to winning conditions expressed by a formula of the temporal logic CaRet and such that the protagonist can only use modular strategies (modular CaRet games). In a modular strategy, the protagonist may use as memory only the portion of the play which is local to the current activation of the current module. Therefore, every time a module is entered, the memory used by the protagonist gets reset. The main motivation for considering modular strategies is related to the synthesis of system controllers. In fact, a modular strategy would correspond to a modular controller for the considered system. Modular strategies have been already studied with winning conditions expressed as reachability, safety, Buchi automata or LTL formulas. In this paper we extend these results to non-regular winning conditions by considering speci cations expressed in CaRet. In particular, we show that deciding whether the protagonist has a winning modular strategy in a CaRet game is 2ExpTime-complete, that matches the complexity of deciding modular LTL games.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>-</title>
      <p>
        The interest for games naturally arises in many contexts. In the formal analysis
of systems, games are closely related to the controller synthesis problem and to
the veri cation of open systems, and are useful tools for solving decision problems
such as, for example, the model-checking of the -calculus formulas (see [
        <xref ref-type="bibr" rid="ref6 ref9">6, 9</xref>
        ]).
      </p>
      <p>
        In controller synthesis, given a description of the system where some of the
choices depend upon the input and some represent uncontrollable internal
nondeterminism, the goal is to design a controller that supplies inputs to the system
? This work was partially funded by the MIUR grants FARB 2009-2010 Universita
degli Studi di Salerno (Italy).
so that the product of the controller and the system satis es the correctness
speci cation, that clearly corresponds to computing winning strategies in
twoplayer games. See [
        <xref ref-type="bibr" rid="ref10">10</xref>
        ] for a survey.
      </p>
      <p>
        In the open systems setting, for instance, the Alternating Temporal Logic
allows speci cation of requirements such as \module A can ensure delivery of
the message no matter how module B behaves" [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ]; module checking deals with
the problem of checking whether a module behaves correctly no matter in which
environment it is placed [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ].
      </p>
      <p>
        In this paper, we focus on pushdown systems. Pushdown systems accurately
model the control ow in programs of sequential imperative programming
languages with recursive procedure calls. A large number of hardware and software
systems can be captured by this model, such as programs of object oriented
languages, systems with distributed architectures and communication protocols.
The study of games on such systems has traditionally focused on determining
the existence of a winning strategy, that is a mapping that speci es for each
play ending into a controlled state the next move such that each resulting play
satis es the winning conditions [
        <xref ref-type="bibr" rid="ref12 ref5">5, 12</xref>
        ].
      </p>
      <p>
        Here, we consider modular strategies [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ], that are strategies where the next
move is determined only looking at the local memory of the current activation
of the current module. It is known that modular reachability games are
NPcomplete [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ]. Also, modular strategies have been considered for winning
conditions expressed as an !-regular language, using Buchi, Co-Buchi automata or
linear temporal logic formulas, and in particular, modular LTL games are known
to be 2ExpTime-complete [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ].
      </p>
      <p>
        We extend the results on modular strategies to a more general class of winning
conditions. We allow winning conditions expressed as formulas of the temporal
logic CaRet [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ]. The logic CaRet combines the temporal modalities of LTL
with di erent kinds of successor (global, abstract and caller ) and can express
both regular requirements and a variety of non-regular properties such as partial
and total correctness of program blocks or inspection of the stack. By using
an automaton theoretic approach, we show that solving the modular CaRet
games is decidible within double exponential time. Since modular LTL games
are already 2ExpTime-hard and CaRet sintactically includes LTL, we get that
also modular CaRet games are 2ExpTime-complete.
2
      </p>
    </sec>
    <sec id="sec-2">
      <title>Preliminary</title>
      <p>Recursive game graph. A recursive game graph (RGG) is composed of game
modules that are essentially two-player graphs (i.e., graphs whose vertices are
partitioned into two sets depending on the player who controls the outgoing
moves) with entry and exit nodes and two di erent kinds of vertices: the nodes
and the boxes. A node is a standard graph vertex and a box corresponds to
invocations of other game modules in a potentially recursive manner (in
particular, entering into a box corresponds to a module call and exiting from a box
corresponds to a return from a module). Each RGG has a distinct game module
which is called the start module. A state of an RGG is composed by a call stack
and a node. The notion of run can be de ned analogously to the computation of
a standard procedural program (the modules corresponding to the procedures).
A play of an RGG is a run starting from an entry node of the start module.</p>
      <p>
        For a formal de nition of an RGG we refer the reader to [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ].
      </p>
      <p>Strategies. Given a player P , a strategy is a function that associates a move to
every run that ends in a node controlled by P . A modular strategy consists of
a set of local strategies, one for each game module, that are used together as
a global strategy for a player . A local strategy for a module can only refer to
the local memory of the module, i.e. the sequence of vertices that correspond to
internal nodes, call or returns of the module. This sequence corresponds to the
portion of the play concerning to the current invocation of the module.</p>
      <p>
        For detailed comments and formal de nitions on recursive game graphs,
strategies and modular strategies we refer the reader to [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ].
      </p>
      <p>Syntax
Semantics
' := p j ' _ ' j : ' j g' j a' j ' j ' Ug' j ' Ua' j ' U ' (where
p 2 AP [ fcall, ret, intg )
for a word = 1; 2; 3; :::; n; ::: 2 ^! and n 2 N :
{ ( ; n) j= p i n = (X; d) and p 2 X or p = d
{ ( ; n) j= '1 _ '2 i ( ; n) j= '1 or ( ; n) j= '2
{ ( ; n) j= :'g 'i i( (; n;)s2uc'cg (n)) j= ', i.e., i ( ; n + 1) j= '
{ ( ; n) j=
{ ( ; n) j= a' i succa (n)) 6= ? and ( ; succa (n)) j= '
{ ( ; n) j= ' i succ (n)) 6= ? and ( ; succ (n)) j= '
{ ( ; n) j= '1 Ub'2 (for any b 2 fg; a; g) i there is a sequence of position
i0; i1; :::; ik; where i0 = n; ( ; ik) j= '2 and for every 0 j k 1; ij + 1 =
succb (ij)) and ( ; ij) j= '1</p>
      <p>CaRet. Let = 2AP where AP is a nite set of atomic propositions. We
consider the augmented alphabet of that is ^ = fcall; ret; intg.</p>
      <p>
        The syntax and the semantics of CaRet are reported in Fig. 1. We refer the
reader to [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ] for a detailed de nition of CaRet.
      </p>
      <p>In this logic, three di erent notions of successor are used:
{ the global-successor (succg) which is the usual successor function. It points
to next node, whatever module it belongs;
{ the abstract-successor (succa) which, for internal moves, corresponds to the
global successor and for calls corresponds to the matching returns;
{ the caller successor (succ ) which is a "past" modality that points to the
innermost unmatched call.</p>
      <p>Typical properties that can be expressed by the logic CaRet are pre and
post conditions. An example is the formula 2[(call ^ p ^ pA) ! aq]. If we
assume that all calls to procedure A are characterized by the proposition pA,
the formula expresses that if the pre-condition p holds when the procedure A
is invoked, then the procedure terminates and the post-condition q is satis ed
upon the return. This is the requirement of total correctness. Observe the use
of the abstract next operator to refer to the return associated with the call.
Modular CaRet games. A modular CaRet game is a pair hG; 'i where G
is a RGG whose vertices (nodes, calls and returns) are labeled with a set of
propositions and ' is a CaRet formula. Given a modular CaRet game hG; 'i
we want solve the problem of deciding whether there exists a modular strategy
such that the resulting plays are guaranteed to satisfy '.</p>
      <p>
        Detailed comments and formal de nitions for modular CaRet games can be
found in [
        <xref ref-type="bibr" rid="ref13">13</xref>
        ].
3
      </p>
    </sec>
    <sec id="sec-3">
      <title>Solving modular CaRet games</title>
      <p>
        In this section, we brie y sketch our solution to CaRet games. For the omitted
details, we refer the interested reader to [
        <xref ref-type="bibr" rid="ref13">13</xref>
        ].
      </p>
      <p>Our solution consists of three main steps.</p>
      <p>Let hG; 'i be a modular CaRet game.</p>
      <p>
        The rst step consists of constructing from hG; 'i an equivalent game hG0; colori
with parity winning conditions such that jG0j = O(2j'j) . We build on the top
of the construction given in [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ] for model checking CaRet formulas. The main
di erences are that we apply the construction to the negation of the formula
' instead of to the formula ' directly, and introduce fresh nodes to ensure the
correct semantics of the interaction of the two players. Negating the formula is
needed to use correctly the construction from [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ]. We recall that this
construction, such as all the constructions which are tableau based, are nondeterministic
and therefore cannot be directly combined with a game graph in a cross product.
Starting from the negated formula, we can apply the same tableau construction
but now interpreting the nondeterminism as universality, and thus dualizing also
the winning conditions we obtain a game graph which is equivalent to the
starting one with respect to the considered decision problem. The resulting winning
condition is the conjunction of a Buchi condition with a generalized co-Buchi
one, that can be simpli ed to a single pair Rabin condition and thus to an
equivalent parity condition.
      </p>
      <p>
        Also, notice that both G and ' can de ne context-free languages, and
problems such as inclusion and emptiness of intersection are undecidable for
contextfree languages [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ]. Therefore, translating ' into an automaton and then
intersecting it with the recursive game graph does not seem feasible.
      </p>
      <p>
        The second step consists of constructing from the parity game hG0; colori a
two-way alternating parity tree automaton Awin similarly to what is done in [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ].
The resulting automaton accepts a strategy tree i it corresponds to a winning
modular strategy.
      </p>
      <p>
        For the last step of our solution, we observe that by using [
        <xref ref-type="bibr" rid="ref11">11</xref>
        ] we can convert
Awin to a one-way nondeterministic tree automaton and take its intersection
with the Astrat that is a tree automaton accepting strategy trees. Thus, we get a
one-way nondeterministic automaton A0 which accepts a tree i it corresponds
to a winning strategy tree. Checking the emptiness of this automaton takes
polynomial time in the number of states and exponential in the number of colors
in the parity condition [
        <xref ref-type="bibr" rid="ref10">10</xref>
        ].
      </p>
      <p>Since the constructed recursive game graph G0 is doubly exponential in the
formula ' and linear in the recursive game graph G, color is constant and LTL
games are already 2ExpTime-hard, we get:
Theorem 1. Deciding modular CaRet games is 2ExpTime-complete.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <given-names>R.</given-names>
            <surname>Alur</surname>
          </string-name>
          ,
          <string-name>
            <given-names>K.</given-names>
            <surname>Etessami</surname>
          </string-name>
          , and
          <string-name>
            <given-names>P.</given-names>
            <surname>Madhusudan</surname>
          </string-name>
          .
          <article-title>A temporal logic of nested calls and returns</article-title>
          .
          <source>In Proc. of the 10th International Conference on Tools and Algorithms for the Construction and Analysis of Systems, TACAS'04, LNCS 2988</source>
          , pages
          <fpage>467</fpage>
          {
          <fpage>481</fpage>
          . Springer,
          <year>2004</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <given-names>R.</given-names>
            <surname>Alur</surname>
          </string-name>
          ,
          <string-name>
            <given-names>T.</given-names>
            <surname>Henzinger</surname>
          </string-name>
          , and
          <string-name>
            <given-names>O.</given-names>
            <surname>Kupferman</surname>
          </string-name>
          .
          <article-title>Alternating-time temporal logic</article-title>
          .
          <source>Journal of the ACM</source>
          ,
          <volume>49</volume>
          (
          <issue>5</issue>
          ):1{
          <fpage>42</fpage>
          ,
          <year>2002</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <given-names>R.</given-names>
            <surname>Alur</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S. La</given-names>
            <surname>Torre</surname>
          </string-name>
          , and
          <string-name>
            <given-names>P.</given-names>
            <surname>Madhusudan</surname>
          </string-name>
          .
          <article-title>Modular strategies for in nite games on recursive graphs</article-title>
          .
          <source>In Proc. of the 15th International Conference on Computer Aided Veri cation, CAV'03, LNCS 2725</source>
          , pages
          <fpage>67</fpage>
          -
          <lpage>79</lpage>
          . Springer,
          <year>2003</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <given-names>R.</given-names>
            <surname>Alur</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S. La</given-names>
            <surname>Torre</surname>
          </string-name>
          , and
          <string-name>
            <given-names>P.</given-names>
            <surname>Madhusudan</surname>
          </string-name>
          .
          <article-title>Modular strategies for recursive game graphs</article-title>
          .
          <source>In Proc. 9th Intern. Conf. on Tools and Algorithms for the Construction and the Analysis of Systems, TACAS'03, LNCS 2619</source>
          , pages
          <fpage>363</fpage>
          {
          <fpage>378</fpage>
          . Springer,
          <year>2003</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <given-names>T.</given-names>
            <surname>Cachat</surname>
          </string-name>
          .
          <article-title>Symbolic strategy synthesis for games on pushdown graphs</article-title>
          .
          <source>In Automata, Languages and Programming, 29th Int'l Coll</source>
          .,
          <string-name>
            <surname>ICALP</surname>
          </string-name>
          , Malaga, Spain, July 8-
          <issue>13</issue>
          ,
          <year>2002</year>
          , Proceedings, LNCS
          <volume>2380</volume>
          , pages
          <fpage>704</fpage>
          {
          <fpage>715</fpage>
          . Springer.
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <given-names>E. A.</given-names>
            <surname>Emerson</surname>
          </string-name>
          .
          <article-title>Model checking and the mu-calculus</article-title>
          . In N. Immerman and P. Kolaitis, editors,
          <source>Proceedings of the DIMACS Symposium on Descriptive Complexity and Finite Models</source>
          , pages
          <volume>185</volume>
          {
          <fpage>214</fpage>
          . American Mathematical Society Press,
          <year>1997</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7.
          <string-name>
            <given-names>J. E.</given-names>
            <surname>Hopcroft</surname>
          </string-name>
          and
          <string-name>
            <given-names>J. D.</given-names>
            <surname>Ullman</surname>
          </string-name>
          . Introduction to Automata Theory, Languages, and
          <string-name>
            <surname>Computation</surname>
          </string-name>
          . Addison-Wesley,
          <year>1979</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          8.
          <string-name>
            <given-names>O.</given-names>
            <surname>Kupferman</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Vardi</surname>
          </string-name>
          , and
          <string-name>
            <given-names>P.</given-names>
            <surname>Wolper</surname>
          </string-name>
          .
          <article-title>Module checking</article-title>
          .
          <source>Information and Computation</source>
          ,
          <volume>164</volume>
          (
          <issue>2</issue>
          ):
          <volume>322</volume>
          {
          <fpage>344</fpage>
          ,
          <year>2001</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          9. W. Thomas.
          <article-title>Languages, automata, and logic</article-title>
          .
          <source>Handbook of Formal Language Theory</source>
          , III:
          <volume>389</volume>
          {
          <fpage>455</fpage>
          ,
          <year>1997</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          10. W. Thomas.
          <article-title>In nite games and veri cation</article-title>
          .
          <source>In Proceedings of the International Conference on Computer Aided Veri cation CAV'02, LNCS 2404</source>
          , pages
          <fpage>58</fpage>
          {
          <fpage>64</fpage>
          . Springer,
          <year>2002</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          11.
          <string-name>
            <given-names>M.</given-names>
            <surname>Vardi</surname>
          </string-name>
          .
          <article-title>Reasoning about the past with two-way automata</article-title>
          .
          <source>In Proc. 14th Intern. Coll. on Automata, Languages, and Programming</source>
          ,
          <source>ICALP'98, LNCS 1443</source>
          , pages
          <fpage>628</fpage>
          {
          <fpage>641</fpage>
          . Springer,
          <year>1998</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          12. I. Walukiewicz.
          <article-title>Pushdown processes: Games and model-checking</article-title>
          .
          <source>Information and Computation</source>
          ,
          <volume>164</volume>
          (
          <issue>2</issue>
          ):
          <volume>234</volume>
          {
          <fpage>263</fpage>
          ,
          <year>January 2001</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          13.
          <article-title>Giochi su Gra Pushdown rispetto a Strategie Modulari</article-title>
          . http://www.dia.unisa.it/professori/latorre/ilaDec/tesi2011.pdf,
          <year>2011</year>
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>