A Logic for Fresh Labelled Transition Systems
Abstract
We introduce a Hennessy-Milner logic with recursion for Fresh Labelled Transition Systems (FLTSs). These are nominal labelled transition systems which keep track of the history, i.e. of data values seen so far, and can model fresh data generation. In particular, FLTSs generalise the computations of Fresh-Register Automata, which in turn can be seen as a “regular” class of history-tracking automata operating on infinite input alphabets. The logic we introduce is a modal mu-calculus equipped with infinite disjunctions over arbitrary and fresh data values respectively, while its recursion is parameterised on vectors of data values. It can express a variety of properties, such as the existence of an infinite path of distinct data values, the absence of paths where values are repeated, or the existence of a finite path where some taint property is violated. We study the model-checking problem and its complexity via a reduction to parity games and, using nominal sets techniques, provide an exponential upper bound for it.
Keywords and phrases:
Nominal Transition Systems, Hennessy-Milner Logic, Modal Mu-Calculus, Register Automata, Nominal Sets, Parity GamesFunding:
Mohamed H. Bandukara: supported by EPSRC DTP EP/R513106/1.Copyright and License:
2012 ACM Subject Classification:
Theory of computation Automata over infinite objects ; Theory of computation Modal and temporal logicsEditors:
Stefano Guerrini and Barbara KönigSeries and Publisher:
Leibniz International Proceedings in Informatics, Schloss Dagstuhl – Leibniz-Zentrum für Informatik
1 Introduction
Nominal Labelled Transition Systems (LTSs) can capture computational scenarios which require unbounded sets of data values [5]. In the most elementary case, data values are just names, that is, atomic identifiers that can only be compared for equality. Nominal LTSs can be used, for example, for modelling mobile processes [38] and computation with variables [24, 21], and for verifying XML query languages [41]. A particularly popular class of nominal LTSs are the ones generated by computations of “regular” automata over infinite alphabets, such as register automata [24] and the (largely) equivalent nominal automata [5]. A register automaton is equipped with a finite set of states, and hence the nod to regularity, but also a finite set of registers where it can store data values and compare them with, and possibly update them with, data values from the input. This design allows register automata to capture languages over infinite alphabets even though their specification is finite.
Fresh-Register Automata (FRAs) [44] expand on this design by having the option of allowing the automaton to accept a name just if it is globally fresh, that is, it has not appeared so far in the input. FRAs can be used to capture computational models that use names and name generation, e.g. (finitary) -calculus processes [44, 3] and programs with mutable references or objects [35, 32]. They have been applied to program verification and system modelling, leading to verification tools [32, 20] and model learning techniques [6, 1]. Verification of FRAs has mainly focussed on bisimulation equivalence [44, 33, 34]. In this work we are interested in furthering formal verification for nominal computation, with an interest on FRAs and more generally history-dependent computation, in the direction of modal logics.
Hennessy-Milner Logic (HML) is a modal behavioural logic that captures branching-time properties of labelled transition systems. It was initially introduced in 1980 by Hennessy and Milner [22] as an alternative exposition of observational equivalence [8]. Observational equivalence has a focus on testing whether two systems can simulate each other in a step-by-step manner, whereas HML logic focuses on the expressiveness of a single system. In image-finite systems, two states are equivalent just if they satisfy the same HML formulas [23]. The extension of HML with recursion, called modal -calculus, was introduced by Kozen [29]. Here, we study a nominal extension thereof, where modalities are allowed to include names and where quantifications over some/all names and some/all fresh names are catered for. More specifically, our contributions include:
-
We introduce the notion of fresh LTS (FLTS), which extends nominal LTS with history dependence.
-
We introduce fresh HML with recursion, in short FHML, which allows us to express recursive branching-time properties involving names and name-freshness.
-
We study the model-checking problem for FHML formulas on FLTSs. This leads us to developing parity games for FHML and, through a series of reductions and using nominal techniques, devising a decision procedure for them.
-
We provide (exponential) upper bound calculations for FHML parity games and FHML model checking, in the latter case both on general FLTSs and on FRAs.
Although FRAs are our main target model, there are several advantages in defining and utilising FLTSs here. FLTS is a more general formalism, encompassing more scenarios besides FRAs (e.g. -calculus processes). Actions performed in an FLTS can be more general than those given in FRAs, and allow e.g. for several fresh names to be generated at once or extra mechanisms for manipulating names between transitions (permutations, duplications, etc.). Additionally, FLTSs offer high-level reasoning and abstract away name/register manipulations.
Related work.
HML for the -calculus was first examined in [31]. For properties involving paths of unbounded length, it is natural to examine recursive extensions thereof such as the modal -calculus and variants thereof [8]. The logic we introduced is based on the --calculus of Dam [12] and is related to the recent work on nominal -calculi of Klin and collaborators [26, 27, 15]. The --calculus [12] specifically targets -calculus processes, but the syntax used for recursion is the same as ours. The study of a history-dependent nominal -calculus in [15] is the work closest to ours. In a certain sense, our work continues that of loc cit. by operating on history-dependent LTSs (and FRAs) and accommodating a vectorial version of recursion. We show that this combination still yields a decidable model-checking problem, and also provide a more algorithmic view on model checking via parity games and produce complexity bounds.
In the area of nominal techniques, the modal logics for nominal LTSs by Parrow et al. [37] can subsume our logic but do not allow for decidable model checking. Logics for variants of register automata have been widely studied, e.g. [42, 14, 18]. The main focus of those works is on decidability, e.g. by restricting the number of registers allowed. No such restrictions are imposed on our logic, which is undecidable for satisfiability but our focus is instead on model checking. There have also been a series of works on logics related to the -calculus, e.g. [36, 28, 4]. Those works mainly study expressiveness and characterisation of variants of behavioural equivalence for -calculus processes. Other related works, such as [11, 7], expand on the modal -calculus and study model checking, and show it to be decidable for finitary -calculus processes.
2 Nominal sets and fresh labelled transition systems (FLTSs)
We start by briefly introducing the nominal sets framework, which will be the basis of much of this paper. Let us fix to be a countably infinite set of names (or data values) upon which nominal sets are built. A permutation on (i.e. a bijection ) is considered finite if is finite. For example, the identity permutation is finite ( for all ) and, for any , so is the permutation given by: , , and for all . We denote the set of all finite permutations in as . Given sequences of distinct names , we write for the finite permutation obtained by canonically extending the map .
Definition 1 ([19, 39]).
A nominal set is a set equipped with an action from , i.e. a function such that for all and :
-
.
A set of names supports an element if, for all , if fixes all elements of then . We stipulate that all elements of be finitely supported, i.e. for all there is some finite that supports . We write for the support of , i.e. the least set supporting . We say that is fresh for , and write , if .
By abuse of notation, we may identify with its carrier set . The action on a nominal set extends to products and subsets by and, for any , by . Additionally, if are nominal sets then so is , and the set of subsets of with finite support. Accordingly, given a relation and , we have . We call equivariant if , i.e. for all and , .
A notion in nominal sets we will be making extensive use of is that of an orbit.
Definition 2.
Let be a nominal set.
Two elements are nominally equivalent (denoted ) if for some . Note is an equivalence relation.
For each , we define its orbit to be its -equivalence class; whereas for each finite we let be its -orbit, i.e. its closure under permutations fixing :
Observe that . Moreover, for any with finite support we let:
-
the closure of be ;
-
the set of orbits of be .
We say that a nominal set is orbit-finite if is finite. If is orbit-finite, we let its register index be .
Note in particular that , for any , and . Given and any , we have and . Moreover, for any finitely supported we can see by inspection that:
and . Orbit-finiteness essentially captures the notion of a set being “finite up to permutation”, and it is central in the development of automata over nominal sets [5]. Some useful albeit more technical properties follow.
Lemma 3.
Let be nominal sets and . Then:
-
1.
and ;
-
2.
if has empty support then ;
-
3.
if are orbit-finite then where and , and is a constant that vanishes for .
We next define nominal labelled transition systems, where states and labels form nominal sets, which retain a possibly unbounded history component but are otherwise orbit-finite. For that purpose, orbit-finiteness is relaxed to accommodate histories of unbounded size. One part of our solution is to use configurations comprising pairs of a state and a history , with , where only the set of states is orbit-finite. The other part is to stipulate that the names appearing only in the history component of a configuration do not matter, in the following way. If a transition can be taken from a given configuration then:
-
weakening the configuration with some fresh name (i.e. fresh both for the source and target configurations), or
-
strengthening the configuration by removing a name appearing only in its history (and not in its state),
should not affect whether the transition can be taken or not. Note here the asymmetry in the freshness requirements for in weakening and strengthening: weakening requires that the name be completely fresh. This is in order to account for transitions performing fresh name generation. A transition freshly generating some name would be rendered invalid if we added to that transition’s initial history.
Definition 4.
A Fresh Nominal Labelled-Transition System (FLTS) is a tuple , where (writing for the finite powerset operator):
-
is a nominal set of states and is a nominal set of actions,
-
is an equivariant transition relation,
-
where is the nominal set of configurations;
and such that, for all and :
-
and ;
-
if then (weakening);
-
if then for some (strengthening).
is called fresh-orbit-finite if and are orbit-finite.
The notion of FLTS is fairly general and encompasses popular computational scenarios such as name-carrying processes (e.g. in the -calculus) and name-manipulating programs (e.g. Java programs with objects). At the automata level, one such formalism is that of fresh-register automata [44], which are the baseline paradigm in our study. As we are interested in behavioural properties, rather than language acceptance, we disregard initial and final states. The automata we define next operate on inputs where comes from a finite set of tags and is a name.
Definition 5.
An -Fresh-Register Automaton (-FRA) is a tuple , where is the number of registers in and:
-
is a finite set of states, and an availability function;
-
is a finite set of tags, and is the transition relation;
subject to the following conditions:
-
if then and ;
-
if or , then .
We shall write for .
We can see that the labels appearing in FRA transitions are of the form , where comes from a finite alphabet while is a variant of a register index . Assuming the automaton is at state and given , depending on the automaton will perform one of the following actions before moving to state :
-
: read the input , where is the name currently in register – note here that needs to be available at (i.e. );
-
: read any input so long is not currently stored in any register (i.e. it is locally fresh), and store in register ;
-
: read any input so long has not be seen before (i.e. it is globally fresh), and store in register .
Formally, the semantics of an FRA can be given in terms of its derived FLTS. The latter features states of the form where is a state and an assignment of values to available registers, i.e. the ones in . It is good to bear in mind that has empty support.
Definition 6.
Given an -FRA we define its FLTS by setting (and writing configurations simply as instead of ):
-
;
-
whenever there is such that, for some register :
-
–
and , while ; or
-
–
and , while ; or
-
–
and , while ;
where is the update of mapping to , and the operator performs domain restriction. In all cases, .
-
–
It is not difficult to verify that is indeed an FLTS. First, the sets and are closed under permutation, hence they are nominal sets. The definition of the transition relation does not single out any specific names and is therefore equivariant. Moreover, the names appearing in the history but not in the registers of a configuration are indistinguishable to the automaton, and that makes the conditions of strengthening and weakening true. Finally, in every transition, names in the final register assignment are sourced from those of the initial assignment and the label, and the history is correctly updated.
Lemma 7.
Given an -FRA , its FLTS is well defined.
We conclude this section with some motivating examples. These include examples of properties used in the literature and simple properties one may want to check in a verification scenario.
Example 8.
Let us assume a unique tag, e.g. , which we suppress for brevity. Consider the following properties (cf. [15]):
| All paths, finite and infinite, contain pairwise distinct names. | (#All) | ||
| There is an infinite path where all names are distinct. | (#Path) |
Thus, both properties specify paths of the forms or where, for each , there is no such that . Let us now examine the following basic FRAs.
The sets beneath each state indicate available registers. The paths (in the FLTS) of the first FRA will always have distinct names, so this FRA satisfies both #All and #Path. In fact, all three FRAs, from all possible configurations, satisfy #Path as the locally fresh transitions can be realised by names that are in fact globally fresh. Moreover:
-
the second FRA fails #All from both states: for any with and , ;
-
the third FRA satisfies #All everywhere: even if going from to may involve an old name (already in history), the remaining names are all going to be globally fresh.
Example 9.
Let us assume a set of tags which stand for , and respectively. Consider an application in which a new session is created each time the application is launched. This session can be used an arbitrary number of times, and then the session is terminated once the application is closed. We declare the following property for this application:
| There is an infinite path that repeatedly starts a fresh session, arbitrarily uses it | |||
| and then terminates it. |
Once the session is terminated, it cannot be resumed or reactivated, a new session must be created. A path for this will look as follows:
where, for each , there is no such that . Let us now consider this basic FRA below.
The FRA satisfies the property #SUT from . For any with , and :
Example 10.
In [44, 2] we showed that finitary -calculus processes can be encoded as FRAs. We briefly discuss an example of a -calculus process that satisfies property #All:
The creates a new name (or channel) , and then sends on the given channel . Following this, the process is repeated, or the process terminates. This ensures that on each path, all names are pairwise distinct, as the operator ensures that each channel that is created is fresh, hence there will be no repetitions. See Appendix B for a short presentation of the -calculus and its modelling in FLTSs.
3 Fresh HML with recursion (FHML)
In this section we present our logic FHML. We introduce the syntax and semantics of formulas, and show that the semantics is well defined. Recall the sets of names and tags, where the former is ranged over by etc. It will be useful to consider tags as having arbitrary finite arities, and not just unary as in FRAs, determined by a map . Let us also assume a set of value variables and a set of recursion variables. These are ranged over respectively by , etc. and , etc. Recursion variables have also arities, given by a map (note function overload). Here and in the sequel, when writing variable sequences we shall tacitly assume they contain distinct elements.
Definition 11.
The formulas of fresh HML with recursion (FHML) are:
where in and we have .
A variable can be free or bound, with binding performed with . As usual, we impose that each recursion variable appears within an even number of negation operations from its binder, implying that there must be at least one appearance of every such . Value variables are bound by , and . We say that a formula is firm if it has no free value variables, and closed if it has no free recursion variables. Note also that formulas form a nominal set: for each formula, its support is simply the set of names featuring in it. Finally, we can express tautology e.g. by .
The size of a formula is calculated in such a way that it be no smaller than the size of its support, and moreover, be linearly related to a concise machine representation of the formula (e.g. using de Bruijn indices [13]).
Definition 12.
The size for each formula is inductively defined as:
The semantics of formulas is given with respect to a given FLTS: a formula is mapped to a subset of its configurations. We shall use the following grammars for value and recursion variable substitutions respectively:
Thus, substitutions are sequences of mappings which can be on sequences of distinct value variables or single recursion variables. We may write for the union of the domains of all elements in , while in we assume that and, for each , . A formula acted on by a substitution is written and defined recursively by:
Similar conventions and definitions relate to recursion variable substitutions. In addition, is only ever going to be considered in cases where no variable capture be possible.
Definition 13.
Given an FLTS with , let us set and, for each , .
A -variable assignment is a finite partial map such that, for each , (). Given a -variable assignment , the semantics
of a firm formula with respect to is an element of given inductively by:
When is empty, we may simply write .
Note that the notation is shorthand for the function . More generally, the semantics is only defined on firm formulas.
For the semantics to be well-defined, we need to ensure that the required least fixpoints exist. From the Knaster-Tarski theorem, this can be done by showing that is a complete lattice and that is a monotone function. In particular, setting , we have , where order and least-upper-bounds in are given as expected:
for any and .
Lemma 14.
is a complete lattice and, for any , the function is monotone.
Finally, we show that for any FHML formula and -variable assignment , . To do this, we show that the function is equivariant, and then use the equivariance principle.
Lemma 15.
The function is equivariant. Therefore, for any formula and -variable assignment , .
A direct consequence of the latter result is that is finitely supported, and so is the function .
Theorem 16.
The semantics of Definition 13 is well defined. Its image is within the subset of of finitely-supported sets of configurations.
Proof.
For the former, we must show that least fixpoints exist for any . By definition, the function is in and by Lemma 14, is a complete lattice and is monotone. Thus, by the Knaster-Tarski theorem [43], the least fixpoint of any such exists. The proof of the latter follows from Lemma 15.
Remark 17 (Derived connectives).
We can define standard dual connectives for FHML as:
and write for . The semantics of the above can be derived from Definition 13 as expected. For instance: .
In the same vein,
we show below that fresh selection is its self-dual:
.
As in [19, 39], we can show that can be taken as meaning “for any fresh , holds” or “there is some fresh such that holds”.
Lemma 18.
For any and configuration ,
| (1) | |||
| (2) |
Therefore, we have .
Proof.
We note that (1) is a restatement of the definition of the semantics for . For (2) it suffices to show the left-to-right inclusion, as the other one follows from there always being some . For any :
The final claim then follows using (1) and (2).
Remark 19 (Comparison with logics of Dam [12] and Klin et al. [27, 15]).
The --calculus is a recursive modal logic for -calculus, accompanied with a proof system that is sound and complete for finitary processes [12].
Its connectives are very similar to ours and, in fact, our syntax for the recursive connectives is taken from loc cit. Being a logic specifically for the -calculus, it employs connectives such as free/bound input and output, in addition to modal connectives that specify the communication channel. Bound I/O in particular makes fresh-name quantification redundant.
The -calculi with atoms of [27, 15] are probably the closest to our logic. While those logics only feature recursion variables of nullary arities, the vectorial version studied in [27] can capture scenarios where non-zero arities are needed. The history-dependent logic of [15] captures freshness with this connective and corresponding semantics (in our terminology):
The analogy is not fully exact as our semantics is over history-dependent LTSs, while in loc cit. on nominal LTSs. In fact, the approaches are incomparable: fresh-orbit-finite LTSs (where model checking is decidable) are more general than the orbit-finite LTSs of [15], but our logic is less general than theirs. Using , we can define fresh quantification:
where is an enumeration of all (free) values in . But one can be even more expressive. E.g. the following formula stipulates that there are exactly two names in the current history:
We find this added expressivity not necessary for specifying FLTSs built e.g. from FRAs, as the exact size of the history is in general not accessible. Another property expressible with the fresh-name connective is (we thank the anonymous reviewer for providing this):
| Every next transition is on a fresh name. | (#AllNext) |
Assuming and suppressing labels, this can be expressed by . One may wish to use #AllNext to specify e.g. a name generator that produces fresh names independently of its current history (for a given history , #AllNext can be expressed by simply enumerating the names in ). Being able to express #AllNext, say by a formula , would again allow us to pry too invasively into the history. For example, the formula
stipulates that #AllNext holds and there are exactly two names in the history.
Such history-counting properties seem beyond the reach of FHML.
Finally, the history-bounded parity games presented herein provide a simpler route to model checking than the history-bounding construction in [15]. It is interesting to see if our approach can also be applied in the presence of the connective. We conjecture that it can, and that would render the model-checking problem decidable in that case as well.
By reduction from satisfiability for the -calculus with atoms [27] (i.e. even without histories), we know that the satisfiability problem is undecidable for FHML. In the next section we shall study instead the model-checking problem, show it is decidable and calculate an upper bound for its complexity. The following definition will be of use then.
Definition 20.
Given a FHML formula , its binding depth is given recursively by:
We conclude this section by revisiting Examples 8 and 9 and building formulas for them.
Example 21.
The property #All can be represented by the formula , where:
Note we omit tags as they are not used here. The subformula represents all finite paths that eventually accept an , that is, for each call of we accept any name and either we repeat or, in case , we stop. Similarly, represents all finite paths where eventually, some is repeated, that is, for each call of we accept any name and either we repeat , or is eventually accepted again (using ). Thus, represents all paths such that no name is ever repeated. Note that, by negation elimination, can be written as: .
Additionally, the property #Path can be represented by the formula:
The formula states that the recursive property always holds, where property states that we select a fresh name , and perform an action where we can then repeat property .
Example 22.
Let us consider Example 9, where we start, repeatedly use, and then terminate a session that cannot be resumed or reactivated. This can be represented by:
where stand for start, use and terminate respectively. We begin by entering the recursive -variable , where each time we enter , we select a fresh session and perform the action . From here, we enter the -variable where each time we enter, we repeatedly perform the action and eventually perform the action . Once has been terminated, we repeat the process by re-entering the -variable , starting some new session . Note that the use of the -variable ensures that the session will eventually terminate, and the use of the -variable ensures that the property is never violated.
4 Parity games and model checking
Given an FLTS , a configuration in and a firm closed formula , the model-checking problem asks whether . To solve this problem, in this section we introduce parity games that capture satisfiability of formulas in given configurations. To establish this connection it will be useful to consider formulas which may not be closed. We start off with a general definition of parity games in nominal sets. These are essentially atomic parity games [27] though, in contrast to loc. cit., here we use them for games with bounded histories.
Definition 23.
A (nominal) parity game is a tuple where is a directed graph, with vertices called positions and edges called moves, is a partitioning of positions into Attacker and Defender ones respectively, and is a ranking function for some maximum rank .
In addition, is a finitely supported subset of some nominal set and, for all and , if then:
-
if then (for ), and ;
-
if then .
Given a game , we may write for its set of positions . Intuitively, the nominal conditions in Definition 23 say that the game seen from two nominally equivalent positions is the same up to permutation. Note that is not equivariant in general, and its support is the support of .
Starting from a root position , a play is a path within , i.e. a finite or infinite sequence such that for each . A play is complete if it ends in a leaf. Defender (Attacker) wins a complete play if the last position in it belongs to Attacker (resp. Defender). Defender (Attacker) wins an infinite play if the highest position rank in it is even (resp. odd). We say that is a winning position for Defender (or Defender wins from ) if there is a partial function (called a strategy) such that Defender wins every complete or infinite play such that for each we have .
The development of parity games for FHML follows parity games for the -calculus, cf. [16]. We start by considering the negation-free fragment of our logic. In the sequel, we shall consider the derived connectives of Remark 17, along with inequality , as primitive (and exclude negation).
Definition 24.
A formula is called negation-free if it contains no negations. For each formula , we write for its negation-free variant. This can be constructed by induction using standard duality rules for pushing negation inside boolean, modal and recursion constructors, along with the rules: .
Lemma 25.
For any formula , is bounded by , where is the number of negations in .
For the remainder of this section, and unless specified otherwise, any FHML formulas used are going to be assumed to be firm and negation-free.
We shall make use of the (recursion) alternation depth of formulas. At this point it is important that the formulas we examine have a unique specification for each of their bound variables. More specifically, for any formula we stipulate that:
-
the bound and free recursion variables of be disjoint;
-
if are subformulas of then .
Note that these conditions are not unusual (cf. [26]). They are not restricting our logic either as any formula has an -equivalent one in the form above. At the same time, they allow us to match bound recursion variables with their binding subformulas.
For value variables, on the other hand, we simply disallow a binder on a variable to be within the scope of another binder on .
Definition 26 ([9, 17]).
Let be a FHML formula.
We define the dependency order on bound variables of as the smallest partial order such that if occurs free in some such that appears in (for some ).
The alternation depth of a
bound variable in is defined as the maximal length of a chain such that:
-
if is a -variable, each is a -variable if is odd, and a -variable otherwise;
-
if is a -variable, each is a -variables if is odd, and a -variable otherwise.
The alternation depth of a formula (denoted adepth()) is the maximum alternation depth of variables bound in , or zero if there are no fixpoints.
Parity games for FHML have positions of the form , with:
-
being the current configuration that is examined;
-
being a -variable assignment;
-
being the current formula.
We define games with respect to a root position corresponding to the model-checking problem we aim to decide. The positions and moves are given inductively using game rules.
Definition 27.
Let be a firm negation-free FHML formula, a -variable assignment containing the free recursion variables of , an FLTS and a configuration in . The game has root position and game rules:
-
belongs to Attacker, whereas to Defender;
-
belongs to Defender, whereas to Attacker;
-
belongs to Attacker if , and to Defender otherwise;
-
, if , belongs to Defender if , and to Attacker if ;
-
, , belongs to Defender if , and to Attacker if ;
-
, , belongs to Defender if , and to Attacker if ;
-
, belongs to either;
-
, , belongs to either.
The rank of a position with formula is given by :
In the case when is closed, we denote the game simply by .
Note that the formulas appearing inside positions are firm and negation-free (as is by assumption).
Later in this section it will be important to count the orbits of a history-bounded version of the parity game of Definition 27. To that effect, it is useful to the formulas appearing in the game, in terms of subformulas of and substitutions. This is achieved by the following notion of formula closure.
Definition 28.
Given a FHML formula , we define its closure to be the smallest set of triples such that and:
-
if , with , then ;
-
if , with , then ;
-
if , with , then , for all ;
-
if then , for all ;
-
if , with , then , for all .
We write .
The following lemma shows that the formulas appearing in the game can be traced back to the closure. It moreover provides some bounds on their orbits and supports.
Lemma 29.
Given a closed formula , an FLTS and configuration :
-
1.
for all positions in we have that ;
-
2.
is bounded by ;
-
3.
for all , .
We proceed to showing the correspondence between the semantics of an FHML formula and its corresponding parity game.
Theorem 30.
Given a FHML formula , -variable assignment , FLTS and from , we have iff Defender wins from in .
We have thus reduced model checking of formulas to winning in parity games. At this stage, we can restrict our attention to closed (firm negation-free) formulas . The next step is deciding winning regions of our parity games. The latter requires the games to be finite, whereas ours are not so. We therefore reduce our parity games to equivalent finite ones. For this to be possible, we restrict our attention to FLTSs that are fresh-orbit-finite.
For brevity, in the remainder of this section we shall say that is a setup of grade if:
-
is a fresh-orbit-finite FLTS with set of states , and ;
-
is a closed (firm negation-free) FHML formula;
-
.
Given a setup of grade , we first present a version of with bounded histories. The idea is to restrict the size of the history to the maximum number of names that are available to the formula and the states of the FLTS, and one extra to represent a fresh name. This amounts to a bound of names. When a new name is added and the size of the history is greater than , then names that are in the history but no longer present in the formula are forgotten. Each position in this game is a tuple with .
Definition 31.
Let be a setup of grade . The history-bounded game has root position , for some , and game rules as in Definition 27, apart from the rule for modal connectives:
-
, if and with , played by Defender if , and by Attacker if ;
while the ranking function is the same as in Definition 27. The well-bounding relation is given as follows. We let if and:
-
if then ,
-
else and .
We note that, though the positions in the unbounded game have their histories trimmed at modal operators, they remain FLTS configurations, i.e. for each we have . We next show that we can decide winning a parity game by examining its equivalent history-bounded game . To do this, we are going to build a bisimulation-like relation between and . Since the positions in the two games can have name-mismatches, but essentially do “the same” transitions, it is useful to introduce a notion of bisimilation up to renaming. Note we use relation composition: .
Definition 32.
Given parity games , we call a relation a bisimulation if for all :
-
has the same rank and belongs to the same player as ;
-
for each , there exist some such that ;
-
for each , there exist some such that .
We say that and are bisimilar (denoted )
if there is a bisimulation such that .
A bisimulation up to nominal equivalence (nom-bisimulation) is defined to be a relation with the same properties as above, apart from the requirement in the last two bullet points being instead that .
We say that and are nom-bisimilar (denoted )
if there is a nom-bisimulation such that .
In the following two lemmas, we let be positions in games respectively.
Lemma 33.
If then .
Proof.
Let be a nom-bisimulation. We show that is a bisimulation. Suppose , i.e. () and , and let . We have and, taking , , hence (and ). Then, by nom-bisimulation, (and ) and . Like before, setting , we obtain (and ). We observe that .
Lemma 34.
If then Defender wins from iff they win from .
We can relate games with their history-bounded counterparts by nom-bisimulations.
Definition 35.
Given a setup of grade , consider and . We define the history-bounding relation , by setting if , and .
Thus, a position in the unbounded game is related to itself if its history is small, i.e. it has no more than names. If is larger, then we relate to each where has names and in particular contains (as is a configuration) and all names from that appear in .
Lemma 36.
is a nom-bisimulation.
Combining Theorem 30 with Lemmas 36, 33, and 34, we can reduce FHML model-checking to deciding winning a history-bounded parity game. However, although the size of histories, and therefore of positions, is now bounded, the number of positions can still be infinite due to the names appearing in them. We can resolve this by grouping together positions that are “equivalent” up to permuting their names. Formally, this is done by considering games in which positions are orbits of ordinary positions.
Definition 37.
Given a parity game , we construct the orbits game as follows:
-
and (for );
-
;
-
for each , .
We can see that is well defined. In particular, is well defined due to the fact that whenever . Moreover, we can show that the relation is a bisimulation.
Lemma 38.
Given as above and , .
Taking stock of the game transformations defined above and the bisimulation relations between them, we can decide winning in a setup of finite grade.
Corollary 39.
Given a setup of grade , Defender wins in (from ) iff they win in from . Hence, it is decidable whether .
Proof.
The first part follows from Theorems 30, 36, 33, 34, and 38. The second part follows from Theorem 30 and the fact that is a finite game.
We next calculate upper bounds for the size of and the time needed to construct it. This allows us to give a complexity bound for model checking. Recall that we set . In the calculations below we prefer to distinguish between complexity due to and , so instead of we shall use the measure: . This can be seen as the nominal potential of .
In constructing the orbits game, we need to be able to check if two positions of are nominally equivalent. The way this is performed is the following: given , we try to build a permutation such that and, if successful, we extend to some so that, in addition, . The former part requires some oracle that is able to answer such questions for the given nominal set of states . We let a permutation oracle to be a function that, given , it returns a permutation such that , and , or if no such permutation exists (i.e. if ). We stipulate that the time complexity of is uniformly bounded by some for all .
Finally, given a configuration and a label , we shall require the next configurations under . While is completely determined from , the number of target states and the time complexity to retrieve them will depend on . We assume that both these quantities are bounded by the non-deterministic branching factor of .
Lemma 40.
Given a setup of grade and :
-
1.
the size of is bounded by .
-
2.
the time complexity of constructing is in .
Proof.
Due to lack of space, we only show 1 here.
By definition and Lemma 29(1), we know that .
Then, by Lemma 3(1,2) we have that .
For every , we have and , and so we have (what matters of is the size of ).
Using Lemma 3(3) and the fact that the largest support sizes in and are bounded by and (by Lemma 29(3)) respectively:
Theorem 41.
Let be a fresh-orbit-finite FLTS with orbits and set of states , with register index ,
and let be a FHML closed formula with maximum alternation depth .
Then, the time complexity of model checking on some configuration in is in
If then the bound can be simplified to .
Note above that if the formula has empty support, we get and . Let us now adapt the above calculations to FRAs. Given and an -FRA , we have:
-
, as two state-assignment pairs are equal up to permutation iff they share the same state;
-
, as there can be at most next configurations out of a configuration on a given label , and constructing a new bounded configuration incurs cost ;
-
, which is equality if there is a state using all registers;
-
, as it suffices to check that the two configurations contain the same state and, if so, construct a matching between their register assignments.
Therefore, the time complexity is in . Finally, the interested reader can find a similar calculation for model checking FHML formulas on finitary -calculus processes (under early semantics) in Appendix B.
5 Conclusion
We introduced a logic to capture properties of nominal transition systems with history dependence and fresh-name generation. We showed model checking is decidable and has exponential complexity. A next step would be to parameterise this complexity, e.g. by bounding the number of registers in the FLTS or the arities of recursion variables. We also feel that some of our calculations are overly generous, for example in using the bound on orbits of product nominal sets to calculate the number of orbits in the bounded parity game.
Implementation.
We implemented our algorithm for model-checking FHML on FRAs and tested it on simple examples, like the ones used in this paper for illustration, which are solved instantly.111https://github.com/HamzaBandukara/RAM-C. We leave full benchmarking and analysis of results to a future publication.
References
- [1] Fides Aarts, Paul Fiterau-Brostean, Harco Kuppens, and Frits Vaandrager. Learning register automata with fresh value generation. In ICTAC Proceedings, pages 165–183, 2015. doi:10.1007/978-3-319-25150-9_11.
- [2] M. H. Bandukara and Nikos Tzevelekos. On-the-fly bisimilarity checking for fresh-register automata. In Wei Dong and Jean-Pierre Talpin, editors, Dependable Software Engineering. Theories, Tools, and Applications - 8th International Symposium, SETTA 2022, Beijing, China, October 27-29, 2022, Proceedings, volume 13649 of Lecture Notes in Computer Science, pages 187–204. Springer, 2022. doi:10.1007/978-3-031-21213-0_12.
- [3] M. H. Bandukara and Nikos Tzevelekos. On-the-fly bisimulation equivalence checking for fresh-register automata. J. Syst. Archit., 145:103010, 2023. doi:10.1016/J.SYSARC.2023.103010.
- [4] Martin Berger, Kohei Honda, and Nobuko Yoshida. Completeness and logical full abstraction in modal logics for typed mobile processes. In Luca Aceto, Ivan Damgård, Leslie Ann Goldberg, Magnús M. Halldórsson, Anna Ingólfsdóttir, and Igor Walukiewicz, editors, Automata, Languages and Programming, 35th International Colloquium, ICALP 2008, Reykjavik, Iceland, July 7-11, 2008, Proceedings, Part II - Track B: Logic, Semantics, and Theory of Programming & Track C: Security and Cryptography Foundations, volume 5126 of Lecture Notes in Computer Science, pages 99–111. Springer, 2008. doi:10.1007/978-3-540-70583-3_9.
- [5] Mikolaj Bojanczyk, Bartek Klin, and Slawomir Lasota. Automata theory in nominal sets. Log. Methods Comput. Sci., 10(3), 2014. doi:10.2168/LMCS-10(3:4)2014.
- [6] Benedikt Bollig, Peter Habermehl, Martin Leucker, and Benjamin Monmege. A Robust Class of Data Languages and an Application to Learning. LMCS, 10(4), 2014. doi:10.2168/LMCS-10(4:19)2014.
- [7] Julian C. Bradfield and Perdita Stevens. Observational -calculus. Technical Report RS-99-5, BRICS (Basic Research in Computer Science), University of Aarhus, Denmark, 1999. URL: https://tidsskrift.dk/brics/article/view/21701.
- [8] Julian C. Bradfield and Colin Stirling. Modal mu-calculi. In Patrick Blackburn, J. F. A. K. van Benthem, and Frank Wolter, editors, Handbook of Modal Logic, volume 3 of Studies in logic and practical reasoning, pages 721–756. North-Holland, 2007. doi:10.1016/S1570-2464(07)80015-2.
- [9] Julian C. Bradfield and Igor Walukiewicz. The mu-calculus and model checking. In Edmund M. Clarke, Thomas A. Henzinger, Helmut Veith, and Roderick Bloem, editors, Handbook of Model Checking, pages 871–919. Springer, 2018. doi:10.1007/978-3-319-10575-8_26.
- [10] Cristian S. Calude, Sanjay Jain, Bakhadyr Khoussainov, Wei Li, and Frank Stephan. Deciding parity games in quasi-polynomial time. SIAM J. Comput., 51(2):17–152, 2022. doi:10.1137/17M1145288.
- [11] Mads Dam. Model checking mobile processes. Inf. Comput., 129(1):35–51, 1996. doi:10.1006/INCO.1996.0072.
- [12] Mads Dam. Proof systems for -calculus logics. In Ruy J. G. B. de Queiroz, editor, Logic for Concurrency and Synchronisation, volume 18 of Trends in Logic, pages 145–212. Kluwer, 2003. doi:10.1007/0-306-48088-3_4.
- [13] N.G de Bruijn. Lambda calculus notation with nameless dummies, a tool for automatic formula manipulation, with application to the church-rosser theorem. Indagationes Mathematicae (Proceedings), 75(5):381–392, 1972. doi:10.1016/1385-7258(72)90034-0.
- [14] Stéphane Demri and Ranko Lazic. LTL with the freeze quantifier and register automata. ACM Trans. Comput. Log., 10(3):16:1–16:30, 2009. doi:10.1145/1507244.1507246.
- [15] Clovis Eberhart and Bartek Klin. History-dependent nominal -calculus. In 34th Annual ACM/IEEE Symposium on Logic in Computer Science, LICS 2019, Vancouver, BC, Canada, June 24-27, 2019, pages 1–13. IEEE, 2019. doi:10.1109/LICS.2019.8785736.
- [16] E. Allen Emerson and Charanjit S. Jutla. Tree automata, mu-calculus and determinacy (extended abstract). In 32nd Annual Symposium on Foundations of Computer Science, San Juan, Puerto Rico, 1-4 October 1991, pages 368–377. IEEE Computer Society, 1991. doi:10.1109/SFCS.1991.185392.
- [17] E. Allen Emerson, Charanjit S. Jutla, and A. Prasad Sistla. On model checking for the -calculus and its fragments. Theor. Comput. Sci., 258(1-2):491–522, 2001. doi:10.1016/S0304-3975(00)00034-7.
- [18] Diego Figueira and Luc Segoufin. Future-looking logics on data words and trees. In Rastislav Královic and Damian Niwinski, editors, Mathematical Foundations of Computer Science 2009, 34th International Symposium, MFCS 2009, Novy Smokovec, High Tatras, Slovakia, August 24-28, 2009. Proceedings, volume 5734 of Lecture Notes in Computer Science, pages 331–343. Springer, 2009. doi:10.1007/978-3-642-03816-7_29.
- [19] Murdoch Gabbay and Andrew M. Pitts. A new approach to abstract syntax with variable binding. Formal Aspects Comput., 13(3-5):341–363, 2002. doi:10.1007/S001650200016.
- [20] Radu Grigore, Dino Distefano, Rasmus Lerchedahl Petersen, and Nikos Tzevelekos. Runtime verification based on register automata. In TACAS Proceedings, pages 260–276, 2013. doi:10.1007/978-3-642-36742-7_19.
- [21] Orna Grumberg, Orna Kupferman, and Sarai Sheinvald. Variable automata over infinite alphabets. In LATA Proceedings, pages 561–572, 2010. doi:10.1007/978-3-642-13089-2_47.
- [22] Matthew Hennessy and Robin Milner. On observing nondeterminism and concurrency. In J. W. de Bakker and Jan van Leeuwen, editors, Automata, Languages and Programming, 7th Colloquium, Noordweijkerhout, The Netherlands, July 14-18, 1980, Proceedings, volume 85 of Lecture Notes in Computer Science, pages 299–309. Springer, 1980. doi:10.1007/3-540-10003-2_79.
- [23] Matthew Hennessy and Robin Milner. Algebraic laws for nondeterminism and concurrency. J. ACM, 32(1):137–161, January 1985. doi:10.1145/2455.2460.
- [24] Michael Kaminski and Nissim Francez. Finite-memory automata. Theoretical Computer Science, 134(2):329–363, 1994. doi:10.1016/0304-3975(94)90242-9.
- [25] Victor Khomenko and Roland Meyer. Checking pi-calculus structural congruence is graph isomorphism complete. In Ninth International Conference on Application of Concurrency to System Design, ACSD 2009, Augsburg, Germany, 1-3 July 2009, pages 70–79. IEEE Computer Society, 2009. doi:10.1109/ACSD.2009.8.
- [26] Bartek Klin and Mateusz Lelyk. Modal mu-calculus with atoms. In Valentin Goranko and Mads Dam, editors, 26th EACSL Annual Conference on Computer Science Logic, CSL 2017, August 20-24, 2017, Stockholm, Sweden, volume 82 of LIPIcs, pages 30:1–30:21. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2017. doi:10.4230/LIPIcs.CSL.2017.30.
- [27] Bartek Klin and Mateusz Lelyk. Scalar and vectorial mu-calculus with atoms. Log. Methods Comput. Sci., 15(4), 2019. doi:10.23638/LMCS-15(4:5)2019.
- [28] Vasileios Koutavas and Matthew Hennessy. First-order reasoning for higher-order concurrency. Comput. Lang. Syst. Struct., 38(3):242–277, 2012. doi:10.1016/J.CL.2012.04.003.
- [29] Dexter Kozen. Results on the propositional -calculus. Theoretical Computer Science, 27(3):333–354, 1983. Special Issue Ninth International Colloquium on Automata, Languages and Programming (ICALP) Aarhus, Summer 1982. doi:10.1016/0304-3975(82)90125-6.
- [30] Robin Milner, Joachim Parrow, and David Walker. A calculus of mobile processes, I and II. Inf. Comput., 100(1), 1992. doi:10.1016/0890-5401(92)90008-4.
- [31] Robin Milner, Joachim Parrow, and David Walker. Modal logics for mobile processes. Theor. Comput. Sci., 114(1):149–171, 1993. doi:10.1016/0304-3975(93)90156-N.
- [32] Andrzej Murawski, Steven Ramsay, and Nikos Tzevelekos. A contextual equivalence checker for IMJ*. In ATVA proceedings, pages 234–240, 2015. doi:10.1007/978-3-319-24953-7_19.
- [33] Andrzej S. Murawski, Steven J. Ramsay, and Nikos Tzevelekos. Bisimilarity in fresh-register automata. In LICS Proceedings, pages 156–167, 2015. doi:10.1109/LICS.2015.24.
- [34] Andrzej S. Murawski, Steven J. Ramsay, and Nikos Tzevelekos. Polynomial-time equivalence testing for deterministic fresh-register automata. In MFCS Proceedings, 2018. doi:10.4230/LIPIcs.MFCS.2018.72.
- [35] Andrzej S. Murawski and Nikos Tzevelekos. Algorithmic nominal game semantics. In ESOP Proceedings, pages 419–438, 2011. doi:10.1007/978-3-642-19718-5_22.
- [36] Rocco De Nicola and Michele Loreti. Multiple-labelled transition systems for nominal calculi and their logics. Math. Struct. Comput. Sci., 18(1):107–143, 2008. doi:10.1017/S0960129507006585.
- [37] Joachim Parrow, Johannes Borgström, Lars-Henrik Eriksson, Ramunas Gutkovas, and Tjark Weber. Modal logics for nominal transition systems. Log. Methods Comput. Sci., 17(1), 2021. URL: https://lmcs.episciences.org/7137.
- [38] Marco Pistore. History-Dependent Automata. PhD thesis, Università di Pisa, 1999.
- [39] Andrew M. Pitts. Nominal logic, a first order theory of names and binding. Inf. Comput., 186(2):165–193, 2003. doi:10.1016/S0890-5401(03)00138-X.
- [40] Davide Sangiorgi and David Walker. The Pi-Calculus - a theory of mobile processes. Cambridge University Press, 2001. doi:10.1017/9781316134924.
- [41] Thomas Schwentick. Automata for XML—a survey. JCSS, 73(3):289–315, 2007. doi:10.1016/j.jcss.2006.10.003.
- [42] Luc Segoufin. Automata and logics for words and trees over an infinite alphabet. In Zoltán Ésik, editor, Computer Science Logic, 20th International Workshop, CSL 2006, 15th Annual Conference of the EACSL, Szeged, Hungary, September 25-29, 2006, Proceedings, volume 4207 of Lecture Notes in Computer Science, pages 41–57. Springer, 2006. doi:10.1007/11874683_3.
- [43] Alfred Tarski. A lattice-theoretical fixpoint theorem and its applications. Pacific Journal of Mathematics, 5(2):285–309, 1955. doi:10.2140/pjm.1955.5.285.
- [44] Nikos Tzevelekos. Fresh-register automata. In POPL Proceedings. ACM, 2011. doi:10.1145/1926385.1926420.
Appendix A Appendix
Definition 42.
Given for any , such that and are pointwise distinct, let us write and . We let be the permutation obtained by extending the mapping of to as follows:
Lemma 7. [Restated, see original statement.]
Given an -FRA , its FLTS is well defined.
Proof.
First, we must show that for any , then and . For the latter, it follows from the previous definition that . For the former, suppose this transition appears due to some , for any . For this, , thus we have that:
We next examine weakening and strengthening. Suppose that due to some for . For weakening, we show that for all , then due to as well. We have that and must be distinct (as by the previous point). If is of the form or , then this clearly holds as the history is not relevant to the transition. If is of the form then we note that is still fresh for and, therefore, the transition can be taken. Finally, for strengthening, we need to show that, for all , then for some due to . Here, since we are shrinking the history, the only thing to verify is that is a valid configuration, which it is as we stipulate that .
Lemma 36. [Restated, see original statement.]
is a nom-bisimulation.
Proof.
Let us write for .
Let us choose some . By definition, the rank and polarity of and are the same.
Let us introduce the following notation for economy (where ) : .
We next look at the possible moves.
We perform a case analysis on :
-
: neither nor can make a move.
-
: we have that and for . For any such , as the history does not change, if then for . Now suppose . As , it follows that , meaning for as required. Similar can be shown for .
-
the possible moves in are for all , hence each such move can be matched by some and we have that hence .
Conversely, the possible moves in are for . If , then as before this can be matched by with , . Otherwise, and this is the more interesting case, suppose . Then, we can select some , meaning and . This can be matched by with as required. -
: if , then can be matched by the move with as required. And similarly for each .
Suppose , and let for some . Note that . We do a case analysis on .-
–
If or , then this means is in both histories, or neither, so it suffices to again match with the move with , .
-
–
If , then we no longer have . Note that then by definition of . We pick and make the move . We have and , as required.
Conversely, suppose . We do case analysis on .
-
–
If or , then .
-
–
If , then let us choose the transition for some . Then, we have that and as required.
-
–
-
: in , the possible moves are for all such that . By definition, we know and . If , then this is matched by some move with and . Otherwise, we can see that . If , then this can be matched by some move with and . As , we have that such a exists and as required. If , then by the conditions of the FLTS, implies that with and thus completing the simulation in this step.
Conversely, let with . One of the following is the case:-
–
, then . This can be matched by the move with and .
-
–
and with . We note that and , and examine the case where :
If , the move can be matched by with and . Suppose that . By the well-bounding relation, as . Therefore, this can also be matched by with and .
-
–
-
: in , the only move is . As does not change and , then this can be matched by the only move in , i.e. with .
The remaining cases can be shown similarly to the ones above.
Theorem 41. [Restated, see original statement.]
Let be a fresh-orbit-finite FLTS with orbits and set of states , with register index ,
and let be a FHML closed formula with maximum alternation depth .
Then, the time complexity of model checking on some configuration in is in
If then the bound can be simplified to .
Proof.
To verify whether satisfies , we must check whether where is an empty -variable assignment. First, we set , which (by Lemma 25) will have size bounded by . From this, we can construct the orbits parity game of where , By Theorem 30, we have that if then defender has a winning strategy from . Using Lemma 36, the relation is a nom-bisimulation, and by Lemma 34 then defender wins in from iff they win in from . Similarly, using Lemma 38 and Corollary 39 then defender wins from from iff defender wins in from . Then, by Lemma 40, can be constructed in:
and has size:
The winning regions of can be calculated in time bounded by (cf. [10]):
And so, the final complexity is in:
Now, using and , we get:
and, as :
Finally, if then we obtain the required simplified bound.
Appendix B Model-checking for the -calculus
The -calculus is a paradigmatic process language for concurrent interactions involving name passing [30, 40]. The syntax of -calculus processes is defined by the following grammar:
where , etc. range over a finite set of variables; , etc. range over a countable set of process variables, while , etc. are names. The constructs and are binders (for ), and we use standard -equivalence convention. Process variables are used to allow recursion by means of definitions of the form where only contains free variables from . By abuse of notation, we may use for process variables as well as processes, and we define variable-capture-avoiding substitutions in the usual way. Let us call a -calculus process finitary if the processes it can reduce to are bounded in size up to structural congruence, where structural congruence is the least congruence relation satisfying the rules in Figure 1 (top). It is known that checking whether two processes are structurally congruent is GI-complete [25]. Let us write for the complexity of checking this for two processes of sizes bounded by .
We next show that the semantics of any given -calculus process can be induced by an FLTS. We focus on early semantics using the labels given by the following grammar:
The label corresponds to silent transitions, whereas corresponds to inputting name on the channel named . The last two sorts of label are for outputs: outputs name on channel , whereas outputs a fresh name on channel . We write for the set of names included in , and similarly we write for the names appearing in a process . It is convenient to have notation for bound/fresh names as well, setting and for any other . The LTS is produced by the rules in Figure 1 (bottom).
We proceed to the translation to FLTS, where each state will be of the form , where represents the process, and represents all names that have been seen by the process so far, and where .
Definition 43.
Given a -calculus process , we define its FLTS to initially contain the configuration and be generated according to the rule:
For any process , let us call the set of all processes that can reduce to up to structural congruence. Intuitively, each element of is an equivalence classes of all processes that are structurally congruent to . Next, we set to be , that is, the set of orbits of structurally congruent equivalence classes. With this, we are able to conclude with a time complexity bound for model checking -calculus processes on FHML.
Corollary 44.
Let be a finitary -calculus process with being the set of orbits of structurally congruent equivalence classes can reduce to, and let be a FHML formula. Furthermore, let us set:
-
to be ,
-
to be ,
-
to be ,
-
to be the FLTS derived from following Definition 43.
Then, the time complexity of model checking on a configuration in is in:
with for some constant .
Proof.
The proof follows similarly to Theorem 41, here we justify our setting. By definition, for each there must exist some such that , therefore we have that . The value of comes from the maximum number of names appearing in any formula in the reduction of , thus representing the register index of . We have that as there can be at most next configurations out of a configuration on a given label , and constructing a new bounded configuration incurs cost . It remains to discuss the bound for . To determine if two processes with are structurally congruent up to permutation, it suffices to determine that
where each is with each of its fresh names substituted by . Thus, the new processes under examination will have size bounded by for some constant , and so can be computed in . Thus, we obtain the time complexity for .
