Abstract 1 Introduction 2 Preliminaries 3 Interface Automata with Data 4 Modeling Example 5 Modelling interoperability as a game 6 Symbolic interoperability game 7 Discussion and Future Work References Appendix A Proof of undecidability stated in Section 3

Regulating Synchronous Data Exchange to Meet Control Flow and Data Specifications

Ashwin Bhaskar ORCID Chennai Mathematical Institute, India M. Praveen ORCID Chennai Mathematical Institute, India
CNRS IRL ReLaX, Chennai, India
Abstract

When multiple software components interact via method calls, we may want to ensure that the order of invoked methods and the arguments provided adhere to some specification. The classic problem associated with interface automata checks for the existence of a mediator whose intention is to act as a buffer in between method invocations so that invocations do not go unanswered. We extend the base model underlying interface automata, enabling them to exchange integer values - one automaton generates an integer value and outputs it by firing a generating transition and another automaton receives the value by synchronously firing a receiving transition. Transitions in the automata can have guards with linear order constraints on the exchanged values, influencing which methods can or can not be invoked later. So the generated values influence the sequences of invocations that are enabled. We specify desirable properties of the sequence of method calls and the arguments passed to them using an extension of Linear Temporal Logic (LTL). We consider the interoperability problem, which is to check if it is possible to generate integer values in such a way that all enabled sequences satisfy the given specification.

We show that the interoperability problem is undecidable in general, even when there are only two participating automata. We show decidability in the case where guards on generating transitions can only have equality constraints on the exchanged value (but receiving transitions can continue to have linear order constraints). We model this problem as a game between two players, one trying to generate integer values such that violating sequences are disabled while the other player tries to dig out violating sequences that are enabled. Interoperability is equivalent to the first player having a winning strategy. We solve this game via a finite abstraction, which results in a symbolic game. We then show that winning strategies for the symbolic game can be translated to winning strategies for the original game over integers.

Keywords and phrases:
Distributed Systems, Interface Automata, Registers, Parity Games
Funding:
M. Praveen: This author is partially supported by the Infosys foundation.
Copyright and License:
[Uncaptioned image] © Ashwin Bhaskar and M. Praveen; licensed under Creative Commons License CC-BY 4.0
2012 ACM Subject Classification:
Theory of computation → Logic and verification
; Theory of computation → Modal and temporal logics ; Theory of computation → Verification by model checking
Editors:
C. Aiswarya, Ruta Mehta, and Subhajit Roy

1 Introduction

There are many models for formalizing multiple software components interacting with each other. E.g. in [11], smart contracts are modeled using interface automata [5]. The classic question for interface automata is to check if there exists a mediator (that can buffer method calls among the participants) such that there are no unanswered method calls [5, 10]. In [1], smart contracts are modeled in the Behavior Interaction Priority (BIP) framework, which are finite state machines (FSMs) interacting via ports. The smart contracts in [1] are part of a supply chain for crude oil, and the goal is to model check properties such as “once the point-of-sale receives the oil batches from a vendor, the payment must be triggered”. This is a typical temporal property saying one event must be followed by another.

FSMs in the BIP framework can exchange data in the form of arguments passed to method calls. We work with a model that also allows exchange of data (for example, an integer indicating the amount to be paid), but using synchronized transitions as in interface automata. In [1], control flow can be influenced by conditions such as “if the production at a vendor site is more than a specified limit, send an alert”. We model these using guards on transitions, which comprise of linear order constraints on the data exchanged. The value that is exchanged thus influences which branches can be taken by the control flow. The interoperability problem is to check if the values can be generated in such a way that the control flow remains within a specified set. The set is specified by Constraint Linear Temporal Logic (CLTL), an extension of LTL that can check linear order constraints on data values. In the above supply chain example, this can check if there exists a value for the daily production limit such that vendor and point-of-sale work together ensuring that there is always enough inventory.

We benefit from game theoretic foundations of interface automata. To tackle the interoperability problem, we design a game between two players, system and spoiler. system tries to choose values of the exchanged data (restricted to integers here) so that branches of control flow that can potentially violate the specification are disabled. spoiler tries to pick out branches in the enabled part of control flow that can potentially violate the specification. If system has a winning strategy, it provides integer values that will ensure that the specification is always met in all enabled branches of the control flow.

One difficulty that needs to be overcome is that branches in which the game can proceed depends on choices system makes from an infinite domain (integers). We handle this by designing an abstraction that reduces the game to a finite one, while still maintaining enough information about existence of winning strategies. The high level idea of using abstraction to reduce infinite domains to finite ones is a known technique [7, 3, 2, 8]. But designing the abstraction must be done carefully so that peculiarities of the original model are correctly reflected in the resulting finite symbolic model. Our first contribution is coming up with a model that is expressive enough to specify interesting properties. An example is given in Section 4. Our second contribution is designing an abstraction [definition 19] such that the resulting finite symbolic model meets two goals. First, it is equivalent to the original model wrt the existence of winning strategies [Lemma 24]. Second, it can be solved by adapting known techniques [[3], Lemma 23].

Suppose the participants do not know each other’s configurations and we need to check if they can still generate values based on the imperfect information they have. It turns out that if each participant sends integer values regularly, they can communicate their configuration information by encoding it in the integers they generate, thus communicating their configuration information to other participants and reducing it to the perfect information case. This trick will fail in other cases. It would be interesting to identify interesting fragments of the other cases where the interoperability problem makes sense.

Related work.

In [10, 14], interface automata are extended with registers to handle data like we do here. But there, data values can be compared only for equality and its negation while we have linear order. Also, [10, 14] only consider specific safety properties; we allow properties expressible in CLTL. In [8], synthesis problem for specifications given as register automata over linearly ordered data domains (including ℤ) are studied. They prove decidability for the existence of a winning strategy for one-sided games, where one of the players operates over a finite alphabet and the other manipulates data. The concrete game which we use to model the interoperability problem here is similar to such a one-sided game as even over there, one of the players can only choose from a domain while the other can choose integer values. Also, we use techniques similar to theirs in order to deal with abstraction of the register values by tracking constraints between them and checking for the feasibility of such constraint sequences. However, synchronization between register automata is the central theme of our model and specification is based on a logic. In [8], register automata are used as specification mechanisms. Our techniques involve a combination of qualititative and quantitative specifications. Energy games [6, 4] provide a foundation for many such models.

2 Preliminaries

Let ℤ be the set of integers and ℕ be the set of non-negative integers. We denote by ⌈i⌉k the number i ceiled at k: ⌈i⌉k=i if i≤k and ⌈i⌉k=k otherwise. For integers n1,n2, we denote by [n1,n2] the set {n∈ℤ∣n1≤n≤n2}.

We recall here the definitions of constraint systems and Constraint LTL (CLTL) from [7] with some slight modifications. A constraint system 𝒟 is of the form (D,R1,…,Rn,ℐ), where D is a non-empty set called the domain. Each Ri is a predicate symbol of arity ai, with ℐ⁢(Ri)⊆Dai being its interpretation. For the sake of this paper, it suffices to describe CLTL formulas over constraint systems of the form (D,<,=) where D is an infinite domain, < is a total linear order over D and = is the equality relation.

Let V be a finite set of variables, and A be a finite set of actions. A term is of the form X−i⁢x, where x is a variable and i≥0. A constraint c is of the form ti<tj or (ti=tj), where ti,tj are terms. The syntax of CLTL is given by the following grammar, where a∈A and c is a constraint as defined above.

ϕ::=c|a|¬ϕ|ϕ∨ϕ|Xϕ|ϕUϕ

Let FD denote the set of all mappings of the form f:V→D. The semantics of CLTL is defined with respect to infinite sequences over A×FD (also called concrete models in the following).

Given a concrete model α=(a0,f0)⁢(a1,f1)⁢…∈(A×FD)ω, the ith position of α satisfies the atomic formula a∈A (written as α,i⊧a) if a=ai. Also, given x,y∈V and i1,i2∈ℕ, the ith position of a concrete model α satisfies the constraint X−i1⁢x<X−i2⁢y (resp. X−i1⁢x=X−i2⁢y) (written as σ,i⊧X−i1⁢x<X−i2⁢y (resp. X−i1⁢x=X−i2⁢y)) if and only if i≥i1,i≥i2 and fi−i1⁢(x)<fi−i2⁢(y) (resp. fi−i1⁢(x)=fi−i2⁢(y)) hold. The semantics is extended to the rest of the syntax similar to the usual propositional LTL. We use the standard abbreviations F⁢ϕ (resp. G⁢ϕ) to mean that ϕ is true at some position (resp. all positions) in the future. The X-length of a term X−i⁢x is i. We say that a formula is of X-length k if it uses terms of X-length at most k. The formula G⁢(F⁢a∧X⁢(X−1⁢x<y)) will be true in the first position of a concrete model if, in all positions, the value of x is less than the value of y in the next position and if the action a holds infinitely often in the concrete model. In the rest of this paper when we refer to CLTL formulas, we shall restrict ourselves to CLTL formulas over the constraint system (ℤ,<,=) using just one variable d. The models for such formulas with just one variable can simply be thought of as sequences of the form (a0,v0)⁢(a1,v1)⁢… where vi∈ℤ.

3 Interface Automata with Data

We work with a model based on interface automata [5, 10]. We extend it so that integer values can be exchanged and stored.

Definition 1 (Finite State Register Machines (FSRMs)).

A finite state register machine ℳ=⟨B,q0,R,TE,TH⟩ where:

  • ■

    B is a finite set of states, q0∈B is the initial state and R is a finite set of registers,

  • ■

    TE⊆B×Test×Asgn×B is a set of external transitions, where Asgn is the power set of R and Test is the set of all formulas (guards) of the form g:=ri≤rj|ri≤d⁢|g∧g|⁢¬g where ri,rj∈R and d is a formal parameter.

  • ■

    TH⊆B×B is the set of hidden transitions.

We write B𝒫,R𝒫,T𝒫E,T𝒫H to refer to the set of states, registers, external and hidden transitions of a particular FSRM 𝒫. An R-valuation is a mapping from R to ℤ. Given an R-valuation σ, an integer value v and a guard g, σ,v⊧g denotes that the formula g with each occurrence of r∈R replaced by σ⁢(r) and each occurrence of d replaced by v, evaluates to true.

Definition 2 (Semantics of Finite State Register Machines).

The semantics of a finite state register machine ℳ is a transition system defined as follows.

  • ■

    C=B×ℤR is the set of configurations,

  • ■

    c0=(q0,{r↦0∣r∈R}) is the initial configuration,

  • ■

    (q,σ)→(t,v)(q′,σ′) iff t=(q,g,u,q′)∈TE such that σ,v⊧g and for each r∈R, σ′⁢(r)=v if r∈u and σ′⁢(r)=σ⁢(r) otherwise.

  • ■

    (q,σ)→t,∗(q′,σ) iff t=(q,q′)∈TH.

In words, an external transition t=(q,g,u,q′) goes from configuration (q,σ) to (q′,σ′) storing the integer value v in registers belonging to u, provided t is enabled in σ: σ and the new integer value v should satisfy the guard g. Hidden transitions change states without changing register valuations. We refer to the pair (t,v) or (t,∗) as a step s.

Definition 3 (Traces of Finite State Register Machines).

Given a finite state register machine ℳ, we define a trace τ of ℳ to be a finite or infinite sequence of alternating configurations and steps: c0⁢s0⁢⋯⁢cm−1⁢sm−1⁢cm⁢⋯ where m∈ℕ, c0=c0, ci∈C, ci→sici+1 and si is a step for all i≥0. We denote the set of all traces of ℳ as Traces.

A set of FSRMs can be composed. An output transition of one FSRM can synchronize with an input transition of another FSRM. To control which transitions can synchronize, we label them with a letter from a finite set of actions, along with one of the symbols {!,?}. Transitions labeled with ! (resp. ?) are intended to be output (input) transitions. Two transitions can synchronize if they are labelled with the same action, one of them is additionally labeled with ! and the other one is additionally labeled with ?.

Definition 4 (Interface Register Transition System).

An interface register transition system 𝒮=⟨𝒫¯,A,ac⟩ where 𝒫¯ is a tuple of finite state register machines, A is a finite set of actions and ac:T𝒫¯E→{!,?}×A is a labelling function. The notation T𝒫¯E stands for the union of the sets of external transitions of all the FSRMs in 𝒫¯.

Definition 5 (Semantics of Interface Register Transition System).

The semantics of an interface register transition system 𝒮 is a transition system defined as follows:

  1. 1.

    A configuration is a function c:𝒫¯→∪𝒫∈𝒫¯B𝒫×ℤR𝒫 such that c⁢(𝒫)∈B𝒫×ℤR𝒫 for all 𝒫∈𝒫¯.

  2. 2.

    c0={𝒫↦(q𝒫0,{r↦0∣r∈R𝒫})∣𝒫∈𝒫¯} is the initial configuration mapping all FSRMs to their initial states and all registers to 0.

  3. 3.

    c→(a,to,ti,v)𝒮c′ iff the following conditions are met: to∈T𝒫oE, ti∈T𝒫iE, 𝒫o≠𝒫i, ac(to)=(!,a), a⁢c⁢(ti)=(?,a), v∈ℤ, (qi,σi)→ti,v(qi′,σi′), (qo,σo)→to,v(qo′,σo′) and c′ is obtained from c by changing c⁢(𝒫i) from (qi,σi) to (qi′,σi′) and changing c⁢(𝒫o) from (qo,σo) to (qo′,σo′).

  4. 4.

    c→(a,to,∗,v)𝒮c′ iff the following conditions are met: to∈T𝒫oE, ac(to)=(!,a), v∈ℤ, (qo,σo)→to,v(qo′,σo′) and c′ is obtained from c by changing c⁢(𝒫o) from (qo,σo) to (qo′,σo′). Additionally, for any transition ti with a⁢c⁢(ti)=(?,a), ti can not be fired in the configuration c with the value v.

  5. 5.

    c→∗,t,∗,∗c′ iff the following conditions are met: t∈T𝒫H, (q,σ)→t,∗(q′,σ) and c′ is obtained from c by changing c⁢(𝒫) from (q,σ) to (q′,σ).

In the transition mentioned in point 3 above, output transition to and input transition ti from different FSRMs synchronize by exchanging the integer value v. In the transition of point 4, only an output transition from an FSRM fires and we think of the environment as receiving the value, provided none of the transitions in 𝒮 can fire to receive the value v. In the transition in point 5, a hidden transition in FSRM 𝒫 fires. We refer to tuples (a,to,ti,v),(a,to,∗,v) and (∗,t,∗,∗) as steps.

Definition 6 (Traces of Interface Register Transition System).

Given an interface register transition system 𝒮, we define a trace (or a finite trace) τ of 𝒮 to be a finite alternating sequence of configurations and steps: c0⁢s0⁢…⁢cm−1⁢sm−1⁢cm where c0=c0, m∈ℕ, ci∈C, ci→si𝒮ci+1 and si is a step for all 0≤i≤m. We denote the set of all finite traces of 𝒮 as Traces. An infinite trace τ¯ of 𝒮 is similarly defined to be an infinite alternating sequence of configurations and steps. We denote the set of all infinite traces of 𝒮 as Traces¯.

For a step (a,to,ti,v) or (a,to,∗,v), its projection to actions and values is πa⁢v⁢((a,to,ti,v))=πa⁢v⁢((a,to,∗,v))=(a,v). For a step (∗,t,∗,∗) with a hidden transition t, πa⁢v⁢((∗,t,∗,∗))=ϵ, the empty sequence. We extend πa⁢v to traces as πa⁢v⁢(c0⁢s0⁢c1⁢s1⁢⋯)=πa⁢v⁢(s0)⁢πa⁢v⁢(s1)⁢⋯. We say that a trace τ¯ satisfies a CLTL formula ϕ (denoted as τ¯⊧ϕ) if there are infinitely many external transitions fired along τ¯ and πa⁢v⁢(τ¯)⊧ϕ.

Two traces that differ only in hidden transitions can not be distinguished by CLTL formulas. We formalize this next.

Definition 7 (Hidden transitions invariance).

Suppose a finite trace τ is of the form τ1⋅c⋅(∗,t,∗,∗)⋅τ2. Bypassing the step (∗,t,∗,∗) based on the hidden transition t will result in the sequence τ1⋅τ2. Let τ∗ be obtained from τ by bypassing all hidden transitions occurring in τ. We say two traces τ1,τ2 are equivalent wrt hidden transitions (written as τ1∼Iτ2) if τ1∗=τ2∗.

A step (a,to,ti,v) can only be taken if the current configuration along with the new value v satisfies the guards in the transitions to,ti. Choosing certain values can thus help in avoiding traces that violate a given CLTL specification. We denote by T𝒫¯O the set of transitions T𝒫¯O={t∈T𝒫¯E∣ac(t)∈{!}×A}.

Definition 8 (Regulator).

Given an interface register transition system 𝒮, a regulator is a function reg:Traces𝒮/∼I×T𝒫¯O→ℤ.

An infinite trace τ¯ conforms to a regulator reg if the following is true: for every prefix of the form τ⁢(a,to,ti,v)⁢c′ or τ⁢(a,to,∗,v)⁢c′, v=reg⁢([τ]∼I,to). We say that an interface register transition system 𝒮 is interoperable satisfying a CLTL formula ϕ if there is a regulator reg such that all traces τ¯ that conform to reg satisfy ϕ.

In order to handle maximal finite traces, we add gadgets to the interface register transition system. For every action a, we add a sink state sa. For an existing state q, suppose g1,…,gr are the guards on the input transitions from q labelled with a. We add an input transition from q to sa labelled with the action a and the guard ¬(g1∨…∨gr). This new transition is enabled if and only if none of the existing input transitions labelled by a are enabled. On sa, we have a self-loop with an output transition labelled with a new action a′. On every existing state in all the FSRMs, we add self-loops with an input transition labelled with a′. This way, a maximal finite play is artificially extended to an infinite one by padding (a′)ω. This can be easily identified in the CLTL specification and handled accordingly (like disallowing such actions a′ as needed for the undecidability proof in appendix A).

In general, the interoperability problem for interface register transition system is undecidable. Given a 2-counter machine, we construct an interface register transition system with just two FSRMs such that the runs of the 2-counter machine are simulated by the traces of 𝒮. It is an adaptation of similar undecidability proofs for games involving numbers, in which one player simulates a two counter machine and the other player catches mistakes if any during the simulation. For example, if the player simulating an incrementing transition increments by more than 1, it can be caught by the other player by checking that there is a value between the previous and incremented value. The details of the proof of undecidability can be found in appendix A.

4 Modeling Example

In this section, we provide an example of modeling an e-commerce system with the aim of checking whether a client and a server can be made to work with each other by regulating the interaction appropriately. The example is for most parts copied from a similar example given in [10]; we add a feature to it motivating the introduction of linear order constraints in the guards of the FSRMs, which are absent in [10]. For modeling this example, we assume Interface Register Transition Systems can exchange multiple integer values in one transition. Our results can be easily extended to handle this extension.

The example models a typical online store; one FSRM for the client and one for the server. Suppose the client starts by sending a 𝑆𝑡𝑎𝑟𝑡𝑂𝑟𝑑𝑒𝑟 message containing its 𝑖𝑑 and it expects to receive an id of a new order. A schematic of the FSRM modeling the client is shown below in Figure 1.

In the figure, an edge label such as !𝑆𝑡𝑎𝑟𝑡𝑂𝑟𝑑𝑒𝑟(𝐶𝑙𝑖𝑒𝑛𝑡𝐼𝑑) means that it is a transition labeled with the action 𝑆𝑡𝑎𝑟𝑡𝑂𝑟𝑑𝑒𝑟 and the symbol ! (to indicate that it is a output action) and sends an integer value stored in the register named 𝐶𝑙𝑖𝑒𝑛𝑡𝐼𝑑. The client then orders a number of items via the 𝐴𝑑𝑑𝑇𝑜𝑂𝑟𝑑𝑒𝑟 action, at the end of which it provides the payment information via the 𝑃𝑙𝑎𝑐𝑒𝑂𝑟𝑑𝑒𝑟 action. Some edge labels in the figure are a quite long, so we have used shorthands such as 𝑠𝑡𝑚𝑡1. These shorthands are expanded as below.

𝑠𝑡𝑚𝑡i =𝐴𝑑𝑑𝑇𝑜𝑂𝑟𝑑𝑒𝑟⁢(𝑂𝑟𝑑𝑒𝑟𝐼𝑑,𝐼𝑡𝑒𝑚𝐼𝑑i,𝑄𝑡𝑦i)
𝑠𝑡𝑚𝑡 =𝑃𝑙𝑎𝑐𝑒𝑂𝑟𝑑𝑒𝑟⁢(𝑂𝑟𝑑𝑒𝑟𝐼𝑑,𝐶𝐶𝑁𝑜)
𝑟𝑗𝑐𝑡i =𝑂𝑢𝑡𝑂𝑓𝑅𝑎𝑛𝑔𝑒⁢(𝐼𝑡𝑒𝑚𝐼𝑑i,𝑀𝑖𝑛,𝑀𝑎𝑥);𝑄𝑡𝑦i<𝑀𝑖𝑛∨𝑀𝑎𝑥<Q⁢t⁢yi
𝑐𝑛𝑓𝑚i =𝐶𝑜𝑛𝑓𝑖𝑟𝑚𝑒𝑑⁢(𝑂𝑟𝑑𝑒𝑟𝐼𝑑,𝐼𝑡𝑒𝑚i,𝑄𝑡𝑦i)
𝑠𝑡𝑚𝑡ai =𝑃𝑟𝑜𝑐𝑒𝑠𝑠I⁢𝑡𝑒𝑚⁢(𝑂𝑟𝑑𝑒𝑟𝐼𝑑,𝐼𝑡𝑒𝑚𝐼𝑑)
𝑠𝑡𝑚𝑡bi =𝑆𝑒𝑡𝑄𝑡𝑦⁢(𝑂𝑟𝑑𝑒𝑟𝐼𝑑,𝐼𝑡𝑒𝑚𝐼𝑑,𝑄𝑡𝑦i)
𝑠𝑡𝑚𝑡ci =𝐶𝑜𝑛𝑓𝑖𝑟𝑚𝐼𝑡𝑒𝑚⁢(𝑂𝑟𝑑𝑒𝑟𝐼𝑑,𝐼𝑡𝑒𝑚𝐼𝑑,𝑄𝑡𝑦i)
𝑠𝑡𝑚𝑡di =𝑂𝑢𝑡𝑂𝑓𝑅𝑎𝑛𝑔𝑒⁢(𝑂𝑟𝑑𝑒𝑟𝐼𝑑,𝐼𝑡𝑒𝑚𝐼𝑑,𝑄𝑡𝑦i,𝑀𝑖𝑛,𝑀𝑎𝑥)
𝑠𝑡𝑚𝑡e =𝐶𝑙𝑜𝑠𝑒𝑂𝑟𝑑𝑒𝑟⁢(𝑂𝑟𝑑𝑒𝑟𝐼𝑑,𝐶𝐶𝑁𝑜)

Then the client expects all items together with the quantities to be confirmed by the customer service. The client also accepts rebuttals from the customer service in case the number of items ordered is outside the minimum and maximum range allowed, via the 𝑂𝑢𝑡𝑂𝑓𝑅𝑎𝑛𝑔𝑒 message. This is a feature we have added here beyond what is described in [10], in order to demonstrate the utility of linear order constraints. The edge label r⁢j⁢c⁢ti above implements this feature by using a guard to test that the quantity is indeed out of range. In practice, e-commerce systems would allow the client to revise the order, but for the sake of simplicity here, we just move ahead by dropping those items that are out of range. It blocks in case that it does not receive the right confirmation for the remaining items. Then it announces that it is ready to close the order and expects to receive the result of the payment transaction.

The client service expects to receive the client’s id, then it sends a confirmation and sends an id of a new order, together with a client verification. It is then prepared to repeat a loop in which it 1) receives an order of an item, 2) receives a quantity, 3) confirms the quantity or rejects as out of range and sends minimum and maximum quantity allowed. After that, it receives payment information, arranges payment via a third party service (invisible to the client and not modeled here), and sends the result of the payment transaction.

Figure 1: Modeling an e-commerce system. On the left is the client FSRM and on the right, customer service FSRM.

The client and customer service are not directly interoperable, since the client sends all items before accepting responses but the customer service sends responses for each item before accepting the next item. They can however still interoperate via a mediator that buffers the item orders and communicates with the two parties as expected. As done in [10], we restrict ourselves to the case where the number of items per order is bounded by a constant n, which becomes a parameter of the interoperability problem. The specification will say that every item is either acknowledged or out of range and that the order is closed and the result of the payment transaction is provided to the client. This can be easily specified in CLTL.

5 Modelling interoperability as a game

In the simulation of the two counter machine briefly mentioned at the end of Section 4 (details of which can be found in appendix A), we check that counter increments and decrements are done correctly using guards on output transitions, which ensure that the generated value is strictly between two previously generated values. It turns out that if we restrict guards on output transitions to prevent such checks, interoperability problem is decidable. Specifically, let guards on output transitions be those of the form g:=ri≤rj|ri=d⁢|g∧g|⁢¬g. From now on, we shall call this the restricted syntax. The new value being generated (represented symbolically by d in guards) can only be tested for equality (ri=d, as opposed to ri≤d in general) with register values. In other words, the restricted guards can check if the generated value is actually there in one of the registers, which is a natural test one may want to do. With guards on output transitions obeying this restricted syntax, the interoperability problem is decidable. As a first step towards proving decidability, we informally describe a game formulation of the interoperability problem.

The game is played between system and spoiler, on the transition system which is the semantics of the given interface register transition system. spoiler’s goal is to pick out a trace τ¯ that violates the given CLTL specification. system tries to prevent this by choosing values of the generated integers such that some transitions are disabled, thus restricting the choices available to spoiler in the next move. The game begins at the initial configuration and spoiler chooses an output transition to labeled with some action a enabled at the current configuration. system chooses a value v based on the history of the play so far. spoiler chooses a transition ti enabled at some FSRM. The game moves to the updated configuration as per semantics. The game continues with the next round as before. system wins the play if the infinite trace generated by the play satisfies the CLTL specification. The existence of a winning strategy for system in this game is equivalent to the existence of a regulator.

To formally prove the above equivalence, we first formalize the game itself. A round ends with spoiler choosing an input transition that is enabled at the current configuration. The next round begins wth spoiler choosing an output transition that is enabled at the current configuration. We will combine these two moves of the spoiler and make it into a position of another game, which we call the concrete game. We denote by T𝒫¯I the set of transitions T𝒫¯I={t∈T𝒫¯E∣a⁢c⁢(t)∈{?}×A}.

Definition 9 (Concrete game).

Given an interface register transition system 𝒮, we associate with it a concrete game. The initial positions are of the form (c0,to), where c0 is any configuration that can be reached from the initial configuration c0 with a finite sequence of hidden transitions and to is any output transition enabled at c0. The set of other positions is (T𝒫¯I∪{∗})×C×T𝒫¯O. The set of system moves is ℤ.

The concrete game starts at an initial position (c0,to). From any position (c0,to), (ti,c,to) or (∗,c,to), system makes a move by choosing a value v∈ℤ. spoiler can respond by moving to any position (ti′,c2,to′) (resp. (∗,c2,to′)) provided the following conditions are satisfied:

  • ■

    Output transition to and input transition ti′ are labeled with the same action, say a (resp. to is labeled with a and there is no input transition enabled at the configuration c to receive the value v),

  • ■

    c→a,to,ti′,v𝒮c1 (resp. c→a,to,∗,v𝒮c1), c2 is reachable from c1 by a sequence of hidden transitions and to′ is an output transition enabled in c2.

The game then continues as before from the new position. A play is an infinite sequence of alternating positions and moves: p0⁢v0⁢p1⁢v1⁢p2⁢⋯ such that successive positions satisfy the conditions above. Histories are finite prefixes of plays, ending at positions. With every play π, we can naturally associate an infinite sequence of actions and values πa⁢v⁢(π). system wins a play π if πa⁢v⁢(π) satisfies the CLTL formula ϕ specified in the interoperability problem. Let H denote the set of all histories.

Definition 10 (Strategies).

A system strategy is a function f:H→ℤ.

A play p0⁢v0⁢p1⁢v1⁢p2⁢⋯ conforms to the strategy f if for all i≥0, vi=f⁢(p0⁢v0⁢⋯⁢pi). We say that f is a winning strategy for system if all plays conforming to it are won by system.

Proposition 11 (Interoperability and concrete game).

Let 𝒮 be an interface register transition system such that guards on all the output transitions obey the restricted syntax and let ϕ be a CLTL formula. 𝒮 is interoperable satisfying ϕ if and only if system has a winning strategy in the corresponding concrete game.

Proof.

A regulator is a function reg:Traces𝒮/∼I×T𝒫¯O→ℤ. A strategy is a function f:H→ℤ. The result follows from the observation that there is a natural one-to-one correspondence between Traces𝒮/∼I×T𝒫¯O and H. ◀

6 Symbolic interoperability game

In this section we prove that the interoperability problem for CLTL specifications is decidable when the guards on output transitions obey the restricted syntax.

We shall prove this by checking if system has a winning strategy in the associated concrete game. This is in turn checked by designing a finite parity game that is equivalent to the concrete game with respect to system having a winning strategy. We use positional determinacy of finite parity games to show this equivalence. In the rest of this section we elaborate on this.

In the concrete game, data exchanged between FSRMs come from ℤ, an infinite set. We will have to simulate this in a game that can only use letters from a finite alphabet, for which we shall construct a symbolic abstraction.

We introduce the notion of partial frames and frames. We use frames (resp. partial frames) to capture the total pre-order (resp. not necessarily total pre-order) induced by the configurations and the data values along s consecutive positions in the concrete game. While a partial s-frame captures the pre-order induced by the configurations and data values appearing in the last s rounds of the concrete game upto the latest position of the spoiler, an s-frame extends this to a total pre-order which includes the integer value generated by system in its successive move as well.

The models of CLTL are infinite sequences over infinite alphabets. Frames, introduced in [7], abstract them to finite alphabets. Conceptually, frames and symbolic models as we will define here are almost the same as introduced in [7], where the authors used these notions to solve the satisfiability problem for CLTL. Also, in [3], the authors use the notion of frames and partial frames in CLTL games to solve the single-sided realizability problem and the notions we use here are again, quite similar.

Given an interface register transition system 𝒮=⟨𝒫¯,A,ac⟩ and a CLTL formula ϕ over A and a single variable d, we first define the notion of 𝒮-variables and 𝒮-terms.

The set of 𝒮-variables V𝒮=⋃𝒫∈𝒫¯R𝒫∪{d}. An 𝒮-term is of the form X−i⁢x, where x∈V𝒮 and i≥0. For k≥0, we denote by T𝒮⁢[k] the set of all 𝒮-terms of the form X−i⁢x, where i∈[0,k].

Definition 12 (Frames, [7], [3, Definition 3]).

Given a number s≥1, an s-frame f is a pair (af,≤f) where af∈A and ≤f is a total pre-order 111a reflexive and transitive relation such that for all x,y, either x≤fy or y≤fx on the set of terms T𝒮⁢[s−1].

In the notation s-frame, s is intended to denote the size of the frame – the number of successive positions about which information is captured. The current position and the previous s−1 positions are considered, for which the terms in T𝒮⁢[s−1] are needed. We denote by <f and ≡f the strict order and equivalence relation induced by ≤f:x<fy iff x≤fy and y≰fx and x≡fy iff x≤fy and y≤fx.

We will deal with symbolic models that constitute sequences of frames. An s-frame will capture information about the first s positions of a model.

An s-frame meant for positions i−s to i−1 may be followed by another s-frame meant for positions i−s+1 to i. The two frames must be consistent about the positions i−s+1 to i−1 that they share. The following definition formalizes this requirement.

Definition 13 (One-step compatibility, [7], [3, Definition 4]).

For s≥1, an s-frame f and an (s+1)-frame g, the pair (f,g) is one-step compatible if for all terms t1,t2∈T𝒮⁢[s−1]∖V𝒮, t1≤ft2 iff t1≤gt2. For s≥2 and s-frames f,g, the pair (f,g) is one-step compatible if for all terms t1,t2∈T𝒮⁢[s−2]∖V𝒮, t1≤ft2 iff X−1⁢t1≤gX−1⁢t2

Fix a number k≥0 and consider formulas of X-length k. A symbolic model is a sequence ρ of frames such that for all i≥0, ρ⁢(i) is an ⌈i+1⌉k+1-frame and (ρ⁢(i),ρ⁢(i+1)) is one-step compatible. CLTL formulas can be interpreted on symbolic models, using symbolic semantics ⊧s as explained next. To check if the ith position of ρ symbolically satisfies the atomic formula a, we check whether ρ⁢(i) is of the form (a,≤) for some pre-order ≤, and to check if the ith position of ρ symbolically satisfies the atomic constraint t1<t2 (where t1,t2 are terms), we check whether t1<t2 holds according to the total pre-order ≤ρ⁢(i) in the ith frame ρ⁢(i). In formal notation, this is written as ρ,i⊧st1<t2 if t1<ρ⁢(i)t2 holds. The symbolic satisfaction relation ⊧s is extended to all CLTL formulas of X-length k by induction on the structure of the formula, as done for propositional LTL. To check whether ρ,i⊧st1<t2 in this symbolic semantics, we only need to check ρ⁢(i), the ith frame in ρ, unlike the CLTL semantics, where we may need to check other positions also. In this sense, the symbolic semantics lets us treat CLTL formulas as if they were formulas in propositional LTL and employ techniques that have been developed for propositional LTL. But to complete that task, we need a way to go back and forth between symbolic and concrete models.

Given a concrete model α, we associate with it a symbolic model μ⁢(α) as follows. Imagine we are looking at the concrete model through a narrow aperture that only allows us to view k+1 positions of the concrete model, and we can slide the aperture to view different portions. The ith frame of μ⁢(α) will capture information about the portion of the concrete model visible when the right tip of the aperture is at position i of the concrete model (so the left tip will be at i−⌈i⌉k). Formally, the total pre-order of the ith frame is the one induced by the valuations along the positions i−⌈i⌉k to i of the concrete model. The action occurring in the first component of each position of the symbolic model μ⁢(α) will be the same as the action appearing in the first component of the corresponding position of the concrete model α.

Lemma 14 ([7, Lemma 3.1], [3, Lemma 5]).

Let ϕ be a CLTL formula of X-length k. Let α be a concrete model and let ρ=μ⁢(α). Then α,0⊧ϕ iff ρ,0⊧sϕ.

The symbolic model ρ induces an order ≤ρ on ℕ×V𝒮 as follows. Consider i∈ℕ such that ρ⁢(i) contains an s-frame for some s≥1 and let j∈ℕ be such that j≤i and i−j≤(s−1). We say (i,x)⪯ρ(j,y) (resp. (j,y)⪯ρ(i,x)) if x≤ρ⁢(i)Xj−i⁢y (resp. Xj−i⁢y≤ρ⁢(i)x). In other words, for the variables and positions captured in the frame ρ⁢(i), ⪯ρ is same as the total pre-order ≤ρ⁢(i) over that frame. Now we define ≤ρ to be the transitive closure of ⪯ρ and <ρ to be the transitive closure of ≺ρ. ≤ρ is now a partial order over ℕ×V𝒮.

For every concrete model, there is an associated symbolic model, but the converse is not true. We say that a symbolic model ρ admits a concrete model if there exists a concrete model α such that ρ=μ⁢(α). In particular, it is easy to see that if there are infinite chains of the form that we shall define below in a symbolic model then it does not admit a concrete model.

Definition 15 (Infinite chains, [7, Condition Cℤ]).

A symbolic model ρ is said to have infinite chains if there exist two infinite sequences i1≤i2≤⋯ and j1≤j2≤⋯ and two variables x,y∈V𝒮 satisfying one of the following conditions:

(i1,x)<ρ(i2,x)<ρ(i3,x)<ρ⋯≤ρ≤ρ≤ρ(j1,y)≥ρ(j2,y)≥ρ(j3,y)≥ρ⋯ or  (i1,x)>ρ(i2,x)>ρ(i3,x)>ρ⋯≤ρ≤ρ≤ρ(j1,y)≤ρ(j2,y)≤ρ(j3,y)≤ρ⋯

If a symbolic model ρ has an infinite chain as above, the integer values associated with (i2,x),(i3,x)⁢… will all be distinct from each other and will be inside the interval from (i1,x) to (j1,y), which is impossible. Hence, absence of infinite chains is a necessary condition for a symbolic model to admit concrete models. We shall see later that this is also a sufficient condition for a subset of symbolic models

We next define partial frames and compatibility between a partial frame and a frame.

Definition 16 (Partial frames and compatibility).

For s≥1, a partial s-frame 𝑝𝑓 is a pair (a𝑝𝑓,≤𝑝𝑓) where a𝑝𝑓∈A and ≤𝑝𝑓 is a total pre-order on the set of terms T𝒮⁢[s−1]∖{d}. For s≥0, an s-frame f and a partial (s+1)-frame 𝑝𝑓, the pair (f,𝑝𝑓) is one-step compatible if for all t1,t2∈T𝒮⁢[s−1]∖V𝒮, t1≤ft2 iff t1≤𝑝𝑓t2. For s≥2, an s-frame f=(af,≤f) and a partial s-frame 𝑝𝑓=(a𝑝𝑓,≤𝑝𝑓), the pair (f,𝑝𝑓) is one-step compatible if for all t1,t2∈T𝒮⁢[s−2]∖V𝒮, X−1⁢t1≤𝑝𝑓X−1⁢t2 iff t1≤ft2, and the pair (𝑝𝑓,f) is one-step compatible if af=a𝑝𝑓 and for all t1,t2∈T𝒮⁢[s−1]∖{d},t1≤𝑝𝑓t2 iff t1≤ft2.

Figure 2: Frames, partial frames and one-step compatibility.

Figure 2 illustrates s-frames, partial s-frames and one-step compatibility graphically. Observe here that the pairs (f1,p⁢f2) and (p⁢f2,f2) are both one-step compatible. Note that the figure does not indicate some of the edges in the 3-frame and partial 3-frame which can be inferred using transitivity.

We now begin defining the symbolic game. We first define the notion of a symbolic configuration. A pair (qP¯,f) where f is any ⌈s⌉k+1-frame for some s≥1, is called a symbolic configuration (denoted by s⁢c). We call (qP¯,𝑝𝑓) a partial symbolic configuration (denoted by p⁢s⁢c) where 𝑝𝑓 is any partial ⌈s⌉k+1 -frame for some s≥1. Given a transition t=(q,g,u,q′), a tuple of states qP¯ and a ⌈s⌉k+1-frame f, we say t is enabled at (qP¯,f) if the action label of t is same as the first component of f, q∈qP¯ and the frame f satisfies the guard g, or in other words, r𝒫i≤fr𝒫j holds if g=r𝒫i≤r𝒫j and r𝒫i≤fd holds if g=r𝒫i≤d. We next define the notions of symbolic updates and symbolic steps which we shall use to design the rules of the finite parity game simulating the concrete game.

Definition 17 (Symbolic update).

Given an ⌈s⌉k+1-frame f, and an update u𝒫 (or resp. a pair of updates u𝒫1,u𝒫2 with 𝒫1≠𝒫2) we define the updated partial ⌈s+1⌉k+1-frame 𝑝𝑓 to be such that (f,p⁢f) is one-step compatible,r𝒫≡𝑝𝑓X−1⁢r𝒫 for all r𝒫∉u𝒫, r𝒫′≡𝑝𝑓X−1⁢d, for all r𝒫′∈u𝒫 and r𝒫′≡𝑝𝑓X−1⁢r𝒫′ for all r𝒫′∈R𝒫′, for all 𝒫′≠𝒫 (resp. for a pair of updates, we update the register variables of both 𝒫1 and 𝒫2 and the remaining variables are equal to their previous values).

Definition 18 (Symbolic step).

Given a symbolic configuration s⁢c=(qP¯,f), a partial symbolic configuration p⁢s⁢c′=(qP¯′,𝑝𝑓′), an action a and a pair of output and input transitions to,ti′, where qP¯,qP¯′∈∏𝒫∈𝒫¯B𝒫, f is some ⌈s⌉k+1-frame and 𝑝𝑓′ is a partial ⌈s+1⌉k+1-frame, we define a symbolic step s⁢c→(a,to,ti′)𝒮p⁢s⁢c′ iff the following conditions are met: to=(q𝒫o,g𝒫o,u𝒫o,q𝒫o′)∈T𝒫oE, ti′=(q𝒫i,g𝒫i,u𝒫i,q𝒫i′)∈T𝒫iE, to,ti′ are enabled at s⁢c, 𝒫o≠𝒫i, ac(to)=(!,a), a⁢c⁢(ti′)=(?,a), q𝒫o′,q𝒫i′∈q𝒫¯′ and 𝑝𝑓′ is obtained by updating f with the updates u𝒫o and u𝒫i. We can define the symbolic step s⁢c→(a,to,∗)𝒮p⁢s⁢c′ in a similar manner.

We know that any LTL formula ϕ can be converted to an equivalent non-deterministic Büchi automaton with an exponential number of states in the size of ϕ in EXPTIME [15]. Now, every non-deterministic Büchi automaton with n states can be converted to a deterministic parity automaton [9, Chapter 1] with number of states exponential in n and number of colours polynomial in n [13, Theorem 3.10]. Using these results, it is easy to see that given a CLTL formula ϕ, we can construct a deterministic parity automaton 𝒜ϕ with set of states Q and with number of colours l, accepting the set of all sequences of frames that symbolically satisfy ϕ, such that |Q| is double exponential in the size of ϕ and l is exponential in the size of ϕ.

In order to construct a winning strategy for system in the concrete game using a winning strategy for system in the symbolic parity game that we shall construct, we also need to ensure that every sequence of frames resulting from a play of the game conforming to the winning strategy admits integer labellings for every variable in each of the frames. As done in [7] and [3], it is possible to construct a Büchi automaton of size polynomial in the size of the formula ϕ and hence a deterministic parity automaton 𝒜c⁢h⁢a⁢i⁢n of size exponential in the size of ϕ that checks for the absence of infinite chains in a symbolic model ρ satisfying ϕ. We shall use 𝒜ϕ and 𝒜c⁢h⁢a⁢i⁢n to define the parity winning condition of the symbolic game and we will see later that this ensures the existence of winning strategies with integer labellings for the sequence of frames along every play conforming to certain type of winning strategies.

Definition 19 (Symbolic game).

Given an interface register transition system 𝒮=⟨𝒫¯,A,ac⟩ and a CLTL formula ϕ over A and a single variable d with X-length k, we associate with it a symbolic game. Let ℱ denote the set of all s-frames for s∈[0,k+1] and 𝒫⁢ℱ denote the set of all partial s-frames for s∈[0,k+1]. Let 𝒜=𝒜ϕ×𝒜c⁢h⁢a⁢i⁢n be a deterministic parity automaton accepting the set of all sequences of frames that symbolically satisfy ϕ and do not contain infinite chains, with Q being the set of states, qI∈Q being the initial state and l being the number of colours. We define a parity game with initial positions {(q𝒫0¯,p⁢f0,to,qI)}. Here, q𝒫0¯ is the tuple of initial states of each of the FSRMs in 𝒮, p⁢f0 is the partial 1-frame where all register variables are equal and to is some output transition whose source state is a current state in q𝒫0¯. The set of other spoiler positions is ∏𝒫∈𝒫¯B𝒫×(T𝒫¯I∪{∗})×𝒫⁢ℱ×T𝒫¯O×Q. The set of system positions is (∏𝒫∈𝒫¯B𝒫×(T𝒫¯I∪{∗})×ℱ×T𝒫¯O×Q)∪{(q𝒫0¯,f0,to,qI)}. Position (q𝒫0¯,p⁢f0,to,qI) receives the same colour as that of the initial state qI in 𝒜 and positions (ti,q𝒫¯,𝑝𝑓,to,q), (∗,q𝒫¯,𝑝𝑓,to,q), (ti,q𝒫¯,f,to,q) and (∗,q𝒫¯,f,to,q) receive the same colour as that of state q in 𝒜

We denote the set of spoiler positions by Ps⁢p⁢o and set of system positions by Ps⁢y⁢s The symbolic game starts at an initial position (q𝒫0¯,𝑝𝑓0,to,qI). From any position (q𝒫0¯,𝑝𝑓0,to,qI), (ti,q𝒫¯,𝑝𝑓,to,q) or (∗,q𝒫¯,𝑝𝑓,to,q), system makes a move by choosing a position (q𝒫0¯,f0,to,qI), (ti,q𝒫¯,f,to,q) or (∗,q𝒫¯,f,to,q) where f0 is the 1-frame with all register variables and the variable d equal to each other and f is a frame such that (p⁢f,f) is one-step compatible and is such that f satisfies the guard g appearing in to.

spoiler can respond by moving to any position (ti′,q𝒫¯′,𝑝𝑓′,to′,q′) (resp. (∗,q𝒫¯′,𝑝𝑓′,to′,q′)) provided the following conditions are satisfied:

  • ■

    There is a symbolic step from (q𝒫¯,f) to (q𝒫¯′′,𝑝𝑓′) on (a,to,ti′) or (∗,to,ti′) as defined in 18 and q𝒫¯′ is reachable from q𝒫¯′′ by a sequence of hidden transitions. Formally, (q𝒫¯,f)→(a,to,ti′)𝒮(q𝒫¯′′,𝑝𝑓′) (resp. (q𝒫¯,f)→(a,to,∗)𝒮(q𝒫¯′′,𝑝𝑓′)).

  • ■

    Transition to′ is enabled at the partial symbolic configuration (q𝒫¯′,𝑝𝑓′)

  • ■

    There is a transition from q to q′ on reading the frame f in the deterministic parity automaton 𝒜.

The game then continues as before from the new position. A play is an infinite sequence of alternating spoiler and system positions: p0⁢p0′⁢p1⁢p1′⁢p2⁢p2′⁢⋯ such that successive positions satisfy the conditions above. Histories are finite prefixes of plays, ending at spoiler positions. system wins a play of the game if the parity condition is satisfied by the play. Let H denote the set of all histories. Given a play π, let πf⁢(π) be the projection of the play to the underlying sequence of frames contained in each system position.

Definition 20 (Strategies).

A strategy for system in the symbolic game is a function s⁢t:H→Ps⁢y⁢s.

Definition 21 (Positional Strategies).

A positional strategy for system in the symbolic game is a function s⁢t:Ps⁢p⁢o→Ps⁢y⁢s.

A play p0⁢p0′⁢p1⁢p1′⁢p2⁢p2′⁢⋯ conforms to the strategy (resp. positional strategy) s⁢t if for all i≥0, pi′=s⁢t⁢(p0⁢v0⁢⋯⁢pi) (resp. pi′=s⁢t⁢(pi)). We say that a strategy/positional strategy s⁢t is a winning strategy for system if all plays conforming to it are won by system. We abuse notation and say t1≤p′t2 for t1,t2∈V𝒮 and p′∈Ps⁢y⁢s to mean t1≤ft2 where f is the frame contained in position p′.

We associate a finitely branching infinite tree with a positional strategy s⁢t. Let Πs⁢t be the collection of all plays that conform to strategy s⁢t and let Hs⁢t be the collection of all finite prefixes of plays in Πs⁢t ending in a spoiler position. Now let πs⁢p⁢o⁢(Hs⁢t) denote the projection of such histories to just the sequence of spoiler positions. Now we define a tree associated with positional strategy s⁢t as T:πs⁢p⁢o⁢(Hs⁢t)→Ps⁢y⁢s given by T⁢(p0⁢p1⁢…⁢pi)=s⁢t⁢(pi). For every node η in T, its set of children corresponds to the set of spoiler moves possible for the system move T⁢(η). For a node η, the subtree Tη rooted at η is such that for all η′, Tη⁢(η′)=T⁢(η⋅η′). A tree T is called regular if the set {Tη∣η∈πs⁢p⁢o⁢(Hs⁢t)} is finite, i.e., there are only finitely many subtrees up to isomorphism. Two nodes η,η′ are said to be isomorphic if Tη=Tη′. It is easy to verify that the tree T associated with a positional winning strategy is a regular tree.

Given an infinite path π∈πs⁢p⁢o⁢(Πs⁢t) of the tree T, we associate with it, a symbolic model ρ, which is the infinite sequence of frames obtained from the labels of the nodes along that path.

We now give an automata-theoretic characterization for trees that are labellable. Using the fact that the trees associated with positional strategies are regular and using results from [3], we get that such trees are labellable if and only if the symbolic model associated with each infinite path of the tree does not have any infinite chain. Recall that the automaton 𝒜c⁢h⁢a⁢i⁢n we defined earlier, checks for absence of infinite chains in a symbolic model and therefore, we get the following lemma:

Lemma 22 ([3, Lemma 23]).

The tree T associated with a positional strategy s⁢t is labellable iff the symbolic model associated with every infinite path of T is recognized by the deterministic parity automaton 𝒜c⁢h⁢a⁢i⁢n.

Now, we know that if a positional strategy is winning, then the sequence of frames along every play conforming to the strategy must not have any infinite chains, hence no path in the tree associated with this strategy should have any infinite chains. Using Lemma 22, we then get that:

Lemma 23.

The tree T associated with a positional winning strategy s⁢t is labellable.

We now extend the map μ to go from histories hc (resp. plays πc) of the concrete game to histories hs (resp. plays πs) of the symbolic game. We define a function μ:Hc→Hs as follows: μ⁢((c0,t0)⁢v0⁢(t0′,c1,t1)⁢v1⁢…⁢(ti′,ci+1,ti+1)) equals (q𝒫0¯,𝑝𝑓0,t0,qI)⁢(q𝒫0¯,f0,t0,qI)⁢(t0′,q𝒫1¯,𝑝𝑓1,t1,q1)⁢(t0′,q𝒫1¯,f1,t1,q1)⁢…⁢(ti′,q𝒫i+1¯,𝑝𝑓i+1,ti+1,qi+1) where 𝑝𝑓j is the partial ⌈j+1⌉k+1-frame induced by the configurations cj−⌈j⌉k+1,…⁢cj and the integer values vj−⌈j⌉k+1,…⁢vj−1 and fj is the ⌈j+1⌉k+1-frame induced by the configurations cj−⌈j⌉k+1,…⁢ci and the integer values vj−⌈j⌉k+1,…⁢vj, q𝒫j¯ is the tuple of states in configuration cj and qj is the state of DPA 𝒜 on reading the sequence of frames f0⁢…⁢fj−1 for all 0≤j≤i. μ is defined over plays of the concrete game in a similar manner. We now use all the above definitions and lemmas to establish the equivalence between the concrete and the symbolic games.

Lemma 24 (Equivalence between concrete and symbolic games).

system has a winning strategy in the concrete game if and only if system has a winning strategy in the symbolic game

Proof.

(⇒) Suppose system has a winning strategy s⁢t in the CLTL game. We will construct a winning strategy s⁢tp for system in the symbolic game. Any history hs of length 1 is of the form (q𝒫0¯,𝑝𝑓0,t0,qI) and it is clear that μ⁢((c0,t0))=((q𝒫0¯,𝑝𝑓0,t0,qI)). Therefore, we define s⁢tp⁢((q𝒫0¯,𝑝𝑓0,t0,qI))= last position of μ⁢((c0,t0)⋅s⁢t⁢((c0,t0))).

We assume inductively that the strategy s⁢tp has been defined for all histories hs in the symbolic game of length j≤i and that there exists a history hc of length j in the concrete game such that μ⁢(hc)=hs. Now, consider a history hsi+1=(q𝒫0¯,𝑝𝑓0,t0,qI)⁢(q𝒫0¯,f0,t0,qI)⁢…⁢(ti′,q𝒫i+1¯,𝑝𝑓i+1,ti+1,qi+1) generated after i+1 rounds of the game. By induction hypothesis, there exists a history hci of length i of the form (c0,t0)⁢v0⁢(t0′,c1,t1)⁢v1⁢…⁢(ti−1′,ci,ti) such that μ⁢(hci)=(q𝒫0¯,𝑝𝑓0,t0,qI)⁢(q𝒫0¯,f0,t0,qI)⁢(t0′,q𝒫1¯,𝑝𝑓1,t1,q1)⁢(t0′,q𝒫1¯,f1,t1,q1)⁢…⁢(ti−1′,q𝒫i¯,𝑝𝑓i,ti,qi). Let vi=s⁢t⁢((c0,t0)⁢v0⁢(t0′,c1,t1)⁢v1⁢…⁢(ti−1′,ci,ti)) [The proof fails at this step if we allow the guards on the output transitions to use the full syntax instead of the restricted syntax. See note at the end of the proof]. Now, let ci→a,ti,ti′,vi𝒮ci+1. Thus, we now have hci+1=(c0,t0)⁢v0⁢(t0′,c1,t1)⁢v1⁢…⁢(ti−1′,ci,ti)⁢(ti′,ci+1,ti+1) such that μ⁢(hci+1)=hsi+1 and therefore, s⁢tp⁢(hsi+1)= last position of μ⁢(hci+1⋅s⁢t⁢(hci+1)).

Let πs be any infinite play in the parity game that system plays according to the strategy derived from s⁢tp. By the inductive definition, there exists a play πc in the concrete game played according to the strategy s⁢t such that πs=μ⁢(πc). Now, since s⁢t is a winning strategy for the concrete game, πc must be winning for system in the concrete game, or in other words the concrete model underlying πc must satisfy the CLTL formula ϕ. Therefore, by Lemma 14, the infinite sequence of frames along πs must satisfy ϕ symbolically and since it admits an integer labelling it cannot have infinite chains. Therefore, πs satisfies the parity winning condition of 𝒜 or in other words, s⁢tp is a winning strategy for system in the symbolic game.

(⇐) We know that if there is a winning strategy in a parity game then there must also be a positional winning strategy. Let s⁢tp be such a positional winning strategy for system in the parity (symbolic) game and let Tp be the tree associated with s⁢tp. By Lemma 23, we know that Tp admits a labelling function Lp given by Lp⁢(η):V𝒮→ℤ for all η∈πs⁢p⁢o⁢(Hs⁢tp) such that T^⁢(π)=μ⁢(L^⁢(π)) for every infinite sequence π∈πs⁢p⁢o⁢(Πs⁢tp). Now suppose Lp⁢((q𝒫0¯,𝑝𝑓0,t0,qI))⁢(x)=r for all x∈V𝒮 (all x∈V𝒮 must have the same label as they are equal wrt 𝑝𝑓0). We construct a new label function L′p given by L′p⁢(η)⁢(x)=Lp⁢(η)⁢(x)−r for all η∈πs⁢p⁢o⁢(Hs⁢tp) and all x∈V𝒮. Clearly, L′p is also a valid labelling function satisfying T^⁢(π)=μ⁢(L′^p⁢(π)) for every infinite sequence π∈πs⁢p⁢o⁢(Πs⁢tp). We will use this to inductively construct a winning strategy s⁢t for the system in the concrete game.

Consider a history hci of length i≥1 in the concrete game. We define s⁢t⁢(hci)=L′p⁢(πs⁢p⁢o⁢(μ⁢(hci)))⁢(d). This labelling also respects the fact that the inital values of all the register variables are 0 in the concrete game and assigns values accordingly. Now consider any play πc played according to strategy s⁢t. Clearly, by Lemma 14, the underlying concrete model α⊧ϕ as the symbolic model μ⁢(α) satisfies the formula ϕ symbolically as μ⁢(α) is the infinite frame sequence along the play πs=μ⁢(πc) which is winning for the symbolic game and therefore satisfies the parity winning condition. Thus, πa⁢v⁢(πc)⊧ϕ or in other words, πc is winning for system and therefore, s⁢t is indeed a winning strategy for system in the concrete game. ◀

As noted in the proof, the last output transition ti may not actually be enabled at configuration ci of the concrete game if the guard on ti necessitates the newly generated value to be strictly between two consecutive integer values in ci (notice that such a guard is used in the undecidability proof for simulating a counter increment, see Appendix A). The guard on ti can indeed impose this condition if the guards on output transitions are allowed to use the full syntax instead of the restricted syntax.

We know that checking for the existence of a winning strategy of a player in a finite parity game is decidable. Thus, using Proposition 11, Lemma 24 and the decidability of parity games, we have the following main result:

Theorem 25 (Decidability of Interoperability).

Let S be an interface register transition system such that guards on all the output transitions obey the restricted syntax and let ϕ be a CLTL formula. The problem of checking whether S is interoperable satisfying ϕ is decidable.

7 Discussion and Future Work

The deterministic parity automaton 𝒜 that checks for bounded chains and symbolic satisfiability has size doubly exponential with respect to the size of the formula as already discussed before. The number of frames and partial frames is exponential in the number of registers of transition system 𝒮. Therefore, the size n of the parity game graph is polynomial in the number of states and transitions in 𝒮 and exponential in the number of registers. As we saw earlier, the number of colours l is exponential in the size of the formula. The interoperability problem for the decidable fragment can therefore be decided in O⁢(nl⁢o⁢g⁢(l)). This gives us a 2EXPTIME upper bound for the interoperability problem.

We want to point out here that while it may seem that technically many of the ideas are similar those used in solving the realizability problem for CLTL in [3], the main difference is that we are addressing a problem about a transition system whereas in CLTL realizability, there is only a formula and no transition system. It is actually possible to encode the transition system as a CLTL formula. Using such an encoding, it is indeed possible to reduce the interoperability problem to the single-sided realizability problem for CLTL. But we know that single-sided realizability for CLTL over the integers is 2EXPTIME-complete. Hence, the upper bound we get will be doubly exponential in the size of the transition system. Based on the discussion above, the approach we have taken gives us a better upper bound in terms of the size of the transition system.

In this paper, we allow only integer values to be exchanged between finite state register machines. But one can also consider models where rational or real values could be exchanged. It turns out that the interoperability problem for interface register transition systems which exchange values coming from some dense, open domain is in fact decidable for the general syntax. For dense and open domains it turns out that satisfiability of any guard is guaranteed by its symbolic satisfiability ([7], [3]) (unlike in the case of integers, where it is not possible to satisfy a guard that demands that the newly generated value be between two registers whose values happen to be consecutive). Therefore, the equivalence established by Lemma 14 would hold even for the general syntax. Also, we do not need to check for the absence of unbounded chains for dense, open domains and therefore, we get decidability for the general syntax by reducing it to a parity game with in fact, a simpler parity winning condition.

We defined frames and partial frames to be total orders over the set of terms. But there could be pairs of variables that might never be compared. So, in principle, it is possible to try to avoid total orders and check if frames can be defined as partial orders. It would be interesting to see if this leads to better efficiency.

References

  • [1] Sarra Alqahtani, Xinchi He, Rose Gamble, and Mauricio Papa. Formal verification of functional requirements for smart contract compositions in supply chain management systems. In Proceedings of the 53rd Hawaii International Conference on System Sciences, 2020. doi:10.24251/HICSS.2020.650.
  • [2] Ashwin Bhaskar and M Praveen. Constraint ltl with remote access. In 43rd IARCS Annual Conference on Foundations of Software Technology and Theoretical Computer Science (FSTTCS 2023), pages 41:1–41:21. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2023. doi:10.4230/LIPIcs.FSTTCS.2023.41.
  • [3] Ashwin Bhaskar and M Praveen. Realizability problem for constraint ltl. Information and Computation, 296:105126, 2024. doi:10.1016/J.IC.2023.105126.
  • [4] Krishnendu Chatterjee and Laurent Doyen. Energy parity games. Theoretical Computer Science, 458:49–60, 2012. doi:10.1016/J.TCS.2012.07.038.
  • [5] Luca De Alfaro and Thomas A Henzinger. Interface automata. ACM SIGSOFT Software Engineering Notes, 26(5):109–120, 2001. doi:10.1145/503209.503226.
  • [6] Aldric Degorre, Laurent Doyen, Raffaella Gentilini, Jean-François Raskin, and Szymon Toruńczyk. Energy and mean-payoff games with imperfect information. In International Workshop on Computer Science Logic, pages 260–274. Springer, 2010. doi:10.1007/978-3-642-15205-4_22.
  • [7] Stéphane Demri and Deepak D’Souza. An automata-theoretic approach to constraint LTL. Information and Computation, 205(3):380–415, 2007. doi:10.1016/j.ic.2006.09.006.
  • [8] Léo Exibard, Emmanuel Filiot, and Ayrat Khalimov. Church synthesis on register automata over linearly ordered data domains. Formal Methods in System Design, 61(2):290–337, 2022. doi:10.1007/S10703-023-00435-W.
  • [9] Erich Gradel and Wolfgang Thomas. Automata, logics, and infinite games: a guide to current research, volume 2500. Springer Science & Business Media, 2002.
  • [10] Lukáš Holík, Malte Isberner, and Bengt Jonsson. Mediator synthesis in a component algebra with data. In Correct System Design: Symposium in Honor of Ernst-Rüdiger Olderog on the Occasion of His 60th Birthday, Oldenburg, Germany, September 8-9, 2015, Proceedings, pages 238–259. Springer, 2015. doi:10.1007/978-3-319-23506-6_16.
  • [11] Gabor Madl, Luis Bathen, German Flores, and Divyesh Jadav. Formal verification of smart contracts using interface automata. In 2019 IEEE International Conference on Blockchain (Blockchain), pages 556–563. IEEE, 2019.
  • [12] Marvin L Minsky. Recursive unsolvability of post’s problem of" tag" and other topics in theory of turing machines. Annals of Mathematics, 74(3):437–455, 1961.
  • [13] Nir Piterman. From nondeterministic büchi and streett automata to deterministic parity automata. Logical Methods in Computer Science, 3, 2007. doi:10.2168/LMCS-3(3:5)2007.
  • [14] Ayleen Schinko, Walter Vogler, Johannes Gareis, N Tri Nguyen, and Gerald Lüttgen. Interface automata for shared memory. Acta Informatica, 59(5):521–556, 2022. doi:10.1007/S00236-021-00408-8.
  • [15] Moshe Y Vardi and Pierre Wolper. An automata-theoretic approach to automatic program verification. In Proceedings of the First Symposium on Logic in Computer Science, pages 322–331. IEEE Computer Society, 1986.

Appendix A Proof of undecidability stated in Section 3

An n-counter machine is a tuple (B,qinit,n,δ) where B is a finite set of states, qinit∈B is an initial state, c1,…,cn are n counters and δ is a finite set of instructions of the form “(q:ci:=ci+1;goto⁢q′)” or “(q:Ifci=0thengotoq′elseci:=ci−1;gotoq′′)” where i∈[1,n] and q,q′,q′′∈B. A configuration of the machine is described by a tuple (q,m1,…,mn) where q∈B and mi∈ℕ is the content of the counter ci. The possible computation steps are defined as follows:

  1. 1.

    (q,m1,…,mn)→(q′,m1,…,mi+1,…,mn) if there is an instruction (q:ci:=ci+1;goto⁢q′). This is called an incrementing transition.

  2. 2.

    (q,m1,…,mn)→(q′,m1,…,mn) if there is an instruction (q:Ifci=0thengotoq′elseci:=ci−1;gotoq′′) and mi=0. This is called a zero testing transition.

  3. 3.

    (q,m1,…,mn)→(q′′,m1,…,mi−1,…,mn) if there is an instruction (q:Ifci=0thengotoq′elseci:=ci−1;gotoq′′) and mi>0. This is called a decrementing transition.

A counter machine is deterministic if for every state q, there is at most one instruction of the form (q:ci:=ci+1;goto⁢q′) or (q:Ifci=0thengotoq′elseci:=ci−1;gotoq′′) where i∈[1,n] and q′,q′′∈B. This ensures that for every configuration (q,m1,…,mn) there exists at most one configuration (q′,m1′,…,mn′) so that (q,m1,…,mn)→(q′,m1′,…,mn′). For our undecidability results we will use deterministic 2-counter machines (i.e., n=2), henceforward just “counter machines”. Given a counter machine (B,q0,2,δ) and two of its states qinit,qfin∈B, the reachability problem is to determine if there is a sequence of transitions of the 2-counter machine starting from the configuration (qinit,0,0) and ending at the configuration (qfin,n1,n2) for some n1,n2∈ℕ. It is known that the reachability problem for deterministic 2-counter machines is undecidable [12]. To simplify our undecidability results we further assume, without any loss of generality, that there exists an instruction t^=(qfin:c1:=c1+1;gotoqfin)∈δ.

Given a counter machine, we design an instance of the interoperability problem for an interface register transition system 𝒮 consisting of just two FSRMs 𝒫 and 𝒬 such that the counter machine reaches the halting configuration iff the answer to the interoperability problem for 𝒮 is a “yes”. Let T be the set of transitions of the counter machine. We construct an interface register transition system 𝒮 whose set of actions A=T∪{D}∪{E} where D,E are special actions. The FSRM 𝒫 consists of states B of the counter machine and has three registers r𝒫0,r𝒫1,r𝒫2. The first register is intended to carry the value 0 and the last two are intended to carry the two counter values.

For every incrementing transition t of the counter machine from q to q′, 𝒫 has an output transition labeled with action t from q to q′. It has the guard r𝒫i<d (syntactic sugar for (r𝒫i≤d)∧¬(d≤r𝒫i)), where ci is the counter incremented by t. The value generated is stored the register r𝒫i. This ensures that the value generated by 𝒫 while executing this transition is strictly greater than the current value of r𝒫i. But we need more work to ensure that the value generated by 𝒫 is exactly one more than the current value of r𝒫i. We will describe later how to achieve this using the other FSRM 𝒬.

For every decrementing or zero testing transition t of the counter machine from q to q′, 𝒫 has an output transition labeled with action t from q to q′. It has the guard d≤r𝒫i, where ci is the counter decremented or tested for zero by t. The generated value is stored in the register r𝒫i.

The FSRM 𝒬 consists of states B∪(B×T)∪{qe}, (where B is the set of states of the counter machine), and four registers r𝒬0,r𝒬1,r𝒬2,r𝒬3. The first register is intended to store the value 0, the next two are intended to store the two counter values and the last one is intended to store the value generated by 𝒫 to be used to detecting simulation errors.

For every incrementing transition t of the counter machine from q to q′, 𝒬 has an input transition labeled with action t from q to q′. The received value is stored in the register r𝒬i, where ci is the counter incremented by t. There is also an input transition labeled t from q to (q′,t), which stores the received value in r𝒬3. From (q′,t), there is an output transition labeled with a special action E (for “error”) to the state qe, with the guard r𝒬i<d∧d<r𝒬3. This forces 𝒬 to generate a value that is strictly between the old value of ci and the new value 𝒫 generated for that counter. If this transition is enabled, it means 𝒫 generated a value that is more than one plus the old value of the counter ci, which is an error. To let the FSRMs continue to operate infinitely, we add an output transition from (q′,t) to itself labeled with a special action D (for “dummy”) and an output transition from qe to itself labeled E.

For every zero testing transition t of the counter machine from q to q′, 𝒬 has an input transition labeled with action t from q to q′. The received value is stored in r𝒬i, where ci is the counter that is tested for zero by t. There is also an input transition labeled t from q to (q′,t), which stores the received value in r𝒬3. From (q′,t), there is an output transition labeled with the action E with the guard r𝒬3≠r𝒬0∨r𝒬i≠r𝒬0. This means that either the new counter value generated by 𝒫 is non-zero or the old value of ci was non-zero, both of which are errors. We add an output transition from (q′,t) to itself labeled with the action D.

For every decrementing transition t of the counter machine from q to q′′, 𝒬 has an input transition labeled with action t from q to q′′. The received value is stored in r𝒬i, where ci is the counter that is decremented by t. There is also an input transition labeled t from q to (q′′,t), which stores the received value in r𝒬3. From (q′′,t), there is an output transition labeled with the action E with the guard (r𝒬3<d∧d<r𝒬i). This forces 𝒬 to check that the value generated by 𝒫 was less than the old value of ci minus one, which is an error. We add an output transition from (q′′,t) to itself labeled with the action D. At every state in 𝒫, we add a transition to itself labeled with the action D and another transition to itself labeled with the action E. Now, adding gadgets to both these FSRMs as described at the end of Section 3 (to avoid finite traces) gives us a set of extra actions A′.

We now construct a CLTL formula ϕ (basically just an LTL formula over the set of actions A∪A′ in this case) that excludes all strings that either containing E or the suffix (a′)ω for some a′∈A′. Among the remaining, it includes those which have at least one occurrence of D or one occurrence of a transition t that leads to the halting state qfin.

Lemma 26.

The halting state is reachable in the counter machine iff the interface register transition system constructed above is interoperable satisfying ϕ.

Proof.

If the halting state is reachable, we can construct a distributed regulator that updates the counter values exactly as the counter machine does. The only traces that respect this regulator are those which faithfully simulate the counter machine and those which execute dummy transitions. Both of these satisfy the formula ϕ.

If the interface register transition system is interoperable, consider a distributed regulator that makes it interoperable. If this regulator provides wrong values of the counter at any point during simulation, some trace respecting the regulator will execute some error transition, which does not satisfy ϕ, a contradiction. Hence, the regulator provides correct counter values. The traces that respect such a regulator are those that execute dummy transitions and the trace that faithfully simulates the counter machine. For this trace to satisfy ϕ, some transition leading to the halting state qfin needs to be included, so the counter machine halts. ◀