Higher-Order Timed Automata and Tail Recursion
Abstract
Timed Automata (TA) are a popular formalism to model systems in dense linear time. However, due to their finite state-space, they can only model systems with a finitary logical behavior. There are extensions to e.g., timed pushdown systems and timed recursive state machines. Higher-Order Recursion Schemes (HORS) are another popular model for infinite-state, non-regular systems, naturally stratified by their type-theoretic order. We recently introduced Real-Time Recursion schemes as an approximation of HORS to real-time systems.
This paper updates Real-Time Recursion Schemes into Higher-Order Timed Automata, a formalism that defines a tree-shaped timed automaton, which is more suitable to model actual systems. We show that the model-checking problem against the timed version of the modal mu-calculus exhibits the expected complexity bounds, i.e., an increase by one exponential towards the untimed version. We also show that, in the presence of tail recursion, half an exponential can be recovered, mirroring similar gains in the untimed setting. We also give a matching lower bound for the special case of order-1 HORTA. We conjecture that this can be generalized for all orders.
Keywords and phrases:
Timed Automata, Higher-Order Recursion Schemes, Tree Automata, Tail Recursion2012 ACM Subject Classification:
Theory of computation Timed and hybrid models ; Theory of computation Tree languages ; Theory of computation Automata over infinite objectsEditors:
Thierry Vidal and Przemysław Andrzej WałęgaSeries and Publisher:
Leibniz International Proceedings in Informatics, Schloss Dagstuhl – Leibniz-Zentrum für Informatik
1 Introduction
Verification of real-time systems plays an ever important role, as more and more aspects of life become computerized. Often, systems are required to not only respond to certain input eventually, but within specific time bounds. For example, electronic stability control or anti-lock braking systems need to respond within fractions of a second.
Timed Automata (TA) [5] are a popular tool to model real-time systems [1, 16]. TA model time not in a discrete fashion, as used in e.g., CTL or the modal -calculus, but rather in a dense linear fashion. The well-known region abstraction allows us to recover finiteness by re-discretization of said dense linear time, which yields decidability (and PSPACE-completeness) of e.g., the model-checking problem for the temporal version of CTL, TCTL [5]. A less well-known real-time logic used in conjunction with timed automata is the timed -calculus () [17], for which model-checking is EXPTIME-complete.
There are several attempts to generalize the notion of timed automata beyond a finite state space, for example timed recursive state machines [7], recursive timed automata [22], or timed pushdown automata [8, 13]. Recently, we proposed Real-Time Recursion Schemes [3], an extension of the notion of timed automata to Higher-Order Recursion Schemes (HORS). HORS are a well-studied framework in the context of infinite-state verification [14, 18]. A HORS is a higher-order grammar that generates a tree, e.g., the syntax tree of a functional program. The question of HORS model-checking is to decide whether a given alternating parity tree-automaton (APT) accepts the tree generated by the HORS. This is known to be decidable for order- HORS in -EXPTIME [20, 19]. We showed in [3] that mixing HORS and real-time systems had the typical effect of increasing the complexity of the model-checking problem by one exponential as compared to the untimed base problem.
This paper extends the idea of Real-Time Recursion Schemes into a proper recursive grammar for timed automata called Higher-Order Timed Automata (HORTA), which makes the problem more natural and rather intuitive to handle. We show that the model-checking problem remains in -EXPTIME for the updated problem, which asks whether the timed transition system defined by a HORTA satisfies a given formula of the timed -calculus.
Moreover, we connect the new formalism to existing research in the area of tail recursion. Higher-order model-checking problems like the HORS model-checking problem often have high theoretical complexities, and passing to tail-recursive fragments can shave off half an exponential, not only for recursion schemes [9], but also for model-checking problems where the logic is higher-order [12, 11]. We confirm that these findings also hold for HORTA and the timed -calculus, i.e., that the model-checking problem becomes easier by half an exponential in the tail-recursive setting. We establish a matching lower bound which, for space considerations, is given for the order--case only.
The paper is structured as follows: in Sect. 2, we introduce APT, TA, the timed -calculus, HORS, and existing results regarding tail recursion. In Sect. 3 we define HORTA, in Sect. 4 we define the tail-recursive fragment of the HORTA model-checking problem. In Sect. 5, we establish upper bounds for the model-checking problem, and give a matching lower bound for the order- case in Sect. 6. We conclude in Sect. 7. Most proofs have been omitted due to space considerations.
2 Preliminaries
2.1 Trees and Automata
A tree is a finite, left-closed set , i.e., for all , we have and, moreover, if . A tree alphabet is a finite, nonempty set and a function indicating the arity of each symbol. We write for the set of symbols of arity in . A -tree is a pair of a tree and a labeling function , such that each has exactly successors. We often identify a tree with its labeling function.
Let be a set. is the set of positive Boolean expressions over , derived from the grammar with .
An alternating parity tree-automaton (APT) is a where is a finite, nonempty set of states, is a tree alphabet containing a special nullary symbol , is the transition function with and being the maximal arity that occurs in . We write for if . Finally, is the starting state and is the priority function. The size of an APT is the number of its states.
A run of an APT on some -tree (for matching ) is a parity game between and , called the acceptance game. It has positions from where is the maximal arity in . Its starting position is . In a position of the form , the unique successor is . Positions of the forms and have two successors, namely and . A position of the form has successors , a position of the form or has no successors. Positions of the forms and and belong to , all other positions belong to . Finally, the priorities of the game are ; for all other positions we have . accepts a tree if wins . In the following, we assume APT to have designated states from which all, resp. no trees are accepted.
2.2 Higher-Order Recursion Schemes
Instead of the classical definition of Higher-Order Recursion Schemes (HORS, cf. e.g., [18]), we use a version going back to Damm [14] and re-introduced by Walukiewicz and Salvati [21], using the -calculus as syntax.
Types and Terms.
The set of types is defined inductively via where is the type of trees, is the type of functions that consume a tree and yield a tree, etc. We write for the type with many copies of . The order of a type is defined via and .
Let be a tree alphabet. Each of arity is a tree constructor of type . Let be a set of typed variables, be a set of typed Y variables. Lower case letters denote tree constructors, lower case letters denote variables, upper case letters denote Y variables. If necessary, , indicates the type of a variable.
Given , the set of terms is defined inductively: a tree constructor of type is a term of type , a lambda variable and a Y variable are terms of type . Given and a term of type , is a term of type . Given terms of type and , resp., is a term of type . If is a Y variable and is a term of type , then is a term of type .
denotes capture-avoiding substitution of for all free occurrences of in , and similarly for , assuming that the types match. Each variable may also be bound at most once in a term. Hence, for closed terms there is a function that maps each variable to , defined as if the unique binding of is . The order of a term is that of the highest order of any of its subterms, its size the number of its distinct subterms.
Semantics.
Besides -conversion, i.e., variable renaming, the calculus has -reduction and -reduction. -reduction reduces , where and have the same type, to . -reduction reduces to and to . The reflexive transitive closure of is . Since both -reduction and -reduction maintain the type of a term, so does , and this relation is confluent. A closed term of type is in weak head normal form if it is of the form . Not every term reduces to a head normal form.
Let be a tree signature and let be a new nullary symbol, i.e, of type . We define the Böhm tree of a closed term of type as follows: If does not reduce via to a weak head normal form, then , i.e., the tree has just one node. Otherwise, let be a weak head normal form of . The root of is labeled by , and its successors are, in order, the roots of . Due to confluence, this definition is sound.
The HORS model-checking problem (defined via terms) is the following: Given a closed term of type over and an APT with alphabet , does accept ? For terms of order , this is known to be a -EXPTIME complete problem [20].
2.3 Timed Automata
Let be a set of -valued variables, called clocks. is the set of clock constraints over , defined as conjunctive formulas over and for and , where . Clock constraints are denoted by etc.
A clock evaluation is a mapping ; it satisfies a clock constraint as follows: (i) always, (ii) iff and (iii) iff and . For a clock evaluation and , we write for the clock evaluation defined via for all . For , is the clock evaluation defined via if and if .
Let be a finite set of propositions. A timed automaton over clocks in and with propositions in is an where (i) is the set of locations of the timed automaton, including the initial location , (ii) is a finite set of clocks, (iii) assigns a clock constraint called an invariant to each location, (iv) is a finite set of transitions; we write for . In such a transition, is the guard and are the resets of the transition. Finally, (v) labels each location with the propositions valid there. The index of a timed automaton is the largest constant that occurs in its guards or invariants. Its size is defined as
due to the coding of the constants in clock constraints in binary. A TA defines a timed Transition System (tTS), to be defined in more general fashion in Sect. 3.
2.4 The Timed -Calculus
We define the timed modal -calculus () following [17]. Let be a set of clocks and let disjoint from be a set of specification clocks. Let be a set of propositions and let be a set of fixpoint variables. A formula of is one derived from the following grammar:
where and . Moreover, every variable must be bound exactly once and occur under an even number of negations in or , a standard convention for the modal -calculus. This induces, for each formula , a function where is the unique with or a subformula of . Moreover, we assume w.l.o.g. that every formula is guarded in the sense that, on the path from or to in the syntax tree of the formula, there is an instance of or . Analogously to the ordinary -calculus [10], every formula can be converted into an equivalent guarded one, potentially at the cost of exponential blowup111This blowup can be avoided at the cost of extra complexity, so we decide to simply stipulate guardedness for the sake of simplicity..
resets the specification clock z to . Hence, patterns like serve to test for elapsed time. The intuition for is that of a temporal next operator: it is satisfied if is true after a sequence of a delay, a discrete transition, and another delay, and is true all the way before. The operator is the dual of it, i.e., a temporal next with universal quantification over delays and transitions.
Let be a tTS, let be a variable assignment. The semantics of a formula is defined inductively via
with
and where is defined as
Here, the temporal next relation is defined as the composition of a delay, a discrete transition, and another delay. The clause that all states after the discrete transition need to satisfy is standard to cope with the fact that there might not be a smallest delay that makes true. Standard patterns in temporal logic, e.g., , which says that there is a path on which holds until holds, and that holds after time elapsed between and time units, can be expressed as e.g., .
The model-checking problem for is then to decide, given a timed automaton and a formula , whether where is the tTS defined by the timed automaton.
Proposition 1 ([2]).
The model-checking problem for is EXPTIME-complete.
2.5 Tail Recursion
Bounded-Alternation Parity Automata.
Let be partitioned into . Let be an APT such that is partitioned into sets for some . Let for some and let . We say that is branching at and if with or with and . It is universal at and if with both , or with and .
is called a bounded-alternation APT (baAPT) if it satisfies the following conditions:
-
1.
is partitioned into sets as per above.
-
2.
For each , each is labeled as either branching or universal. is not labeled.
-
3.
If is branching, then for each and for each , is branching at and . If is universal, then for each and for each , is universal at and .
-
4.
For each and , we have that .
-
5.
For each and , we have that .
The intuition here is as follows: The acceptance problem of a baAPT in which each state is branching or in which each state is universal can be reduced to a one-player game. The acceptance problem for such a baAPT with empty set is a bounded-alternation game. For general baAPT, the reduction to a bounded-alternation game is still possible if offending states are in a set of lower index and there is an a priori bound on the number of times a play passes through states in . The definition of tail-recursive HORS below yields this bound.
Tail-Recursion for Terms.
Let be a term of the calculus over , and . It is called tail-recursive if it satisfies the following conditions:
-
1.
For all subterms of of the form , the operand-side subterm has no free variables.
-
2.
For all subterms of the form with , none of the has free variables.
Note that there are no restrictions w.r.t. variables in .
Definition 2.
Let be partitioned into . Let be a closed tail-recursive term of type in the calculus over , and let be a baAPT. The problem of tail-recursive HORS model checking is to decide whether accepts .
Proposition 3 ([9]).
The problem of tail-recursive HORS model checking (i.e., against a baAPT) for terms of order is complete for -EXPSPACE.
3 Higher-Order Recursive Timed Automata
Timed automata define tTS, where each state is a pair of a location and a clock evaluation, the former which defines the propositonal labeling of the state. Transitions in tTS are either delay transitions that let time flow but keep the location component, or discrete transitions that keep time fixed, change the location, and reset clocks as indicated by the transition. The first kind of transition respects location invariants, while the second kind respects guards.
The idea for recursively defined tTS is that locations are not a fixed, finite set, but are the nodes of a tree generated by a term. The propositional labeling is derived from the labeling of the respective node, i.e., the tree constructor in question. Moreover, we define HORS for tTS in such a way that a tree constructor also carries information on the location invariant associated to it, and the guards and resets of its successors.
Definition 4.
Let be a finite set of clocks and let be a finite set of propositions. A timed tree alphabet (over and ) is a finite, nonempty set together with functions of domain where, for each ,
-
1.
indicates the arity of the symbol (as for standard tree alphabets),
-
2.
indicates the propositional labeling of a node labeled by the symbol,
-
3.
indicates the invariant of a node labeled by the symbol, and
-
4.
where indicates the guards and resets on the edges to the many successors of a node labeled by the symbol.
We write to denote the th element of the tuple .
Of course, a timed tree alphabet is a tree alphabet by ignoring the extra functions. A tree labeled by such a timed alphabet gives rise to a tTS as follows.
Definition 5.
Let be a timed tree alphabet over and and let be a -tree. The tTS defined by is where
-
, where and ,
-
the initial state is with f.a. ,
-
delay transitions keep the tree node but let time flow: for any and we have a transition if for all .
-
discrete transitions are derived from : for all , we have if and and ,
-
the propositional labeling feeds through the labeling of a tree node, i.e., ,
-
all states are labeled by the clock constraints that hold there, i.e., iff .
Note that is generally not a tree due to additivity of time: there are uncountably many paths from to for any s.t. the location invariant is satisfied. Other than this, the transition system is a tree though.
A term over a timed alphabet is called a Higher-Order Recursive Timed Automaton (HORTA). It generates a tTS via the tree generated from the term. Its order is that of the order of the underlying term. The index of a HORTA is the largest constant that occurs in its guards or invariants, its arity is the maximal arity of a symbol in its tre alphabet. The size of a HORTA is where defines the size of the underlying term.
The HORTA model-checking problem is then the following:
| given: | a HORTA and a formula of the timed -calculus |
|---|---|
| decide: | does hold? |
An example can be found in the appendix.
4 Tail Recursion
Let be a set of clocks, be a set of specification clocks and be a set of atomic propositions with a designated proposition. This proposition takes the role of a tree constructor from for tail-recursive terms, i.e., it signals tree nodes s.t. its subtrees are defined using terms without free variables. Hence, given a HORTA, this designated proposition partitions its tree alphabet into and . A HORTA is tail recursive if it is tail recursive as a HORS using this partition.
Now let be the set of fixpoint variables, partitioned into different sets. Each such variable plays the same role as a state in a baAPT, including being either branching, universal, or unrestricted, an being partitioned into different sets. Hence, the the annotations mark the variables as branching, universal, or unrestricted (superscript), and fix the respective set of the partition (subscript).
A formula has bounded-alternation if it can be derived from or in the following grammar:
where are in the respective sets of variables for all , and so is . A term can denote both and .
We give some intuition for this definition of bounded-alternation -formulas. A key point for tail-recursive behavior is limited boolean alternation, i.e. between and . The reason for that is that space-bounded algorithms need bounded boolean alternation, for (fully) alternating space is exponential time. baAPT achieve this by (partially) limiting the acceptance game to a game that is played by one player only, either or , with the other player only making token moves without associated freedom of decision. This is then captured in the intuition for bounded-alternation formulas in a syntactic way.
However, a better intuition is that a formula is alternation-free if it either does not contain and , or if it does not contain and , and no negations. An example of this is , or . Note that the polarity of the fixpoint does not matter here.
Limited alternation is then allowed by stratifying these formulas (via the indices in e.g., ) and allowing one-time use of forbidden operators at the price of dropping to a lower level in the hierarchy. Of course, formulas that contain no recursive definitions at all, e.g., those in are also safe. Hence, we obtain e.g.,
Since bounded-alternation formulas are to be evaluated over tTS defined by tail-recursive terms, there is an additional ingredient: In tail-recursive terms, subterms in operand position cannot contain free variables, whence the tree generated by such a subterm is completely independent of the rest of the term (excluding arguments of its own, of course). Moreover, we use special alphabet symbols (those in ) to signal that a term appears e.g., in operand position, or that it contains no free variables. Since the tree defined by such a term is independent of the rest of the tree, and since this can only repeat a polynomial amount of times (due to passing to a strict subterm), a model-checking procedure can solve the problem for the tree generated by the subterm first, and then return to the model-checking problem for the overall tree. Since this is such an independent subproblem, it is not harmful to “reset” the amount of boolean alternation possible in a formula/a baAPT. This is what happens in formulas of the form , which have nontrivial semantics only in states where is true (and, hence a tree constructor from was read, whence we are in such an independent subproblem). Note that it is not important that this generates a polynomial bound on the number of “alternation resets” in a run of a baAPT/the evaluation of a bounded-alternation formula. In general, there is no such bound. However, the model-checking problem will always only generate a polynomial stack of open subproblems due to alternation resets, and that suffices to yield the complexity bound.
The example in the appendix contains a simple example of a pair of a tail-recursive HORTA and a bounded-alternation formula.
5 Upper Bounds for Model-Checking
The goal of this section is to establish upper bounds for model checking of the trees generated by HORTA (tail recursive or not) against formulas. For the rest of the section, fix a tree alphabet , a term and a formula . Assume w.l.o.g. that is in negation normal form, i.e., that negations appear only in front of propositions or clock constraints.
5.1 The Region Abstraction
The region abstraction is a classical result (see e.g., [4] or [6], Def. 9.42), that maps the infinite transition system defined by a TA onto a finite transition system. While we work with tTS defined by HORTA, the key point is the same: the region abstraction uses an equivalence relation , for , on clock evaluations. Let be a set of clocks, specification or otherwise. Then is defined as follows: iff
is the fractional part of a real number. Clock evaluations are equivalent if, for each clock, (i) either both clocks have a value greater than , or (ii) they compare in the same way with respect to all integers . Moreover, the passage of time makes equivalent evaluations reach the next integral value first for the same clock. is an equivalence relation for any ; an equivalence class in is called a region. The equivalence class of under is (or just when is clear). We define the notion of a successor region:
Definition 6.
Let denote the region equivalence w.r.t. . For each region , the unique successor region is
-
if for all ,
-
iff there is such that , and for all , and .
The second term defines the successor region of to be the first region that is entered if time passes from any , and the first term makes the successor region well-defined in regions where all clocks have values greater than . We call this region the maximal region.
5.2 The Untiming Construction
Let be a set of clocks, let be a set of specification clocks. Let be the tTS generated by the HORTA . Note that .
Let be the propositions, resp. clock constraints mentioned by , and let be the specification clocks that mentions. Define an (untimed) -calculus formula via
where the for the and are fresh for each subformula. The semantics of the untimed modal operators are standard: and similarly for and the other modalities. Note that this definition is for untimed transition systems.
Let be that largest integer in any location invariant or guard in or a clock constraint in . Let denote from now on. Define a new (untimed) transition system with transitions and propositions in via via
-
,
-
,
-
,
-
.
Finally, given a variable assignment , define via .
Proposition 7 ([2]).
For all subformulas of , for all , and for all variable assignments we have iff .
Technically the proof in [2] is only for tTS defined via TA, not via HORTA. However, finiteness is not a crucial ingredient of the proof, and the region graph construction is very robust.
5.3 The Reduction
We have seen before that, on the region graph, the formula captures the semantics of . We define an APT alongside the logic of , but based on the syntax of itself. The reason for that is in the details of the translation of and , where we have to make sure that the regions are visited one by one, but must also avoid excessive pointless delays. The states of will be the product of the set of subformulas of and the set of regions in the region graph, plus some extra copies in some places. Transitions will follow the logic of subformulas in the first component, and pass through the regions as need be at formulas with real-time semantics, e.g., .
As a preparation, let be the tree alphabet used in . Define where all the new tree constructors are unary. Let be the integer used for the region graph. The longest sequence of delay transitions that can be taken before reaching the maximal region is less than . Let be the length of the longest path in the syntax tree of that contains no formulas of the form or , including passing through fixpoint variables. This number exists due to guardedness. Write for .
Obtain a term from by replacing each occurrence of a tree constructor by . i.e., by prepending it by a sequence of many copies of . These tree constructors give the yet-to-be-defined automaton enough space to (i) explicitly simulate delay transitions in the region graph by transitions reading in the tree, and (ii) allow easy handling of the logic of subformulas by transitions without advancing in the tree proper.
Let with the individual components defined as follows:
-
and
-
is defined inductively via the alternation index of a subformula of . Let be defined inductively for formulas of the form and as follows:
-
–
For formulas of the form set to the smallest even integer that is at least as big as for all subformulas of , but at least .
-
–
For formulas of the form set to the smallest odd integer that is at least as big as for all subformulas of , but at least .
Fo other , set to where is the first subformula of the form or on the path to the root in the syntax tree of . Then .
-
–
Finally, is defined (for the non-modalities) as follows:
The intuition here is that the acceptance game simply follows the logic of the subformula in question. The transitions for are
We omit the clauses for as they are dual to those for . The logic of a temporal next follows three phases: a delay, a discrete transition, and then another delay. First, if the last component of the state is , advances to successor regions of she so desires, and if this is possible. Then, if the last component is , the sequence of is consumed and an actual transition happens at , with an immediate check for satisfaction of the location invariant. Then, can delay further if she so desires. After she is done with this, the APT tracks .
Lemma 8.
Let be the tree generated by . Then accepts iff .
It is immediate that is tail-recursive if is. Moreover, one can show that is a baAPT if has bounded alternation.
Theorem 9.
The model-checking problem for order- HORTA against formulas is in -EXPTIME. For tail-recursive order--HORTA and bounded-alternation formulas, the problem is in -EXPSPACE.
Proof.
6 Matching Lower Bounds
We now show that the model-checking problem for bounded-alternation formulas against trees generated by order- HORTA is EXPSPACE-hard, via a reduction from the corridor tiling problem (see below). The general case of -EXPSPACE-hardness for model-checking order- HORTA is left for a future publication. The proof uses an idea from [12, 11].
6.1 Tiling Problems
A tiling system is a where is a finite set of tiles, are the horizontal and vertical matching relations, and are the initial, blank and final tiles. The corridor tiling problem consumes as input a tiling system and some encoded unarily. It asks whether there is a sequence , where each of the is a -word of length that satisfies the following:
-
,
-
for each , and , we have ,
-
for each and , we have , and
-
,
where denotes the th tile in . We call the th word in this solution the th row.
6.2 Encoding Rows
Let be a tiling system, and assume that is ordered, e.g., via for . W.l.o.g. let . A row candidate is a -word of length . Such a row candidate is a row if it satisfies the horizontal matching. Row candidates are also lexicographically ordered. Given a row candidate , we obtain the lexicographically next one by setting if there is s.t. , and if and for all , then .
We now encode rows and row candidates into trees generated by terms over a timed tree alphabet (i.e., HORTA), and, for each , define a formula that checks whether a given tile in a the row encoded by such a tree is . These formulas are mutually recursive, but the recursion is guarded by the designated proposition (cf. Sec. 4). The HORTA has one clock x. A node in the underlying tree encodes a row if, for each , iff . Here, is the tTS defined by the HORTA.
Let and let with arities indicated by superscripts. Let . Set and and , where is the designated proposition from the definition of tail recursion/bounded alternation. We write for , and for . Consider the terms
| init |
The first one defines a tree with as the root and then an infinite sequence of after that. The other consumes a tree and returns a tree that contains as the root, and then below it an infinite leftward sequence of that each contain as their right son. All rows and row candidates we work with are obtained from init via repeated application of next.
Now consider the mutually recursive formulas
The idea is that encoding a tile is signaled by a proposition (only for ), or it holds due to the recursive characterization of the lexicographic successor, applied recursively until the propositional base case is reached. This is done by traversing along (used to let time elapse in increments of ) or (from to ). Given a row candidate , let be the lexicographically th successor of modulo .
Lemma 11.
The tree generated by init encodes the initial row. Given a tree that encodes a row candidate , the tree generated by encodes .
6.3 The Reduction
Extend by and by with . Now consider the terms
and the formulas
Lemma 12.
holds on the tree generated by iff encodes a row, i.e., if the row candidate it encodes satisfies horizontal matching. holds on the tree generated by iff the rows encoded by and match vertically.
Finally, extend by and by with and and . Consider the terms
| tiling |
and the formulas
Lemma 13.
holds on the tree generated by iff encodes a final row. holds on the tree generated by if (i) encodes a row and (ii) and match vertically.
Finally, holds on the tree generated by tiling iff has a solution.
It is not hard to show that tiling is tail recursive, but not obvious that has bounded alternation.
Lemma 14.
The term tiling is tail recursive. The fomula is bounded-alternation and of polynomial size in .
This yields the following theorem.
Theorem 15.
The model-checking problem of tail-recursive HORTA against bounded-alternation formulas is EXPSPACE-hard.
Proof.
By Prop. 10, the corridor tiling problem is EXPSPACE-hard. By Lem. 13, an instance of the corridor tiling problem has a solution iff holds on the tree generated by tiling. Since by Lem. 14, the former is bounded-alternation and the latter is tail-recursive, and both are of polynomial size in , this constitutes a polynomial-time reduction.
7 Conclusion
We have refined the notion of Real-Time Recursion Schemes [3] into that of HORTA, and established matching upper bounds for the model-checking problem. We have also shown that the model-checking problem for HORTA becomes easier by half an exponential in the tail-recursive setting. The lower bound has been established for the order- case, but we conjecture that it can be extended to all orders. The corridor tiling problem needs to be replaced by an exponential version [15], and the encoding of a row needs to be lifted from a tree to a function that consumes a tree, and returns a tree etc., see e.g., [3, 9].
References
- [1] Yasmina Abdeddaïm, Eugene Asarin, and Oded Maler. Scheduling with timed automata. Theor. Comput. Sci., 354(2):272–300, 2006. doi:10.1016/J.TCS.2005.11.018.
- [2] Luca Aceto and François Laroussinie. Is your model checker on time? on the complexity of model checking for timed modal logics. J. Log. Algebraic Methods Program., 52-53:7–51, 2002. doi:10.1016/S1567-8326(02)00022-X.
- [3] Eric Alsmann and Florian Bruse. Real-time higher-order recursion schemes. In Pietro Sala, Michael Sioutis, and Fusheng Wang, editors, 31st International Symposium on Temporal Representation and Reasoning, TIME 2024, October 28-30, 2024, Montpellier, France, volume 318 of LIPIcs, pages 16:1–16:20. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2024. doi:10.4230/LIPICS.TIME.2024.16.
- [4] Rajeev Alur, Costas Courcoubetis, and David L. Dill. Model-checking in dense real-time. Information and Computation, 104(1):2–34, 1993. doi:10.1006/inco.1993.1024.
- [5] Rajeev Alur and David L. Dill. Automata for modeling real-time systems. In Mike Paterson, editor, Automata, Languages and Programming, 17th International Colloquium, ICALP90, Warwick University, England, UK, July 16-20, 1990, Proceedings, volume 443 of Lecture Notes in Computer Science, pages 322–335. Springer, 1990. doi:10.1007/BFB0032042.
- [6] C. Baier and J.-P. Katoen. Principles of model checking. MIT Press, 2008.
- [7] Massimo Benerecetti, Stefano Minopoli, and Adriano Peron. Analysis of timed recursive state machines. In 2010 17th International Symposium on Temporal Representation and Reasoning, pages 61–68, 2010. doi:10.1109/TIME.2010.10.
- [8] Ahmed Bouajjani, Rachid Echahed, and Riadh Robbana. On the automatic verification of systems with continuous variables and unbounded discrete data structures. In Hybrid Systems II, pages 64–85, Berlin, Heidelberg, 1995. Springer-Verlag.
- [9] Florian Bruse. Space-efficient model-checking of higher-order recursion schemes. In Shankaranarayanan Krishna, Sriram Sankaranarayanan, and Ashutosh Trivedi, editors, Verification, Model Checking, and Abstract Interpretation - 26th International Conference, VMCAI 2025, Denver, CO, USA, January 20-21, 2025, Proceedings, Part I, volume 15529 of Lecture Notes in Computer Science, pages 29–51. Springer, 2025. doi:10.1007/978-3-031-82700-6_2.
- [10] Florian Bruse, Oliver Friedmann, and Martin Lange. On guarded transformation in the modal -calculus. Log. J. IGPL, 23(2):194–216, 2015. doi:10.1093/JIGPAL/JZU030.
- [11] Florian Bruse and Martin Lange. The tail-recursive fragment of timed recursive CTL. Inf. Comput., 294:105084, 2023. doi:10.1016/J.IC.2023.105084.
- [12] Florian Bruse, Martin Lange, and Étienne Lozes. Space-efficient fragments of higher-order fixpoint logic. In Matthew Hague and Igor Potapov, editors, Reachability Problems - 11th International Workshop, RP 2017, London, UK, September 7-9, 2017, Proceedings, volume 10506 of Lecture Notes in Computer Science, pages 26–41. Springer, 2017. doi:10.1007/978-3-319-67089-8_3.
- [13] Lorenzo Clemente and Slawomir Lasota. Timed pushdown automata revisited. In 30th Annual ACM/IEEE Symposium on Logic in Computer Science, LICS 2015, Kyoto, Japan, July 6-10, 2015, pages 738–749. IEEE Computer Society, 2015. doi:10.1109/LICS.2015.73.
- [14] Werner Damm. The IO- and oi-hierarchies. Theor. Comput. Sci., 20:95–207, 1982. doi:10.1016/0304-3975(82)90009-3.
- [15] Stéphane Demri, Valentin Goranko, and Martin Lange. Temporal Logics in Computer Science: Finite-State Systems. Cambridge Tracts in Theoretical Computer Science. Cambridge University Press, 2016. doi:10.1017/CBO9781139236119.
- [16] Martijn Hendriks and Marcel Verhoef. Timed automata based analysis of embedded system architectures. In Proceedings 20th IEEE International Parallel & Distributed Processing Symposium, pages 8–pp. IEEE, 2006.
- [17] Thomas A. Henzinger, Xavier Nicollin, Joseph Sifakis, and Sergio Yovine. Symbolic model checking for real-time systems. Inf. Comput., 111(2):193–244, 1994. doi:10.1006/INCO.1994.1045.
- [18] Teodor Knapik, Damian Niwinski, and Pawel Urzyczyn. Higher-order pushdown trees are easy. In Mogens Nielsen and Uffe Engberg, editors, Foundations of Software Science and Computation Structures, 5th International Conference, FOSSACS 2002. Held as Part of the Joint European Conferences on Theory and Practice of Software, ETAPS 2002 Grenoble, France, April 8-12, 2002, Proceedings, volume 2303 of Lecture Notes in Computer Science, pages 205–222. Springer, 2002. doi:10.1007/3-540-45931-6_15.
- [19] Naoki Kobayashi and C.-H. Luke Ong. A type system equivalent to the modal mu-calculus model checking of higher-order recursion schemes. In Proceedings of the 24th Annual IEEE Symposium on Logic in Computer Science, LICS 2009, 11-14 August 2009, Los Angeles, CA, USA, pages 179–188. IEEE Computer Society, 2009. doi:10.1109/LICS.2009.29.
- [20] C.-H. Luke Ong. On model-checking trees generated by higher-order recursion schemes. In 21th IEEE Symposium on Logic in Computer Science (LICS 2006), 12-15 August 2006, Seattle, WA, USA, Proceedings, pages 81–90. IEEE Computer Society, 2006. doi:10.1109/LICS.2006.38.
- [21] Sylvain Salvati and Igor Walukiewicz. Krivine machines and higher-order schemes. Information and Compututation, 239:340–355, 2014. doi:10.1016/J.IC.2014.07.012.
- [22] Ashutosh Trivedi and Dominik Wojtczak. Recursive timed automata. In Ahmed Bouajjani and Wei-Ngan Chin, editors, Automated Technology for Verification and Analysis - 8th International Symposium, ATVA 2010, Singapore, September 21-24, 2010. Proceedings, volume 6252 of Lecture Notes in Computer Science, pages 306–324. Springer, 2010. doi:10.1007/978-3-642-15643-4_23.
- [23] P. van Emde Boas. The convenience of tilings. In A. Sorbi, editor, Complexity, Logic, and Recursion Theory, volume 187 of Lecture notes in pure and applied mathematics, pages 331–363. Marcel Dekker, Inc., 1997.
Appendix A Additional Material
A.1 An example of a HORTA
Consider the example of a delivery truck that waits at a station to leave for its deliveries. It can either leave, or stay at the station, for example because the driver’s mandatory break is not over. Every time the option is presented and the truck stays, however, it is loaded with an additional parcel that will need to be delivered during the next tour of the truck. Waiting at the station takes between and time units, and the driver has to wait for at least minutes. Delivering each parcel will take between or minutes. We ask: is it possible to complete the mandatory waiting time of minutes, but end up with a tour that can be completed in minutes or less?
We model this as follows: Let be a tree alphabet with arities as indicated. Add a unique proposition with .
Consider the term . Note that this term is tail recursive. It defines an infinite tree of the following form, which encodes the different ways waiting and delivering can play out:
We now convert the term into a HORTA by setting , and , .
The intuition here is that clock x is used to measure waiting times at the station and delivery times of the individual parcels, while clock z is used to measure the break, and the overall delivery time.
We can visualize the tree like this:
Here, location invariants are drawn next to the nodes, and pairs of transition guards and resets drawn next to the edges. The proposition appears next to the final nodes.
A formula that verifies the property above is . Note that the dependence between the waiting times and the overall delivery time cannot be incorporated into a finite-state TA due to the strictly nonregular behavior of loading additional parcels. Also note that this formula has bounded boolean alternation. Since the term that gives riseto the HORTA above is also tail recursive, a problem like this can be verified more efficiently, since the
In a real-time recursion scheme (cf. [3]), such a situation could also be modeled, but less naturally. Such a real-time recursion scheme generated trees where the tree constructors are simply annotated by plain intervals, which roughly signals how much time it takes to process such a constructor. No connection to individual clocks is made by the tree. Instead, the tree generated by such a real-time scheme is to be verified against a pair of a TA and an APT, with some synchronization between the two. This means that a significant part of the behavior of the system that is being modeled must be added to this automaton, and great care must be taken to synchronize the APT and he TA. Conversely, in a HORTA, the system being modeled manifests itself almost exclusively in the (recursive) TA, as can be seen above. The formulas that specify the desired property can then be comparatively simple. In the case above, a simple reachability property suffices.
