Skip to main content
Springer logoLink to Springer
. 2017 Sep 20;51(2):270–307. doi: 10.1007/s10703-017-0297-4

Para2: parameterized path reduction, acceleration, and SMT for reachability in threshold-guarded distributed algorithms

Igor Konnov 1, Marijana Lazić 1, Helmut Veith 1, Josef Widder 1,
PMCID: PMC6959411  PMID: 32009739

Abstract

Automatic verification of threshold-based fault-tolerant distributed algorithms (FTDA) is challenging: FTDAs have multiple parameters that are restricted by arithmetic conditions, the number of processes and faults is parameterized, and the algorithm code is parameterized due to conditions counting the number of received messages. Recently, we introduced a technique that first applies data and counter abstraction and then runs bounded model checking (BMC). Given an FTDA, our technique computes an upper bound on the diameter of the system. This makes BMC complete for reachability properties: it always finds a counterexample, if there is an actual error. To verify state-of-the-art FTDAs, further improvement is needed. In contrast to encoding bounded executions of a counter system over an abstract finite domain in SAT, in this paper, we encode bounded executions over integer counters in SMT. In addition, we introduce a new form of reduction that exploits acceleration and the structure of the FTDAs. This aggressively prunes the execution space to be explored by the solver. In this way, we verified safety of seven FTDAs that were out of reach before.

Keywords: Parameterized verification, Bounded model checking, Completeness, Partial orders in distributed systems, Reduction, Fault-tolerant distributed algorithms, Byzantine faults

Introduction

Replication is a classic approach to make computing systems more reliable. In order to avoid a single point of failure, one uses multiple processes in a distributed system. Then, if some of these processes fail (e.g., by crashing or deviating from their expected behavior) the distributed system as a whole should stay operational. For this purpose one uses fault-tolerant distributed algorithms (FTDAs). These algorithms have been extensively studied in distributed computing theory [1, 50], and found application in safety critical systems (automotive or aeronautic industry). With the recent advent of data centers and cloud computing we observe growing interest in fault-tolerant distributed algorithms, and their correctness, also for more mainstream computer science applications [19, 20, 31, 47, 52, 54, 60].

We consider automatic verification techniques specifically for threshold-based fault-tolerant distributed algorithms. In these algorithms, processes collect messages from their peers, and check whether the number of received messages reaches a threshold, e.g., a threshold may ensure that acknowledgments from a majority of processes have been received. Waiting for majorities, or more generally waiting for quorums, is a key pattern of many fault-tolerant algorithms, e.g., consensus, replicated state machine, and atomic commit. In [34] we introduced an efficient encoding of these algorithms, which we used in [33] for abstraction-based parameterized model checking of safety and liveness of several case study algorithms, which are parameterized in the number of processes n and the fraction of faults t, e.g., n>3t. In [41] we were able to verify reachability properties of more involved algorithms by applying bounded model checking. We showed how to make bounded model checking complete in the parameterized case. In particular, we considered counter systems where we record for each local state, how many processes are in this state. We have one counter per local state , denoted by κ[]. A process step from local state  to local state  is modeled by decrementing κ[] and incrementing κ[]. When δ processes perform the same step one after the other, we allow the processes to do the accelerated step that instantaneously changes the two affected counters by δ. The number δ is called acceleration factor, which can vary in a single run.

As we focus on threshold-based FTDAs, we consider counter systems defined by threshold automata. Here, transitions are guarded by threshold guards that compare a shared integer variable to a linear combination of parameters, e.g., xn-t or x<t, where x is a shared variable and n and t are parameters.

Completeness of the method [41] with respect to reachability is shown by proving a bound on the diameter of the accelerated system. Inspired by Lamport’s view of distributed computation as partial order on events [43], our method uses a reduction similar to Lipton’s [48]. Instead of pruning executions that are “similar” to ones explored before as in partial order reduction [28, 53, 59], we use the partial order to show (offline) that every run has a similar run of bounded length. Interestingly, the bound is independent of the parameters. In [41], we introduced the following automated method, which combines this idea with data abstraction [33]:

  1. Apply a parametric data abstraction to the process code to get a finite state process description, and construct the threshold automaton (TA) [33, 36].

  2. Compute the diameter bound, based on the control flow of the TA.

  3. Construct a system with abstract counters, i.e., a counter abstraction [33, 55].

  4. Perform SAT-based bounded model checking [6, 16] up to the diameter bound, to check whether bad states are reached in the counter abstraction.

  5. If a counterexample is found, check its feasibility and refine, if needed [13, 33].

Figure 1 gives on top a diagram [40] that shows the technique based on counter abstraction. While this allowed us to automatically verify several FTDAs not verified before, there remained two bottlenecks for scalability to larger and more complex protocols: First, counter abstraction can lead to spurious counterexamples. As counters range over a finite abstract domain, the semantics of abstract increment and decrements on the counters introduce non-determinism. For instance, the value of a counter can remain unchanged after applying an increment. Intuitively, processes or messages can be “added” or “lost”, which results in that, e.g., in the abstract model the number of messages sent is smaller than the number of processes that have sent a message, which obviously is spurious behavior. Second, counter abstraction works well in practice only for processes with a few dozens of local states. It has been observed in [4] that counter abstraction does not scale to hundreds of local states. We had similar experience with counter abstraction in our experiments in [41]. We conjecture that this is partly due to the many different interleavings, which result in a large search space.

Fig. 1.

Fig. 1

Tool chain with counter abstraction [27, 33, 41] on top, and with SMT-based bounded model checking on bottom

To address these bottlenecks, we make two crucial contributions in this paper:

  1. To eliminate one of the two sources of spurious counterexamples, namely, the non-determinism added by abstract counters, we do bounded model checking using SMT solvers with linear integer arithmetic on the accelerated system, instead of SAT-based bounded model checking on the counter abstraction.

  2. We reduce the search space dramatically: we introduce the notion of an execution schema that is defined as a sequence of local rules of the TA. By assigning to each rule of a schema an acceleration factor (possibly 0, which models that no process executes the rule), one obtains a run of the counter system. Hence, due to parameterization, each schema represents infinitely many runs. We show how to construct a set of schemas whose set of reachable states coincides with the set of reachable states of the accelerated counter system.

The resulting method is depicted at the bottom of Fig. 1. Our construction can be seen as an aggressive form of reduction, where each run has a similar run generated by a schema from the set. To show this, we capture the guards that are locked and unlocked in a context. Our key insight is that a bounded number of transitions changes the context in each run. For example, of all transitions increasing a variable x, at most one makes xn-t true, and at most one makes x<t+1 false (the parameters n and t are fixed in a run, and shared variables can only be increased). We fix those transitions that change the context, and apply the ideas of reduction to the subexecutions between these transitions.

Our experiments show that SMT solvers and schemas outperform SAT solvers and counter abstraction in parameterized verification of threshold-based FTDAs. We verified safety of FTDAs [10, 18, 29, 51, 56, 57] that have not been automatically verified before. In addition we achieved dramatic speedup and reduced memory footprint for FTDAs [9, 12, 58] which previously were verified in [41].

In this article we focus on parameterized reachability properties. Recently, we extended this approach to safety and liveness, for which we used the reachability technique of this article as a black box [37].

Our approach at a glance

For modeling threshold-based FTDAs, we use threshold automata that were introduced in [38, 41] and are discussed in more detail in [40]. We use Fig. 2 to describe our contributions in this section. The figure presents a threshold automaton TA over two shared variables x and y and parameters nt, and f, which is inspired by the distributed asynchronous broadcast protocol from [9]. There, n-f correct processes concurrently follow the control flow of TA, and f processes are Byzantine faulty. As is typical for FTDAs, the parameters must satisfy a resilience condition, e.g., n>3ttf0, that is, less than a third of the processes are faulty. The circles depict the local states 1,,5, two of them are the initial states 1 and 2. The edges depict the rules r1,,r6 labeled with guarded commands φact, where φ is one of the threshold guards “φ1:x(n+t)/2-f”, “φ2:y(t+1)-f”, and “φ3:y(2t+1)-f”, and an action act increases the shared variables (x and y) by one, or zero (as in rule r6).

Fig. 2.

Fig. 2

An example threshold automaton with threshold guards “φ1:x(n+t)/2-f”, “φ2:y(t+1)-f”, and “φ3:y(2t+1)-f

We associate with every local state i a non-negative counter κ[i] that represents the number of processes in i. Together with the values of x, y, n, t, and f, the values of the counters constitute a configuration of the system. In the initial configuration there are n-f processes in initial states, i.e., κ[1]+κ[2]=n-f, and the other counters and the shared variables x and y are zero.

The rules define the transitions of the counter system. For example, according to the rule r2, if in the current configuration the guard yt+1-f holds true and κ[1]5, then five processes can instantaneously move out of the local state 1 to the local state 3, and increment x as prescribed by the action of r2 (since the evaluation of the guard yt+1-f cannot change from true to false). This results in increasing x and κ[3] by five, and decreasing the counter κ[1] by five. When, as in our example, rule r2 is conceptually executed by 5 processes, we denote this transition by (r2,5), where 5 is the acceleration factor. A sequence of transitions forms a schedule, e.g., (r1,2),(r3,1),(r1,1).

In this paper, we address a parameterized reachability problem, e.g., can at least one correct process reach the local state 5, when n-f correct processes start in the local state 1? Or, in terms of counter systems, is a configuration with κ[5]0 reachable from an initial configuration with κ[1]=n-fκ[2]=0? As discussed in [41], acceleration does not affect reachability, and precise treatment of the resilience condition and threshold guards is crucial for solving this problem.

Schemas

When applied to a configuration, a schedule generates a path, that is, an alternating sequence of configurations and transitions. As initially x and y are zero, threshold guards φ1, φ2, and φ3 evaluate to false. As rules may increase variables, these guards may eventually become true. In our example we do not consider guards like x<t+1 that are initially true and become false, although we formally treat them in our technique. In fact, initially only r1 is unlocked. Because r1 increases x, it may unlock φ1. Thus r4 becomes unlocked. Rule r4 increases y and thus repeated application of r4 (by different processes) first unlocks φ2 and then φ3. We introduce a notion of a context that is the set of threshold guards that evaluate to true in a configuration. For our example we observe that each path goes through the following sequence of contexts {}, {φ1}, {φ1,φ2}, and {φ1,φ2,φ3}. In fact, the sequence of contexts in a path is always monotonic, as the shared variables can only be increased.

The conjunction of the guards in the context {φ1,φ2} implies the guards of the rules r1,r2,r3,r4,r5; we call these rules unlocked in the context. This motivates our definition of a schema: a sequence of contexts and rules. We give an example of a schema below, where inside the curly brackets we give the contexts, and fixed sequences of rules in between. (We discuss the underlined rules below.)

graphic file with name 10703_2017_297_Equ1_HTML.gif 2.1

Given a schema, we can generate a schedule by attaching to each rule an acceleration factor, which can possibly be 0. For instance, if we attach non-zero factors to the underlined rules in S, and a zero factor to the other rules, we generate the following schedule τ (we omit the transitions with 0 factors here).

graphic file with name 10703_2017_297_Equ2_HTML.gif 2.2

It can easily be checked that τ is generated by schema S, because the sequence of the underlined rules in S matches the sequence of rules appearing in τ.

In this paper, we show that the schedules generated by a few schemas —one per each monotonic sequence of contexts —span the set of all reachable configurations. To this end, we apply reduction and acceleration to relate arbitrary schedules to their representatives, which are generated by schemas.

Reduction and acceleration

In this section we show what we mean by a schedule being “related” to its representative. Consider, e.g., the following schedule τ from the initial state σ0 with n=5, t=f=1, κ[1]=1, and κ[2]=3:

graphic file with name 10703_2017_297_Equ45_HTML.gif

Observe that after (r1,1),(r1,1), variable x=2, and thus φ1 is true. Hence transition t1 changes the context from {} to {φ1}. Similarly t2 and t3 change the context. Context changing transitions are marked with curly brackets. Between them we have the subschedules τ1,,τ4 (τ3 is empty) marked with square brackets.

To show that this schedule is captured by the schema (2.1), we apply partial order arguments —that is, a mover analysis [48] —regarding distributed computations: As the guards φ2 and φ3 evaluate to true in τ4, and r5 precedes r6 in the control flow of the TA, all transitions (r5,1) can be moved to the left in τ4. Similarly, (r1,1) can be moved to the left in τ2. The resulting schedule is applicable and leads to the same configuration as the original one. Further, we can accelerate the adjacent transitions with the same rule, e.g., the sequence (r5,1),(r5,1) can be transformed into (r5,2). Thus, we transform subschedules τi into τi, and arrive at the schedule τ from Eq. (2.2), which we call the representative schedule of τ. As the representative schedule τ is generated from the schema in (2.1), we say that the schema captures schedule τ. (It also captures τ.) Importantly for reachability checking, if τ and τ are applied to the same configuration, they end in the same configuration. These arguments are formalized in Sects. 5, 6 and 7.

Encoding a schema in SMT

One of the key insights in this paper is that reachability checking via schemas can be encoded efficiently as SMT queries in linear integer arithmetic. In more detail, finite paths of counter systems can be expressed with inequalities over counters such as κ[2] and κ[3], shared variables such as x and y, parameters such as nt, and f, and acceleration factors. Also, threshold guards and resilience conditions are expressions in linear integer arithmetic.

We give an example of reachability checking with SMT using the simple schema {}r1,r1{φ1} which is contained in the schema S in Eq. (2.1). To obtain a complete encoding for S, one can similarly encode the other simple schemas and combine them.

To this end, we have to express constraints on three configurations σ0, σ1, and σ2. For the initial configuration σ0, we introduce integer variables: κ10,,κ50 for local state counters, x0 and y0 for shared variables, and n, t, and f for parameters. As is written in Eq. (2.3), the configuration σ0 should satisfy the initial constraints, and its context should be empty (that is, all guards evaluate to false):

κ10+κ20=n-fκ30=κ40=κ50=0x0=y0=0n3ttf0(¬φ1¬φ2¬φ3)[x0/x,y0/y] 2.3

The configuration σ1 is reached from σ0 by applying a transition with the rule r1 and an acceleration factor δ1, and the configuration σ2 is reached from σ1 by applying a transition with the rule r1 and an acceleration factor δ2. Applying transition with the rule r1 to σ0 just means to increase both κ[3] and x by δ1 and decrease κ[2] by δ1. Hence, we introduce four fresh variables per transition and add the arithmetic operations. According to the schema, configuration σ2 has the context {φ2}. The following equations express these constraints1:

κ31=κ30+δ1κ21=κ20-δ1x1=x0+δ1 2.4
κ32=κ31+δ2κ22=κ21-δ2x2=x1+δ2(φ1¬φ2¬φ3)[x2/x,y0/y] 2.5

Finally, we express the reachability question for all paths generated by the simple schema {}r1,r1{φ1}. Whether there is a configuration with κ[5]0 reachable from an initial configuration with κ[1]=n-f and κ[2]=0 can then be encoded as:

κ10=n-fκ20=0κ500 2.6

Note that we check only κ50 against zero, as the local state 5 is never updated by the rule r1. It is easy to see that conjunction of Eqs. (2.3)–(2.6) does not have a solution, and thus all paths generated by the schema {}r1,r1{φ1} do not reach a configuration with κ[5]0. By writing down constraints for the other three simple schemas in Eq. (2.1), we can check reachability for the paths generated by the whole schema as well. As discussed in Sect. 2.1, our results also imply reachability on all paths whose representatives are generated by the schema. More details on the SMT encoding can be found in Sect. 9.

Parameterized counter systems

We recall the framework of [41] to the extent necessary, and extend it with the notion of a context in Sect. 3.2. A threshold automaton describes a process in a concurrent system, and is a tuple Inline graphic defined below.

The finite set L contains the local states, and IL is the set of initial states. The finite set Γ contains the shared variables that range over the natural numbers N0. The finite set Π is a set of parameter variables that range over N0, and the resilience condition RC is a formula over parameter variables in linear integer arithmetic, e.g., n>3t. The set of admissible parameters is Inline graphic.

A key ingredient of threshold automata are threshold guards (or, just guards):

Definition 3.1

A threshold guard is an inequality of one of the following two forms:

(R)

xa0+a1·p1++a|Π|·p|Π|, or

(F)

x<a0+a1·p1++a|Π|·p|Π|,

where xΓ is a shared variable, a0,,a|Π|Z are integer coefficients, and p1,,p|Π|Π are parameters. We denote the set of all guards of the form (R) by Φrise, and the set of all guards of the form (F) by Φfall.

A rule defines a conditional transition between local states that may update the shared variables. Formally, a rule is a tuple (from,to,φrise,φfall,u): the local states from and to are from L. (Intuitively, they capture from which local state to which a process moves.) A rule is only executed if the conditions φrise and φfall evaluate to true. Condition φrise is a conjunction of guards from Φrise, and φfall is a conjunction of guards from Φfall (cf. Definition 3.1). We denote the set of guards used in φrise by guard(φrise), and guard(φfall) is the set of guards used in φfall.

Rules may increase shared variables using an update vector uN0|Γ| that is added to the vector of shared variables. As uN0|Γ|, global variables can only be increased or left unchanged. As will be later formalized in Proposition 3.1, guards from Φrise can only change from false to true (rise), and guards from Φfall can change from true to false (fall). Finally, R is the finite set of rules. We use the dot notation to refer to components of rules, e.g., r.from or r.u.

Example 3.1

In Fig. 2, the rule r2:φ2x++ that describes a transition from 1 to 3, can formally be written as (1,3,φ2,,(1,0)). Its intuitive meaning is as follows. If the guard φ2:y(t+1)-f evaluates to true, a process can move from the local state 1 to the local state 3, and the global variable x is incremented, while y remains unchanged. We formalize the semantics as counter systems in Sect. 3.1.

Definition 3.2

Given a threshold automaton (L,I,Γ,Π,R,RC), we define the precedence relation Inline graphic: for a pair of rules r1,r2R, it holds that r1Pr2 if and only if r1.to=r2.from. We denote by P+ the transitive closure of P. Further, we say that r1Pr2, if r1P+r2r2P+r1, or r1=r2.

Assumption 3.3

We limit ourselves to threshold automata relevant for FTDAs, i.e., those where r.u=0 for all rules rR that satisfy rP+r. Such automata were called canonical in [41].

Remark 3.1

We use threshold automata to model fault-tolerant distributed algorithms that count messages from distinct senders. These algorithms are based on an “idealistic” reliable communication assumption (no message loss); these assumptions are typically expected to be ensured by “lower level bookkeeping code”, e.g., communication protocols. As a result, the algorithms we consider here do not gain from sending the same message (that is, increasing a variable) inside a loop, so that we can focus on threshold automata that do not increase shared variables in loops.

Example 3.2

In the threshold automaton from Fig. 3 we have that r2Pr3Pr4Pr5Pr6Pr8Pr2. Thus, we have that r2P+r2. In our case this implies that r2.u=0 by definition. Similarly we can conclude that r3.u=r4.u=r5.u=r6.u=r7.u=r8.u=0.

Fig. 3.

Fig. 3

A threshold automaton TA with local states L={i:1i9} and rules R={ri:1i11}. The rules drawn with solid arrows {r2,,r8} constitute a single equivalence class, while all other rules are singleton equivalence classes

Looplets The relation P defines equivalence classes of rules. An equivalence class corresponds to a loop or to a single rule that is not part of a loop. Hence, we use the term looplet for one such equivalence class. For a given set of rules R let R/ be the set of equivalence classes defined by P. We denote by [r] the equivalence class of rule r. For two classes c1 and c2 from R/ we write Inline graphic iff there are two rules r1 and r2 in R satisfying [r1]=c1 and [r2]=c2 and r1P+r2 and r1Pr2. As the relation Inline graphic is a strict partial order, there are linear extensions of Inline graphic. Below, we fix an arbitrary of these linear extensions to sort transitions in a schedule: We denote by Inline graphic a linear extension of Inline graphic.

Example 3.3

Consider Fig. 3. The threshold automaton has five looplets: c1={r1}, c2={r2,,r8}, c3={r9}, c4={r10}, and c5={r11}. From r9Pr10, it follows that Inline graphic, and from r4P+r10, it follows that Inline graphic. We can pick two linear extensions of Inline graphic, denoted by Inline graphic and Inline graphic. We have Inline graphic, and Inline graphic. In this paper we always fix one linear extension.

Remark 3.2

It may seem natural to collapse such loops into singleton local states. In our case studies, e.g, [29], non-trivial loops are used to express non-deterministic choice due to failure detectors [12], as shown in Fig. 4. Importantly, some local states inside the loops appear in the specifications. Thus, one would have to use arguments from distributed computing to characterize when collapsing states is sound. In this paper, we present a technique that deals with the loops without need for additional modelling arguments.

Fig. 4.

Fig. 4

A typical structure found in threshold automata that model fault-tolerant algorithms with a failure detector [12]. The gray circles depict those local states, where the failure detector reports a crash. The local states i and i differ only in the output of the failure detector. As the failure detector output changes non-deterministically, the threshold automaton contains loops of size two

Counter systems

We use a function N:PRCN0 to capture the number of processes for each combination of parameters. As we use SMT, we assume that N can be expressed in linear integer arithmetic. For instance, if only correct processes are explictly modeled we typically have N(n,t,f)=n-f, and the respective SMT expression is n-f. Given N, a threshold automaton TA, and admissible parameter values pPRC, we define a counter system as a transition system (Σ,I,R). It consists of the set of configurations Σ, which contain evaluations of the counters and variables, the set of initial configurations I, and the transition relation R:

Configurations Σ and I A configuration σ=(κ,g,p) consists of a vector of counter values σ.κN0|L| (for simplicity we use the convention that L={1,,|L|}) a vector of shared variable values σ.gN0|Γ|, and a vector of parameter values σ.p=p. The set Σ is the set of all configurations. The set of initial configurations I contains the configurations that satisfy σ.g=0, iIσ.κ[i]=N(p), and iIσ.κ[i]=0. This means that in every initial configuration all global variables have zero values, and all N(p) modeled processes are located only in the initial local states.

Example 3.4

Consider the threshold automaton from Fig. 2 with the initial states 1 and 2. Let us consider a system of five processes, one of them being Byzantine faulty. Thus, n=5, t=f=1, and we explicitely model N(5,1,1)=n-f=4 correct processes. One of the initial configurations is σ=(κ,g,p), where σ.κ=(1,3,0,0,0), σ.g=(0,0), and σ.p=(5,1,1). In other words, there is one process in 1, three processes in 2, and global variables are initially x=y=0. Note that iIσ.κ[i]=κ[1]+κ[2]=1+3=4=N(5,1,1).

Transition relation R A transition is a pair t=(rule,factor) of a rule of the TA and a non-negative integer called the acceleration factor, or just factor for short. (As already discussed in Sect. 2.1, we will use the zero factors when generating schedules from schemas.) For a transition t=(rule,factor) we refer by t.u to rule.u, and by t.φfall to rule.φfall, etc. We say a transition t is unlocked in configuration σ if (σ.κ,σ.g+k·t.u,σ.p)t.φriset.φfall, for k{0,,t.factor-1}. Note that here we use a notation that a configuration satisfies a formula, which is considered true if and only if the formula becomes true when all free variables of the formulas are evaluated as in the configuration.

We say that transition t is applicable (or enabled) in configuration σ, if it is unlocked, and σ.κ[t.from]t.factor. (As all counters are non-negative, a transition with the zero factor is always applicable to all configurations provided that the guards are unlocked.) We say that σ is the result of applying the enabled transition t to σ, and write σ=t(σ), if

  • σ.g=σ.g+t.factor·t.u and σ.p=σ.p

  • if t.fromt.to then
    • σ.κ[t.from]=σ.κ[t.from]-t.factor,
    • σ.κ[t.to]=σ.κ[t.to]+t.factor, and
    • L\{t.from,t.to} it holds that σ.κ[]=σ.κ[]
  • if t.from=t.to then σ.κ=σ.κ

The transition relation RΣ×Σ of the counter system is defined as follows: (σ,σ)R iff there is a rule rR and a factor kN0 such that σ=t(σ) for t=(r,k). Updates do not decrease the values of shared variables, and thus the following proposition was introduced in [41]:

Proposition 3.1

[41] For all configurations σ, all rules r, and all transitions t applicable to σ, the following holds:

1.  If σr.φrise then t(σ)r.φrise             3.  If σr.φfall then t(σ)r.φfall

2.  If t(σ)r.φrise then σr.φrise             4.  If t(σ)r.φfall then σr.φfall

Schedules and paths A schedule is a (finite) sequence of transitions. For a schedule τ and an index i:1i|τ|, by τ[i] we denote the ith transition of τ, and by τi we denote the prefix τ[1],,τ[i] of τ. A schedule τ=t1,,tm is applicable to configuration σ0, if there is a sequence of configurations σ1,,σm with σi=ti(σi-1) for 1im. If there is a ti.factor>1, then a schedule is accelerated.

By τ·τ we denote the concatenation of two schedules τ and τ. A sequence σ0,t1,σ1,,σk-1,tk,σk of alternating configurations and transitions is called a (finite) path, if transition ti is enabled in σi-1 and σi=ti(σi-1), for 1ik. For a configuration σ0 and a schedule τ applicable to σ0, by path(σ0,τ) we denote the path σ0,t1,,t|τ|,σ|τ| with ti=τ[i] and σi=ti(σi-1), for 1i|τ|.

Contexts and slices

The evaluation of the guards in the sets Φrise and Φfall in a configuration solely defines whether certain transitions are unlocked (but not necessarily enabled). From Proposition 3.1, one can see that after a transition has been applied, more guards from Φrise may get unlocked and more guards from Φfall may get locked. In other words, more guards from Φrise may evaluate to true and more guards from Φfall may evaluate to false. To capture this intuition, we define:

Definition 3.4

A context Ω is a pair (Ωrise,Ωfall) with ΩriseΦrise and ΩfallΦfall. We denote by |Ω|=|Ωrise|+|Ωfall|.

For two contexts (Ω1rise,Ω1fall) and (Ω2rise,Ω2fall), we define that (Ω1rise,Ω1fall)(Ω2rise,Ω2fall) if and only if Ω1riseΩ1fallΩ2riseΩ2fall. Then, a sequence of contexts Ω1,,Ωm is monotonically increasing, if ΩiΩi+1, for 1i<m. Further, a monotonically increasing sequence of contexts Ω1,,Ωm is maximal, if Ω1=(,) and Ωm=(Φrise,Φfall) and |Ωi+1|=|Ωi|+1, for 1i<m. We obtain:

Proposition 3.2

Every maximal monotonically increasing sequence of contexts is of length |Φrise|+|Φfall|+1. There are at most (|Φrise|+|Φfall|)! such sequences.

Example 3.5

For the example in Fig. 2, we have Φrise={φ1,φ2,φ3}, and Φfall=. Thus, there are (|Φrise|+|Φfall|)!=6 maximal monotonically increasing sequences of contexts. Two of them are (,)({φ1},)({φ1,φ2},)({φ1,φ2,φ3},) and (,)({φ3},)({φ1,φ3},)({φ1,φ2,φ3},). All of them have length |Φrise|+|Φfall|+1=4.

To every configuration σ, we attach the context consisting of all guards in Φrise that evaluate to true in σ, and all guards in Φfall that evaluate to false in σ:

Definition 3.5

Given a threshold automaton, we define its configuration context as a function ω:Σ2Φrise×2Φfall that for each configuration σΣ gives a context (Ωrise,Ωfall) with Ωrise={φΦrise:σφ} and Ωfall={φΦfall:σφ}.

The following monotonicity result is a direct consequence of Proposition 3.1.

Proposition 3.3

If a transition t is enabled in a configuration σ, then either ω(σ)ω(t(σ)), or ω(σ)=ω(t(σ)).

Definition 3.6

A schedule τ is steady for a configuration σ, if for every prefix τ of τ, the context does not change, i.e., ω(τ(σ))=ω(σ).

Proposition 3.4

A schedule τ is steady for a configuration σ if and only if ω(σ)=ω(τ(σ)).

In the following definition, we associate a sequence of contexts with a path:

Definition 3.7

Given a configuration σ and a schedule τ applicable to σ, we say that path(σ,τ) is consistent with a sequence of contexts Ω1,,Ωm, if there exist indices n0,,nm, with 0=n0n1nm=|τ|+1, such that for every k, 1km, and every i with nk-1i<nk, it holds that ω(τi(σ))=Ωk.

Every path is consistent with a uniquely defined maximal monotonically increasing sequence of contexts. (Some of the indices n0,,nm in Definition 3.7 may be equal.) In Sect. 4, we use such sequences of contexts to construct a schema recognizing many paths that are consistent with the same sequence of contexts.

A context defines which rules of the TA are unlocked. A schedule that is steady for a configuration visits only one context, and thus we can statically remove TA’s rules that are locked in the context:

Definition 3.8

Given a threshold automaton TA=(L,I,Γ,Π,R,RC) and a context Ω, we define the slice of TA with context Ω=(Ωrise,Ωfall) as a threshold automaton TA|Ω=(L,I,Γ,Π,R|Ω,RC), where a rule rR belongs to R|Ω if and only if (φΩriseφ)r.φrise and (ψΦfall\Ωfallψ)r.φfall.

In other words, R|Ω contains those and only those rules r with guards that evaluate to true in all configurations σ with ω(σ)=Ω. These are exactly the guards from Ωrise(Φfall\Ωfall). When ω(σ)=Ω, then all guards from Ωrise evaluate to true, and then r.φrise must also be true. As Ωfall contains those guards from Φfall that evaluate to false in σ, then all other guards from Φfall must evaluate to true, and then r.φfall must be true too. Figure 5 shows an example of a slice.

Fig. 5.

Fig. 5

The slice of the TA in Fig. 2 that is constructed for the context ({φ2},)

Model checking problem: parameterized reachability

Given a threshold automaton TA, a state property B is a Boolean combination of formulas that have the form iYκ[i]=0, for some YL. The parameterized reachability problem is to decide whether there are parameter values pPRC, an initial configuration σ0I, with σ0.p=p, and a schedule τ, such that τ is applicable to σ0, and property B holds in the final state: τ(σ0)B.

Main result: a complete set of schemas

To address parameterized reachability, we introduce schemas, i.e., alternating sequences of contexts and rule sequences. A schema serves as a pattern for a set of paths, and is used to efficiently encode parameterized reachability in SMT. As parameters give rise to infinitely many initial states, a schema captures an infinite set of paths. We show how to construct a finite set of schemas S with the following property: for each schedule τ and each configuration σ there is a representative schedule s(τ) such that: (1) applying s(τ) to σ results in τ(σ), and (2) path(σ,s(τ)) is generated by a schema from S.

Definition 4.1

A schema is a sequence Ω0,ρ1,Ω1,,ρm,Ωm of alternating contexts and rule sequences. We often write {Ω0}ρ1{Ω1}{Ωm-1}ρm{Ωm} for a schema. A schema with two contexts is called simple.

Given two schemas S1=Ω0,ρ1,,ρk,Ωk and S2=Ω0,ρ1,,ρm,Ωm with Ωk=Ω0, we define their composition S1S2 to be the schema that is obtained by concatenation of the two sequences: Ω0,ρ1,,ρk,Ω0,ρ1,,ρm,Ωm.

Definition 4.2

Given a configuration σ and a schedule τ applicable to σ, we say that path(σ,τ) is generated by a simple schema {Ω}ρ{Ω}, if the following hold:

  • For ρ=r1,,rk there is a monotonically increasing sequence of indices i(1),,i(m), i.e., 1i(1)<<i(m)k, and there are factors f1,,fm0, so that schedule (ri(1),f1),,(ri(m),fm)=τ.

  • The first and the last states match the contexts: ω(σ)=Ω and ω(τ(σ))=Ω.

In general, we say that path(σ,τ) is generated by a schema S, if S=S1Sk for simple schemas S1,,Sk and τ=τ1τk such that each path(πi(σ),τi) is generated by the simple schema Si, for πi=τ1τi-1 and 1ik.

Remark 4.1

Definition 4.2 allows schemas to generate paths that have transitions with zero acceleration factors. Applying a transition with a zero factor to a configuration σ results in the same configuration σ, which corresponds to a stuttering step. This does not affect reachability. In the following, we will apply Definition 4.2 to representative paths that may have transitions with zero factors.

Example 4.1

Let us go back to the example of a schema S and a schedule τ introduced in Eqs. (2.1) and (2.2) in Sect. 2.1. It is easy to see that schema S can be decomposed into four simple schemas S1S4, e.g., S1={}r1,r1{φ1} and S2={φ1}r1,r3,r4,r4{φ1,φ2}. Consider an initial state σ0 with n=5, t=f=1, x=y=0, κ[1]=1, κ[2]=3, and κ[i]=0 for i{3,4,5}. To ensure that path(σ0,τ) is generated by schema S, one has to check Definition 4.2 for schemas S1,,S4 and schedules (τ1·t1), (τ2·t2), (τ3·t3), and τ4, respectively. For instance, path(σ0,τ1·t1) is generated by S1. Indeed, take the sequence of indices 1 and 2 and the sequence of acceleration factors 1 and 1. The path path(σ0,τ1·t1) ends in the configuration σ1 that differs from σ0 in that κ[2]=1, κ[3]=2, and x=2. The contexts ω(σ0)=({},{}) and ω(σ1)=({φ1},{}) match the contexts of schema S1, as required by Definition 4.2.

Similarly, path(σ1,τ2·t2) is generated by schema S2. To see that, compare the contexts and use the index sequence 1, 2, 4, and acceleration factors 1.

The language of a schema S —denoted with L(S) —is the set of all paths generated by S. For a set of configurations CΣ and a set of schemas S, we define the set Reach(C,S) to contain all configurations reachable from C via the paths generated by the schemas from S, i.e., Reach(C,S)={τ(σ)σC,SS.path(σ,τ)L(S)}. We say that a set S of schemas is complete, if for every set of configurations CΣ it is the case that the set of all states reachable from C via the paths generated by the schemas from S, is exactly the set of all possible states reachable from C. Formally, CΣ.{τ(σ)σC,τisapplicabletoσ}=Reach(C,S).

In [41], a quantity C has been introduced that depends on the number of conditions in a TA. It has been shown that for every configuration σ and every schedule τ applicable to σ, there is a schedule τ of length at most d=|R|·(C+1)+C that is also applicable to σ and results in τ(σ) [41, Thm. 8]. Hence, by enumerating all sequences of rules of length up to d, one can construct a complete set of schemas:

Theorem 4.1

For a threshold automaton, there is a complete schema set Sd of cardinality |R||R|·(C+1)+C.

Although the set Sd is finite, enumerating all its elements is impractical. We show that there is a complete set of schemas whose cardinality solely depends on the number of guards that syntactically occur in the TA. These numbers |Φrise| and |Φfall| are in practice much smaller than the number of rules |R|:

Theorem 4.2

For all threshold automata, there exists a complete schema set of cardinality at most (|Φrise|+|Φfall|)!. In this set, the length of each schema does not exceed (3·|ΦriseΦfall|+2)·|R|.

In the following sections we prove the ingredients of the following argument for the theorem: construct the set Z of all maximal monotonically increasing sequences of contexts. From Proposition 3.2, we know that there are at most (|Φrise|+|Φfall|)! maximal monotonically increasing sequences of contexts. Therefore, |Z|(|Φrise|+|Φfall|)!. Then, for each sequence zZ, we do the following:

  1. We show that for each configuration σ and each schedule τ applicable to σ and consistent with the sequence z, there is a schedule s(τ) that has a specific structure, and is also applicable to σ. We call s(τ) the representative of τ. We introduce and formally define this specific structure of representative schedules in Sects. 5, 6 and 7. We prove existence and properties of the representative schedule in Theorem 7.1 (Sect. 7). Before that we consider special cases: when all rules of a schedule belong to the same looplet (Theorem 5.1, Sect. 5), and when a schedule is steady (Theorem 6.1, Sect. 6).

  2. Next we construct a schema (for the sequence z) and show that it generates all paths of all schedules s(τ) found in (1). The length of the schema is at most (3·(|Φrise|+|Φfall|)+2)·|R|. This is shown in Theorem 7.2 (Sect. 7).

Theorem 4.2 follows from the above theorems, which we prove in the following.

Remark 4.2

Let us stress the difference between [41] and this work. From [41], it follows that in order to check correctness of a TA it is sufficient to check only the schedules of bounded length d(TA). The bound d(TA) does not depend on the parameters, and can be computed for each TA. The proofs in [41] demonstrate that every schedule longer than d(TA) can be transformed into an “equivalent” representative schedule, whose length is bounded by d(TA). Consequently, one can treat every schedule of length up to d(TA) as its own representative schedule. Similar reasoning does not apply to the schemas constructed in this paper: (i) we construct a complete set of schemas, whose cardinality is substantially smaller than |Sd|, and (ii) the schemas constructed in this paper can be twice as long as the schemas in Sd.

As discussed in Remark 3.2, the looplets in our case studies are typically either singleton looplets or looplets of size two. In fact, most of our benchmarks have singleton looplets only, and thus their threshold automata can be reduced to directed acyclic graphs. The theoretical constructs of Sect. 5.2 are presented for the more general case of looplets of any size. For most of the benchmarks —the ones not using failure detectors —we need only the simple construction laid out in Sect. 5.1.

Case I: one context and one looplet

We show that for each schedule that uses only the rules from a fixed looplet and does not change its context, there exists a representative schedule of bounded length that reaches the same final state. The goal is to construct a single schema per looplet. The technical challenge is that this single schema must generate representative schedules for all possible schedules, where, intuitively, processes may move arbitrarily between all local states in the looplet. As a consequence, the rules that appear in the representative schedules can differ from the rules that appear in the arbitrary schedules visiting a looplet.

We fix a threshold automaton, a context Ω, a configuration σ with ω(σ)=Ω, a looplet c, and a schedule τ applicable to σ and using only rules from c. We then construct the representative schedule crepcΩ[σ,τ] and the schema cschemacΩ.

The technical details of the construction of crepcΩ[σ,τ] for the case when |c|=1 is given in Sect. 5.1, and for the case when |c|>1 in Sect. 5.2. We show in Sect. 5.3 that these constructions give us a schedule that has the desired properties: it reaches the same final state as the given schedule τ, and its length does not exceed 2·|c|.

Note that in [41], the length of the representative schedule was bounded by |c|. However, all representative schedules of a looplet in this section can be generated by a single looplet schema.

Singleton looplet

Let us consider the case of the looplet c containing only one transition, that is, |c|=1. There is a trivial representative schedule of a single transition:

Lemma 5.1

Given a threshold automaton, a configuration σ, and a schedule τ=(r,f1), ..., (r,fm) applicable to σ, one of the two schedules is also applicable to σ and results in τ(σ): schedule (r,f1++fm), or schedule (r, 0).

Proof

We distinguish two cases:

Case r.to=r.from Then, r.u=0, and τk(σ)=σ for 0k|τ|. Consequently, the schedule (r, 0) is applicable to σ, and it results in τ(σ)=σ.

Case r.tor.from We prove by induction on the length k:1km of a prefix of τ, that the following constraints hold for all k:

(τk(σ)).κ[r.from]=σ.κ[r.from]-(f1++fk) 5.1
(τk(σ)).g=σ.g+(f1++fk)·r.u 5.2
(σ.κ,σ.g+f·r.u,σ.p)r.φfallr.φriseforallf{0,,f1++fk} 5.3

Base case k=1. As schedule τ is applicable to σ, its first transition is enabled in σ. Thus, by the definition of an enabled transition, the rule r is unlocked, i.e., for all f{0,,f1}, it holds (σ.κ,σ.g+f1·r.u,σ.p)r.φfallr.φrise. By the definition, once the transition τ[1] is applied, it holds that τ1(σ).κ[from]=σ.κ[from]-f1 and (τk(σ)).g=σ.g+f1·r.u. Thus, Constraints (5.1)–(5.3) are satisfied for k=1.

Inductive step k>1. As schedule τ is applicable to σ, its prefix τk is applicable to σ. Hence, transition τ[k] is applicable to τk-1(σ).

By the definition of an enabled transition, for all f{0,,fk}, it holds

((τk-1(σ)).κ,((τk-1(σ)).g+f·r.u,σ.p)r.φfallr.φrise.

By applying the Eq. (5.2) for k-1 of the inductive hypothesis, we obtain that for all f{0,,fk}, it holds that (σ.κ,σ.g+(f1++fk-1+f·r.u,σ.p)r.φfallr.φrise. By combining this constraint with the constraint (5.3) for k-1, we arrive at the constraint (5.3) for k.

By applying τ[k], we get that (τk(σ)).κ[r.from]=(τk-1(σ)).κ[r.from]-fk and (τk(σ)).g=(τk-1(σ)).g+fk·r.u. By applying (5.1) and (5.2) for k-1 to these equations, we arrive at the Eqs. (5.1) and (5.2) for k.

Based on (5.1) and (5.3) for all values of k, and in particular k=m, we can now show applicability. From Eq. (5.1), we immediately obtain that σ.κ[r.from]f1++fm. From constraint (5.3), we obtain that (σ.κ,σ.g+f·r.u,σ.p)r.φfallr.φrise for all f{0,,f1++fm}. These are the required conditions for the transition (r,f1++fm) to be applicable to the configuration σ.

Consequently, when c has a single rule r, for configuration σ and a schedule τ=(r,f1),,(r,fm), Lemma 5.1 allows us to take the singleton schedule (rf) as crepcΩ[σ,τ] and to take the singleton schema {Ω}r{Ω} as cschemacΩ. The factor f is either f1++fm or zero.

Non-singleton looplet

Next we focus on non-singleton looplets. Thus, we assume that |c|>1. Our construction is based on two directed trees, whose undirected versions are spanning trees, sharing the same root. In order to find a representative of a steady schedule τ which leads from σ to τ(σ), we determine for each local state how many processes have to move in or out of the state, and then we move them along the edges of the trees. First, we give the definitions of such trees, and then we show how to use them to construct the representative schedules and the schema.

Spanning out-trees and in-trees

We construct the underlying graph of looplet c, that is, a directed graph Gc, whose vertices consist of local states that appear as components from or to of the rules from c, and the edges are the rules of c. More precisely, we construct a directed graph Gc=(Vc,Ec,Lc), whose edges from Ec are labeled by function Lc:Ecc with the rules of c as follows:

Vc={rc,r.to=r.from=},Ec={(,)rc,r.from=,r.to=},Lc((,))=r,ifr.from=,r.to=for(,)Ecandrc.

Lemma 5.2

Given a threshold automaton and a non-singleton looplet cR/, graph Gc is non-empty and strongly connected.

Proof

As, |c|>1 and thus Ec2, graph Gc is non-empty. To prove that Gc is strongly connected, we consider a pair of rules r1,r2c. By the definition of a looplet, it holds that r1P+r2 and r2P+r1. Thus, there is a path in Gc from r1.to to r2.from, and there is a path in Gc from r2.to to r1.from. As r1 and r2 correspond to some edges in Gc, there is a cycle that contains the vertices r1.from, r1.to, r2.from, and r2.to. Thus, graph Gc is strongly connected.

As Gc is non-empty and strongly connected, we can fix an arbitrary node hVc —called a hub —and construct two directed trees, whose undirected versions are spanning trees of the undirected version of Gc. These are two subgraphs of Gc: a directed tree Tout=(Vc,Eout), whose edges EoutEc are pointing away from h (out-tree); a directed tree Tin=(Vc,Ein), whose edges EinEc are pointing to h (in-tree). For every node vVc\{h}, it holds that |{u:(u,v)Eout}|=1 and |{w:(v,w)Ein}|=1.

Further, we fix a topological order in on the edges of tree Tin. More precisely, in is such a partial order on Ein that for each pair of adjacent edges (,),(,)Ein, it holds that (,)in(,). In the same way, we fix a topological order out on the edges of tree Tout.

Example 5.1

Consider again the threshold automaton from Example 3.3 and Fig. 3. We construct trees Tin and Tout for looplet c2, shown in Fig. 6.

Fig. 6.

Fig. 6

The underlying graph of the looplet c2 of the threshold automaton from Example 3.3 and Fig. 3 (left), together with trees Tin (middle) and Tout (right)

Note that Vc={2,3,4,5,6}, and Ec={(2,3),(3,5),(5,6),(6,4), (4,4),(4,5),(4,2)}. Fix 4 as a hub. We can fix a linear order in such that (2,3)in(3,5)in(5,6)in(6,4), and a linear order out such that (4,2)out(2,3)out(4,5)out(5,6).

Note that for the chosen hub l4 and this specific example, Tin and in are uniquely defined, while an out-tree can be different from Tout from our Fig. 6 (the rules r8,r2,r3,r4 constitute a different tree from the same hub). Because out-tree Tout is not a chain, several linear orders different from out can be chosen, e.g., (4,2)out(4,5)out(2,3)out(5,6).

Representatives of non-singleton looplets

Using these trees, we show how to construct a representative crepcΩ[σ,τ] of a schedule τ applicable to σ with σ=τ(σ). For a configuration σ and a schedule τ applicable to σ, consider the trees Tin and Tout. We construct two sequences: the sequence ein(1),,ein(|Ein|) of all edges of Tin following the order in, i.e., if ein(i)inein(j), then ij; the sequence eout(1),,eout(|Eout|) of all edges of Tout following the order out. Further, we define the sequence of rules rin(1),,rin(|Ein|) with rin(i)=Lc(ein(i)) for 1i|Ein|, and the sequence of rules rout(1),,rout(|Eout|) with rout(i)=Lc(eout(i)) for 1i|Eout|. Using configurations σ and σ=τ(σ), we define:

δin(i)=σ.κ[f]-σ.κ[f],forf=rin(i).fromand1i|Ein|,δout(j)=σ.κ[t]-σ.κ[t],fort=rout(j).toand1j|Eout|.

If δin(i)0, then δin(i) processes should leave the local state rin(i).from towards the hub, and they do it exclusively using the edge ein(i). If δout(j)0, then δout(j) processes should reach the state rout(j).to from the hub, and they do it exclusively using the edge eout(j). The negative values of δin(i) and δout(j) do not play any role in our construction, and thus, we use max(δin(i),0) and max(δout(j),0).

The main idea of the representative construction is as follows. First, we fire the sequence of rules rin(1),,rin(k) to collect sufficiently many processes in the hub. Then, we fire the sequence of rules rout(1),,rout(k) to distribute the required number of processes from the hub. As a result, for each location  in the graph, the processes are transferred from  to the other locations, if σ[]>σ[], and additional processes arrive at , if σ[]<σ[]. Using δin(i) and δout(i), we define the acceleration factors for each rule as follows:

win(i)=j:ein(j)inein(i)max(δin(j),0)andwout(i)=j:eout(i)outeout(j)max(δout(j),0).

Finally, we construct the schedule crepcΩ[σ,τ] as follows:

crepcΩ[σ,τ]=(rin(1),win(1)),,(rin(|Ein|),win(|Ein|)),(rout(1),wout(1)),,(rout(|Eout|),wout(|Eout|)). 5.4

Example 5.2

Consider the TA shown in Fig. 7. Let c be the four-element looplet that contains the rules r1, r2, r3, and r4, and τ be the schedule τ=(r4,1),(r3,1), (r4,1),(r1,1),(r2,1),(r3,1),(r1,1),(r4,1),(r1,1) that uses the rules of the looplet c. Consider a configuration σ with σ.κ[3]=σ.κ[4]=1, and σ.κ[1]=σ.κ[2]=0. The final configuration σ=τ(σ) has the following properties: σ.κ[2]=2 and σ.κ[1]=σ.κ[3]=σ.κ[4]=0. By comparing σ and σ, we notice that one process should move from 3 to 2, and one from 4 to 2. We will now show how this is achieved by our construction.

Fig. 7.

Fig. 7

Construction of the representative of a schedule using the rules in the four-element looplet, following Example 5.2

For constructing the representative schedule crepcΩ[σ,τ], we first define trees Tin and Tout. If we chose 1 to be the hub, we get that Ein={(4,1),(3,4),(2,3)}, and thus the order is (2,3)in(3,4)in(4,1). Therefore, we obtain ein(1)=(2,3), ein(2)=(3,4) and ein(3)=(4,1). By calculating δin(i) for every i{1,2,3}, we see that δin(2)=1 and δin(3)=1 are positive. Consequently, two processes go to the hub: one from rin(2).from=3 and one from rin(3).from=4. The coefficients win give us acceleration factors for all rules.

Similarly, we obtain Eout={(1,2),(2,3),(3,4)}, and the order must be (1,2)out(2,3)out(3,4). Thus, eout(1)=(1,2), ein(2)=(2,3), and eout(3)=(3,4). Here only δout(1)=2 has a positive value, and hence, two processes should move from hub to the local state rout(1).to=2. To achieve this, the acceleration factor of every rule rout(i), 1i3, must be wout(i).

Therefore, by Eq. (5.4), the representative schedule is

crepcΩ[σ,τ]=(r2,0),(r3,1),(r4,2),(r1,2),(r2,0),(r3,0).

Choosing another hub gives us another representative. For each hub, the representative is not longer than 2|c|=8, and leads to σ when applied to σ.

In the following, we fix a threshold automaton TA, a context Ω, and a non-singleton looplet c of the slice TA|Ω. We also fix a configuration σ of TA and a schedule τ that is contained in c and is applicable to σ. Our goal is to prove Lemma 5.8, which states that crepcΩ[σ,τ] is indeed applicable to σ and ends in τ(σ). To this end, we first prove auxiliary Lemmas 5.35.7.

Lemma 5.3

For every i:1i|Ein|, it holds that σ.κ[ri.from]max(δin(i),0), where ri=Lc(ein(i)).

Proof

Recall that by the definition of a configuration, every counter σ.κ[] is non-negative. If δin(i)0, then max(δin(i),0)=δin(i)=σ.κ[ri.from]-σ.κ[ri.from], which is bound from above by σ.κ[ri.from]. Otherwise, δin(i)0, and we trivially have max(δin(i),0)=0 and 0σ.κ[ri.from].

Lemma 5.4

Schedule τin=(rin(1),win(1)),,(rin(|Ein|),win(|Ein|)) is applicable to configuration σ.

Proof

We denote by αi the schedule (rin(1),win(1)),,(rin(i),win(i)), for 1i|Ein|. Then τin=α|Ein|.

All rules rin(1),,rin(|Ein|) are from R|Ω, and thus are unlocked. Hence, it is sufficient to show that the values of the locations from the set Vc are large enough to enable each transition (rin(i),win(i)) for 1i|Ein|. To this end, we prove by induction that (αi-1(σ)).κ[ri.from]win(i), for 1i|Ein| and ri=Lc(ein(i)).

Base case i=1. For r1=Lc(ein(1)), we want to show that σ.κ[r1.from]win(1). As ein(1) is the first element of the sequence ein(1),,ein(Ein), which respects the order in, we conclude that win(1)=max(δin(1),0). From Lemma 5.3, it follows that σ.κ[r1.from]max(δin(1),0).

Inductive step k assume that for all i:1ik-1<|Ein|, schedule αi is applicable to σ and show that (αk-1(σ)).κ[rk.from]win(k) with rk=Lc(ein(k)).

To this end, we construct the set of edges Pk that precede the edge ein(k) in the topological order in, that is, Pk={eeEin,einein(k),eein(k)}. We show that the following equation holds:

αk-1(σ)).κ[rk.from]=σ.κ[rk.from]+ein(j)Pkmax(δin(j),0). 5.5

Indeed, if one picks an edge ein(j)Pk, the edge ein(j) adds win(j) to the counter κ[rk.from]. As the sequence {ein(i)}ik is topologically sorted, it follows that j<k. Moreover, as the tree Tin is oriented towards the root, ein(k) is the only edge leaving the local state rk.from. Thus, no edge ein(i) with i<k decrements the counter σ.κ[rk.from].

From Eq. (5.5) and Lemma 5.3, we conclude that (αk-1(σ)).κ[rk.from] is not less than max(δin(k),0)+ein(j):ein(j)inein(k),jkmax(δin(j),0), which equals to win(k). This proves the inductive step.

Therefore, we have shown that τin=α|Ein| is applicable to σ.

The following lemma is easy to prove by induction on the length of a schedule. The base case for a single transition follows from the definition of a counter system.

Lemma 5.5

Let σ and σ be two configurations and τ be a schedule applicable to σ such that τ(σ)=σ. Then it holds that L(σ[]-σ[])=0.

Further, we show that the required number of processes is reaching (or leaving) the hub, when the transitions derived from the trees Tin and Tout are executed:

Lemma 5.6

The following equality holds:

σ.κ[h]-σ.κ[h]=1i|Ein|max(δin(i),0)-1i|Eout|max(δout(i),0).

Proof

Recall that Tin is a tree directed towards h, and the undirected version of Tin is a spanning tree of graph C. Hence, for each local state Vc\{h}, there is exactly one edge eEin with Lc(e).from=. Thus, the following equation holds:

1i|Ein|max(δin(i),0)=Vc\{h}max(σ.κ[]-σ.κ[],0). 5.6

Similarly, Tout is a tree directed outwards h, and the undirected version of Tout is a spanning tree of graph C. Hence, for each local state Vc\{h}, there is exactly one edge eEout with Lc(e).to=. Thus, the following equation holds:

1i|Eout|max(δout(i),0)=Vc\{h}max(σ.κ[]-σ.κ[],0). 5.7

By combining (5.6) and (5.7), we obtain the following:

1i|Ein|max(δin(i),0)-1i|Eout|max(δout(i),0)=Vc\{h}(max(σ.κ[]-σ.κ[],0)-max(σ.κ[]-σ.κ[],0))=Vc\{h}(σ.κ[]-σ.κ[])=Vcσ.κ[]-σ.κ[]-(σ.κ[h]-σ.κ[h]). 5.8

As the initial schedule τ is applicable to σ, and τ(σ)=σ, by Lemma 5.5, L(σ.κ[]-σ.κ[])=0. As all rules in crepcΩ[σ,τ] are from R|Ω and thus change only the counters of local states in Vc, for each local state L\Vc, its respective counter does not change, that is, σ.κ[]-σ.κ[]=0. Hence, Vc(σ.κ[]-σ.κ[])=0. From this and Eq. (5.8), the statement of the lemma follows.

Lemma 5.7

If τin denotes the schedule (rin(1),win(1)),,(rin(|Ein|),win(|Ein|)), the following equation holds:

τin(σ).κ[]=σ.κ[h]+1i|Eout|max(δout(i),0),if=hmin(σ.κ[],σ.κ[]),ifVc\{h}.

Proof

We prove the lemma by case distinction:

Case =h We show that (τin(σ)).κ[h]=σ.κ[h]+1i|Ein|max(δin(i),0). Indeed, let P be the indices of edges coming into h, i.e., P={i1i|Ein|,Lc(ein(i))=r,h=r.to}. As all edges in Tin are oriented towards h, it holds that (τin(σ)).κ[h] equals to σ.κ[h]+iPwin(i). By unfolding the definition of win, we obtain that (τin(σ)).κ[h]=σ.κ[h]+1i|Ein|max(δin(i),0). We observe that by Lemma 5.6, this sum equals to σ.κ[h]+1i|Eout|max(δout(i),0). This proves the first case.

Case Vc\{h} We show that (τin(σ)).κ[]=min(σ.κ[],σ.κ[]). Indeed, fix a node Vc\{h} and construct two sets: the set of incoming edges In={ein(i)Vc.ein(i)=(,)} and the singleton set of outgoing edges Out={ein(i)Vc.ein(i)=(,)}. By summing up the effect of all transitions in τin, we obtain (τin(σ)).κ[]=σ.κ[]+ein(i)Inwin(i)-eout(i)Outwout(i). By unfolding the definition of win, we obtain (τin(σ)).κ[]=σ.κ[]-ein(i)Outδin(i), which can be rewritten as σ.κ[]-max(σ.κ[]-σ.κ[],0), which, in turn, equals to min(σ.κ[],σ.κ[]). This proves the second case.

Now we are in a position to prove that schedule crepcΩ[σ,τ] is applicable to configuration σ and results in configuration τ(σ):

Lemma 5.8

The schedule crepcΩ[σ,τ] has the following properties: (a) crepcΩ[σ,τ] is applicable to σ, and (b) crepcΩ[σ,τ] results in τ(σ) when applied to σ.

Proof

Denote with τin the prefix (rin(1),win(1)),,(rin(|Ein|),win(|Ein|)) of the schedule crepcΩ[σ,τ]. For each j:1j|Eout|, denote with βj the prefix of crepcΩ[σ,τ] that has length of |Ein|+j. Note that β|Eout|=crepcΩ[σ,τ].

Proving applicability of crepcΩ[σ,τ] to σ We notice that all rules in crepcΩ[σ,τ] are from R|Ω and thus are unlocked, and that τin is applicable to σ by Lemma 5.4. Hence, we only have to check that the values of counters from Vc are large enough, so that transitions (rout(j),wout(j)) can fire.

We prove that each schedule βj is applicable to σ, for j:1j|Eout|. We do so by induction on the distance from the root h in the tree Tout.

Base case root node h. Denote with Oh the set {(,)Eout=h}. Let j1,,jm be the indices of all edges in Oh, and jm be the maximum among them.

From Lemma 5.7, (τin(σ)).κ[h]=σ.κ[h]+1i|Eout|max(δout(i),0)=σ.κ[h]+eout(j)Ohwout(j). Thus, every transition (eout(j),wout(j)) with eout(j)Oh, is applicable to βj-1(σ). Also, (βjm(σ)).κ[h]=σ.κ[h].

Inductive step assume that for a node Vc and an edge eout(k)=(,)Eout outgoing from node , schedule βk is applicable to configuration σ. Show that for each edge eout(i) outgoing from node  the following hold: (i) schedule βi is also applicable to σ; and (ii) β|Eout|(σ).κ[]=σ.κ[].

(i) As the sequence {eout(j)}j|Eout| is topologically sorted, for each edge eout(i) outgoing from node , it holds that k<i.

From Lemma 5.7, we have that βk(σ).κ[]=min(σ.κ[],σ.κ[]). Because the transition (eout(k),wout(k)) adds wout(k) to βk-1(σ).κ[], we have βk(σ).κ[]=min(σ.κ[],σ.κ[])+wout(k). Let S be the set of all immediate successors of eout(k), i.e., S={i.(,)=eout(i)}. From the definition of wout(k), it follows that wout(k)=max(δout(k),0)+sSwout(s). Thus, the transition (eout(i),wout(i)) for edge eout(i) outgoing from node , can be executed.

(ii) Let j1,,jm be the indices of all edges outgoing from , and jm be the maximum among them. From (i), it follows that

(βjm(σ)).κ[]=min(σ.κ[],σ.κ[])+max(δout(k),0),

which equals to σ.κ[].

This proves that the schedule β|Eout|=crepcΩ[σ,τ] is applicable to σ.

Proving that crepcΩ[σ,τ] results in τ(σ) From the induction above, we conclude that for each Vc, it holds that (β|Eout|(σ)).κ[]=σ.κ[]. Edges in the trees Tin and Tout change only local states from Vc. We conclude that for all L, it holds that crepcΩ[σ,τ](σ).κ[]=σ.κ[]. As the rules in non-singleton looplets do not change shared variables, crepcΩ[σ,τ](σ).g=σ.g=σ.g. Therefore, crepcΩ[σ,τ](σ)=σ.

Representatives for one context and one looplet

We now summarize results from Sects. 5.1 and 5.2, giving the representative of a schedule τ in the case when τ uses only the rules from one looplet, and does not change its context. If the given looplet consists of a single rule, the construction is given in Sect. 5.1, and otherwise in Sect. 5.2. We show that these constructions indeed give us a schedule of bounded length, that reaches the same state as τ.

In the following, given a threshold automaton TA and a looplet c, we will say that a schedule τ=t1,,tn is contained in c, if [ti.rule]=c for 1in.

Theorem 5.1

Fix a threshold automaton, and a context Ω, and a looplet c in the slice TA|Ω. Let σ be a configuration and τ be a steady schedule contained in c and applicable to σ. There exists a representative schedule crepcΩ[σ,τ] with the following properties:

  1. schedule crepcΩ[σ,τ] is applicable to σ, and crepcΩ[σ,τ](σ)=τ(σ),

  2. the rule of each transition t in crepcΩ[σ,τ] belongs to c, that is, [t.rule]=c,

  3. schedule crepcΩ[σ,τ] is not longer than 2·|c|.

Proof

If |c|=1, then we use a single accelerated transition or the empty schedule as representative, as described in Lemma 5.1.

If |c|>1, we construct the representative as in Sect. 5.2, so that by Lemma 5.8 property (a) follows. For every edge eEc, the rule Lc(e) belongs to c, and thus crepcΩ[σ,τ] satisfies property (b). As |Ein||c| and |Eout||c|, we conclude that |crepcΩ[σ,τ]|2·|c|, and thus property c) is also satisfied. From this and Lemma 5.8, we conclude that crepcΩ[σ,τ] is the required representative schedule.

Theorem 5.1 gives us a way to construct schemas that generate all representatives of the schedules contained in a looplet:

Theorem 5.2

Fix a threshold automaton TA, a context Ω, and a looplet c in the slice TA|Ω. There exists a schema cschemacΩ with the following properties:

Fix an arbitrary configuration σ and a steady schedule τ that is contained in c and is applicable to σ. Let τ=crepcΩ[σ,τ] be the representative schedule of τ, from Theorem 5.1. Then, path(σ,τ) is generated by cschemacΩ. Moreover, the length of cschemacΩ is at most 2·|c|.

Proof

Note that τ=crepcΩ[σ,τ] can be constructed in two different ways depending on the looplet c.

If |c|=1, then by Lemma 5.1 we have that τ=(r,f) for a rule rc and a factor fN0. In this case we construct cschemacΩ to be

cschemacΩ={Ω}r{Ω}.

It is easy to see that path(σ,τ) is generated by cschemacΩ, as well as that the length of cschemacΩ is exactly 1, that is less than 2·|c|.

If |c|>1, then we use the trees Tin and Tout to construct the schema cschemacΩ as follows:

cschemacΩ={Ω}rin(1)rin(|Ein|)·rout(1)rout(|Eout|){Ω}. 5.9

Since for an arbitrary configuration σ and a schedule τ, we use the same sequence of edges in Eqs. (5.4) and (5.9) to construct crepcΩ[σ,τ] and cschemacΩ, the schema cschemacΩ generates all paths of the representative schedules, and its length is at most 2·|c|.

Case II: one context and multiple looplets

In this section, we show that for each steady schedule, there exists a representative steady schedule of bounded length that reaches the same final state.

Theorem 6.1

Fix a threshold automaton and a context Ω. For every configuration σ with ω(σ)=Ω and every steady schedule τ applicable to σ, there exists a steady schedule srepΩ[σ,τ] with the following properties:

  1. srepΩ[σ,τ] is applicable to σ, and srepΩ[σ,τ](σ)=τ(σ),

  2. |srepΩ[σ,τ]|2·|(R|Ω)|

To construct a representative schedule, we fix a context Ω of a TA, a configuration σ with ω(σ)=Ω, and a steady schedule τ applicable to σ. The key notion in our construction is a projection of a schedule on a set of looplets:

Definition 6.1

Let τ=t1,,tk, for k>0, be a schedule, and let C be a set of looplets. Given an increasing sequence of indices i(1),,i(m){1,,k}, where mk, i.e., i(j)<i(j+1), for 1j<m, a schedule ti(1)ti(m) is a projection of τ on C, if each index j{1,,k} belongs to {i(1),,i(m)} if and only if [tj.rule]C.

In fact, each schedule τ has a unique projection on a set C. In the following, we write τ|c1,,cm to denote the projection of τ on a set {c1,,cm}.

Provided that c1,,cm are all looplets of the slice R|Ω ordered with respect to Inline graphic, we construct the following sequences of projections on each looplet (note that π0 is the empty schedule): πi=τ|c1··τ|cifor0im.

Having defined {πi}0im, we construct the representative srepΩ[σ,τ] simply as a concatenation of the representatives of each looplet:

srepΩ[σ,τ]=crepc1Ω[π0(σ),τ|c1]·crepc2Ω[π1(σ),τ|c2]··crepcmΩ[πm-1(σ),τ|cm]

Example 6.1

Consider the TA shown in Fig. 8. It has three looplets, namely c1={r1,r2,r3,r4}, c2={r5}, c3={r6,r7,r8}, and the rules are depicted as solid, dotted, and dashed, respectively. These looplets are ordered such that Inline graphic.

Fig. 8.

Fig. 8

Threshold automaton and configurations used in Example 6.1

Let σ be the configuration represented in Fig. 8 left, i.e. κ[3]=κ[4]=κ[5]=1 and κ[3]=κ[4]=κ[5]=0. Let τ be the schedule (r4,1),(r6,1),(r3,1), (r4,1),(r1,1),(r2,1),(r7,1),(r3,1),(r1,1),(r5,1),(r7,1),(r4,1),(r8,1),(r1,1),(r6,1), (r7,1),(r5,1),(r8,1),(r7,1). Note that τ is applicable to σ and that τ(σ) is the configuration σ from Fig. 8 right, i.e. κ[5]=1, κ[6]=2 and κ[1]=κ[2]=κ[3]=κ[4]=0. We construct the representative schedule srepΩ[σ,τ].

Projection of τ on the looplets c1, c2, and c3, gives us the following schedules:

τ|c1=(r4,1),(r3,1),(r4,1),(r1,1),(r2,1),(r3,1),(r1,1),(r4,1),(r1,1),τ|c2=(r5,1),(r5,1),τ|c3=(r6,1),(r7,1),(r7,1),(r8,1),(r6,1),(r7,1),(r8,1),(r7,1).

Recall that

srepΩ[σ,τ]=crepc1Ω[π0(σ),τ|c1]·crepc2Ω[π1(σ),τ|c2]·crepc3Ω[π2(σ),τ|c3].

In order to construct this schedule, we firstly construct the required configurations. Note that π0(σ)=σ. Then π1(σ)=τ|c1(σ), and this is the configuration from Fig. 8 lower left, i.e. κ[2]=2, κ[5]=1 and κ[1]=κ[3]=κ[4]=κ[6]=0. Configuration π2(σ)=τ|c1·τ|c2(σ)=τ|c2(π1(σ)) is represented on Fig. 8 lower right, i.e. κ[5]=3 and all other counters are zero.

Section 5 deals with the construction of representatives of schedules that contain rules from only one looplet. Recall that construction of crepc1Ω[π0(σ),τ|c1] corresponds to the one from Example 5.2. Thus, we know that

crepc1Ω[π0(σ),τ|c1]=(r2,0),(r3,1),(r4,2),(r1,2),(r2,0),(r3,0).

As c2 is a singleton looplet, we use the result of Sect. 5.1. Thus,

crepc2Ω[π1(σ),τ|c2]=(r5,2).

Using the result from Sect. 5.2 we obtain that

crepc3Ω[π2(σ),τ|c3]=(r8,0),(r7,2),

and finaly we have the representative for τ that is

srepΩ[σ,τ]=(r2,0),(r3,1),(r4,2),(r1,2),(r2,0),(r3,0),(r5,2),(r8,0),(r7,2).

Lemma 6.1

(Looplet sorting) Given a threshold automaton, a context Ω, a configuration σ, a steady schedule τ applicable to σ, and a sequence c1,,cm of all looplets in the slice R|Ω with the property Inline graphic for 1i<jm, the following holds:

  1. Schedule τ|c1 is applicable to the configuration σ.

  2. Schedule τ|c2,,cm is applicable to the configuration τ|c1(σ).

  3. Schedule τ|c1·τ|c2,,cm, when applied to σ, results in configuration τ(σ).

Proof

In the following, we show Points 1–3 one-by-one.

We need extra notation. For a local state we denote by 1 the |L|-dimensional vector, where the th component is 1, and all the other components are 0. Given a schedule ρ=t1tk, we introduce a vector Δκ(ρ)Z|L| to keep counter difference and a vector Δg(ρ)N0|Γ| to keep difference on shared variables as follows:

Δκ(ρ)=1i|ρ|ti.factor·(1ti.to-1ti.from)andΔg(ρ)=1i|ρ|ti.u

Proof of (1) Assume by contradiction that schedule τ|c1 is not applicable to configuration σ. Thus, there is a schedule τ and a transition t that constitute a prefix of τ|c1, with the following property: τ is applicable to σ, whereas τ·t is not applicable to σ. Let =t.from and =t.to.

There are three cases of why t may be not applicable to τ(σ):

(i) There is not enough processes to move: (σ.κ+Δκ(τ·t))[]<0. As τ is applicable to σ, there is a transition t of τ with [t.rule]c1 and t.to= as well as t.factor>0. From this, by definition of Inline graphic, it follows that Inline graphic. This contradicts the lemma’s assumption on the order Inline graphic.

(ii) The condition t.φrise is not satisfied, that is, τ(σ)t.φrise. Then, there is a guard φguard(t.φrise) with τ(σ)φ.

Since τ is applicable to σ, there is a prefix ρ·t of τ, for a schedule ρ and a transition t that unlocks φ in ρ(σ), that is, ρ(σ)φ and t(ρ(σ))φ. Thus, transition t changes the context: ω(ρ(σ))ω(t(ρ(σ))). This contradicts the assumption that schedule τ is steady.

(iii) The condition t.φfall is not satisfied: τ(σ)t.φfall. Then, there is a guard φguard(t.φfall) with τ(σ)φ.

Let ρ be the longest prefix of τ satisfying ρ|c1=τ. Note that ρ·t is also a prefix of τ. As ρ|c1=τ and no transition decrements the shared variables, we conclude that (τ(σ)).g(ρ(σ)).g. From this and from the fact that τ(σ)φ, it follows that ρ(σ)φ. Thus transition t is not applicable to ρ(σ). This contradicts the assumption that τ is applicable to σ.

From (i), (ii), and (iii), we conclude that (1) holds.

Proof of (2) We show that τ|c2,,cm is applicable to τ|c1(σ).

To this end, we fix an arbitrary prefix τ of τ, a transition t, and a suffix τ, that constitute τ, that is, τ=τ·t·τ. We show that if schedule τ|c2,,cm is applicable to τ|c1(σ), then so is (τ·t)|c2,,cm.

Let us assume that τ|c2,,cm is applicable to τ|c1(σ), and let σ denote the resulting state (τ|c1·τ|c2,,cm)(σ). We consider two cases:

  • [t.rule]=c1. This case holds trivially, as (τ·t)|c2,,cm equals to τ|c2,,cm, which is applicable to τ|c1(σ) by assumption.

  • [t.rule]c1. In order to prove that(τ·t)|c2,,cm is applicable to τ|c1(σ), we show that counters σ.κ and shared variables σ.g are large enough, so that transition t is applicable to σ:

(i) We start by showing that σ.κ[t.from]t.factor. We distinguish between different cases on source and target states of transition t.

(i.A)

We will show by contradiction that there is no rule rc1 with t.to=r.from. Let’s assume it exists. Then, on one hand, as [t.rule]c1, by definition of Inline graphic, it follows that Inline graphic. On the other hand, as [t.rule]c1 and c1,,cm are all classes of the rules used in τ, it holds that [t.rule]{c2,,cm}. By the lemma’s assumption, Inline graphic, and thus, Inline graphic. We arrive at a contradiction.

(i.B)
Let’s consider the case of a rule rc1 with r.to=t.from. Assume by contradiction that t is not applicable to σ, that is, σ.κ[t.from]<t.factor. On one hand, transition t is not applicable to σ=(τ|c1·τ|c2,,cm)(σ). Then by the definition of Δκ, it holds that σ[t.from]+(Δκ(τ|c1·τ|c2,,cm)+Δκ(t))[t.from]<0. By observing that τ|c1=τ|c1+τ|c1, we derive the following inequality:
σ[t.from]+(Δκ(τ|c1)+Δκ(τ|c1)+Δκ(τ|c2,,cm)+Δκ(t))[t.from]<0 6.1
On the other hand, schedule τ=τ·t·τ is applicable to configuration σ. Thus, σ[t.from]+(Δκ(τ)+Δκ(t)+Δκ(τ))[t.from]0. By observing that τ|c1=τ|c1+τ|c1 and τ|c2,,cm=τ|c2,,cm+τ|c2,,cm, we arrive at:
σ[t.from]+(Δκ(τ|c1)+Δκ(τ|c2,,cm)+Δκ(t)+Δκ(τ|c1)+Δκ(τ|c2,,cm))[t.from]0 6.2
By subtracting (6.2) from (6.1), and by commutativity of vector addition, we arrive at Δκ(τ|c2,,cm)[t.from]>0. Thus, there is a transition t in τ|c2,,cm and a rule rc1 such that t.to=r.from. We again arrived at the contradictory Case (i.A). Hence, transition t must be applicable to configuration σ.
(i.C)

Otherwise, neither t.from nor t.to belong to the set of local states affected by the rules from c1, i.e., {t.from,t.to}{rc1.r.from=r.to=} is empty. Then, schedule τ|c1 does not change the counter κ[t.from], and Δκ(τ)[t.from]=Δκ(τ|c2,,cm)[t.from]. As t is applicable to τ(σ), that is, (τ(σ)).κ[t.from]t.factor, we conclude that σ.κ[t.from]t.factor.

(ii) We now show that σt.φriset.φfall. Assume by contradiction that σt.φriset.φfall. There are two cases to consider.

If σt.φrise.

By definition, the shared variables are never decremented in a non-singleton looplet. As τ is a prefix of τ, schedule τ|c1·τ|c2,,cm includes all transitions of τ. Thus, Δg(τ|c1·τ|c2,,cm)Δg(τ). From this and σt.φrise, it follows that τ(σ)t.φrise. This contradicts applicability of τ to σ.

If σt.φfall.

Then, there is a guard φguard(t.φfall) with τ(σ)φ. On one hand, τ|c1·τ|c2,,cm is applicable to σ. On the other hand, τ is applicable to σ. We notice that Δg(τ)=Δg(τ|c1)+Δg(τ|c2,,cm)+Δg(τ|c2,,cm)+Δg(t)Δg(τ|c1)+Δg(τ|c2,,cm). As shared variables are never decreased, it follows that (τ|c1·τ|c2,,cm)(σ)φ. Thus, ω(σ)ω(τ(σ)). This contradicts the assumption on that schedule τ is steady.

Having proved that, we conclude that transition t is applicable to configuration (τ|c1·τ|c2,,cm)(σ). Thus, by induction (τ|c1·τ|c2,,cm)(σ) is applicable to σ. We conclude that Point 2 of the theorem holds.

Proof of (3) By the commutativity property of vector addition,

Δκ(τ|c1·τ|c2,,cm)=Δκ(τ|c1)+Δκ(τ|c2,,cm)=1i|τ|Δκ(ti)=Δκ(τ).

Thus, (τ|c1·τ|c2,,cm)(σ)=τ(σ), and Point (3) follows.

We have thus shown all three points of Lemma 6.1.

Proof

(of Theorem 6.1) By iteratively applying Lemma 6.1, we prove by induction that schedule τ|c1··τ|cm is applicable to σ and results in τ(σ). From Theorem 5.1, we conclude that each schedule τ|ci can be replaced by its representative crepciΩ[πi-1(σ),τ|ci]. Thus, srepΩ[σ,τ] is applicable to σ and results in τ(σ). By Proposition 3.4, schedule srepΩ[σ,τ] is steady, since ω(σ)=ω(τ(σ)).

Finally, we show that for a given context, there is a schema that generates all paths of such representative schedules.

Theorem 6.2

Fix a threshold automaton and a context Ω. Let c1,,cm be the sorted sequence of all looplets of the slice R|Ω, i.e., Inline graphic. Schema sschemaΩ=cschemac1ΩcschemacmΩ has two properties: (a) For a configuration σ with ω(σ)=Ω and a steady schedule τ applicable to σ, path(σ,τ) of the representative τ=srepΩ[σ,τ] is generated by sschemaΩ; and (b) the length of sschemaΩ is at most 2·|(R|Ω)|.

Proof

Fix a configuration σ with ω(σ)=Ω and a steady schedule τ applicable to σ. As srepΩ[σ,τ] is a sorted sequence of the looplet representatives, all paths of srepΩ[σ,τ] are generated by sschemaΩ, which is not longer than 2·|(R|Ω)|.

Proving the main result

Using the results from Sects. 5 and 6, for each configuration and each schedule (without restrictions) we construct a representative schedule.

Theorem 7.1

Given a threshold automaton, a configuration σ, and a schedule τ applicable to σ, there exists a schedule rep[σ,τ] with the following properties:

  1. rep[σ,τ] is applicable to σ, and rep[σ,τ](σ)=τ(σ),

  2. |rep[σ,τ]|2·|R|·(|Φrise|+|Φfall|+1)+|Φrise|+|Φfall|.

Proof

Given a threshold automaton, fix a configuration σ and a schedule τ applicable to σ. Let Ω1,,ΩK+1 be the maximal monotonically increasing sequence of contexts such that path(σ,τ) is consistent with the sequence by Definition 3.7. From Proposition 3.2, the length of the sequence is K+1=|Φrise|+|Φfall|+1. Thus, there are at most K transitions t1,,tK in τ that change their context, i.e., for i{1,,K}, it holds ω(σi)ω(ti(σi)) for ti’s respective state σi in τ. Therefore, we can divide τ into K+1 steady schedules separated by the transitions t1,,tK:

τ=ν1·t1·ν2νK·tK·νK+1.

Now, the main idea is to replace the steady schedules with their representatives from Theorem 6.1. That is, using t1,,tK and ν1,,νK+1, we construct the schedules ρ1,,ρK (by convention, ρ0 is the empty schedule):

ρi=ρi-1·νi·tifor1iK.

Finally, the representative schedule rep[τ,σ] is constructed as follows:

repΩ1[σ,ν1]·t1·repΩ2[ρ1(σ),ν2]repΩK[ρK-1(σ),νK]·tK·repΩK+1[ρK(σ),νK+1]

From Theorem 6.1, it follows that rep[τ,σ] is applicable to σ and it results in τ(σ). Moreover, the representative of a steady schedule is not longer than 2|R|, which together with K transitions gives us the bound 2|R|(K+1)+K. As we have that K=|Φrise|+|Φfall|, this gives us the required bound.

Further, given a maximal monotonically increasing sequence z of contexts, we construct a schema that generates all paths of the schedules consistent with z:

Theorem 7.2

For a threshold automaton and a monotonically increasing sequence z of contexts, there exists a schema schema(z) that generates all paths of the representative schedules that are consistent with z, and the length of schema(z) does not exceed 3·|R|·(|Φrise|+|Φfall|)+2·|R|.

Proof

Given a threshold automaton, let ρall be the sequence r1,,r|R| of all rules from R, and let z=Ω0,,Ωm be a monotonically increasing sequence of contexts. By the construction in Theorem 7.1, each representative schedule rep[σ,τ] consists of the representatives of steady schedules terminated with transitions that change the context. Then, for each context Ωi, for 0i<m, we compose sschemaΩ and {Ωi}ρall{Ωi+1}. This composition generates the representative of a steady schedule and the transition changing the context from Ωi to Ωi+1. Consequently, we construct the schema(z) as follows:

(sschemaΩ0{Ω0}ρall{Ω1})(sschemaΩm-1{Ωm-1}ρall{Ωm})sschemaΩm

By inductively applying Theorem 6.2, we prove that schema(z) generates all paths of schedules rep[σ,τ] that are consistent with the sequence z. We get the needed bound on the length of schema(z) by using an argument similar to Theorem 7.1 and by noting that for every context, instead of one rule that is changing it, we add |R| extra rules.

Complete set of schemas and optimizations

Our proofs show that the set of schemas is easily computed from the TA: the threshold guards are syntactic parts of the TA, and enable us to directly construct increasing sequences of contexts. To find a slice of the TA for a given context, we filter the rules with unlocked guards, i.e., check whether the context contains the guard. To produce the simple schema of a looplet, we compute a spanning tree over the slice. To construct simple schemas, we do a topological sort over the looplets. For example, it takes just 30 s to compute the schemas in our longest experiment that runs for 4 h. In our tool we have implemented the following optimizations that lead to simpler and fewer SMT queries.

Entailment optimization We say that a guard φ1Φrise entails a guard φ2Φrise, if for all combinations of parameters pPRC and shared variables gN0|Γ|, it holds that (g,p)φ1φ2. For instance, in our example, φ3:y(2t+1)-f entails φ2:y(t+1)-f. If φ1 entails φ2, then we can omit all monotonically increasing sequences that contain a context (Ωrise,Ωfall) with φ1Ωrise and φ2Ωrise. If the number of schemas before applying this optimization is m! and there are k entailments, then the number of schemas reduces from m! to (m-k)!. A similar optimization is introduced for the guards from Φfall.

Control flow optimization Based on the proof of Lemma 6.1, we introduce the following optimization for TAs that are directed acyclic graphs (possibly with self loops). We say that a rule rR may unlock a guard φΦrise, if there is a pPRC and gN0|Γ| satisfying: (g,p)r.φriser.φfall (the rule is unlocked); (g,p)φ (the guard is locked); (g+r.u,p)φ (the guard is now unlocked).

In our example from Fig. 2, the rule r1:truex++ may unlock the guard φ1:x(n+t)/2-f.

Let φΦrise be a guard, r1,,rm be the rules that use φ, and r1,,rk be the rules that may unlock φ. If Inline graphic, for 1ik and 1jm, then we exclude some sequences of contexts as follows (we call φ forward-unlockable). Let ψ1,,ψnΦrise be the guards of r1,,rk. Guard φ cannot be unlocked before ψ1,,ψn, and thus we can omit all sequences of contexts, where φ appears in the contexts before ψ1,,ψn. Moreover, as ψ1,,ψn are the only guards of the rules unlocking φ, we omit the sequences with different combinations of contexts involving φ and the guards from Φrise\{φ,ψ1,,ψn}. Finally, as the rules r1,,rm appear after the rules r1,,rk in the order Inline graphic, the rules r1,,rm appear after the rules r1,,rk in a rule sequence of every schema. Thus, we omit the combinations of the contexts involving φ and ψ1,,ψn.

Hence, we add all forward-unlockable guards to the initial context (we still check the guards of the rules in the SMT encoding in Sect. 9). If the number of schemas before applying this optimization is m! and there are k forward-unlocking guards, then the number of schemas reduces from m! to (m-k)!. A similar optimization is introduced for the guards from Φfall.

Checking a schema with SMT

We decompose a schema into a sequence of simple schemas, and encode the simple schemas. Given a simple schema S={Ω1}r1,,rm{Ω2}, which contains m rules, we construct an SMT formula such that every model of the formula represents a path from L(S) —the language of paths generated by schema S —and for every path in L(S) there is a corresponding model of the formula. Thus, we need to model a path of m+1 configurations and m transitions (whose acceleration factors may be 0).

To represent a configuration σi, for 0im, we introduce two vectors of SMT variables: Given the set of local states L and the set of shared variables Γ, a vector ki=(k1i,,k|L|i) to represent the process counters, a vector xi=(x1i,,x|Γ|i) to represent the shared variables. We call the pair (ki,xi) the layer i, for 1im.

Based on this we encode schemas, for which the sequence of rules r1,,rm is fixed. We exploit this in two ways: First, we encode for each layer i the constraints of rule ri. Second, as this constraint may update only two counters —the processes move from and move to according to the rule —we do not need |L| counter variables per layer, but only encode the two counters per layer that have actually changed. As is a common technique in bounded model checking, the counters that are not changed are “reused” from previous layers in our encoding. By doing so, we encode the schema rules with |L|+|Γ|+m·(2+|Γ|) integer variables, 2m equations, and inequalities in linear integer arithmetic that represent threshold guards that evaluate to true (at most the number of threshold guards times m of these inequalities).

In the following, we use the notation [k:m] to denote the set {k,,m}. In order to reuse the variables from the previous layers, we introduce a function υ:L×[0:m][0:m] that for a layer i[0:m] and a local state L, gives the largest number ji of the layer, where the counter kj is updated:

υ(,i)=i,ifi=0{ri.from,ri.to}υ(,i-1),otherwise.

Having defined layers, we encode: the effect of rules on counters and shared variables (in formulas M and U below), the effect of rules on the configuration (T), restrictions imposed by contexts (C), and, finally, the reachability question.

To represent m transitions, for each transition i[1:m], we introduce a non-negative variable δi for the acceleration factor, and define two formulas: formula M(i-1,i) to express the update of the counter of local state L, and formula Ux(i-1,i) to represent the update of the shared variable xΓ:

M(i-1,i)ki=kυ(,i-1)+δi,for=ri.toandi[1:m]ki=kυ(,i-1)-δi,for=ri.fromandi[1:m]true,otherwiseUx(i-1,i)xi=xi-1+δi·u,ifu=ri.u[j]>0,true,otherwise.

The formula T(i-1,i) collects all constraints by the rule ri:

T(i-1,i)LM(i-1,i)xΓUx(i-1,i).

For a formula φ, we denote by φ[xi] the formula, where each variable xΓ is substituted with xi. Then, given a context Ω=(Ωrise,Ωfall), a formula CΩ(i) adds the constraints of the context Ω on the layer i:

CΩ(i)φΩriseφ[xi]φΦrise\Ωrise¬φ[xi]φΩfall¬φ[xi]φΦfall\Ωfallφ[xi].

Finally, the formula CΩ1(0)T(0,1)T(m-1,m)CΩ2(m) captures all the constraints of the schema S={Ω1}r1,,rm{Ω2}, and thus, its models correspond to the paths of schedules that are generated by S.

Let I(0) be the formula over the variables of layer i that captures the initial states of the threshold automaton, and B(i) be a state property over the variables of layer i. Then, parameterized reachability for the schema S is encoded with the following formula in linear integer arithmetic:

I(0)CΩ1(0)T(0,1)T(m-1,m)CΩ2(m)(B(0)B(m)).

Experiments

We have extended our tool ByMC (Byzantine Model Checker [2]) with the technique discussed in this paper. All of our benchmark algorithms were originally published in pseudo-code, and we model them in a parametric extension of Promela, which was discussed in [27, 34].

Benchmarks

We revisited several asynchronous FTDAs that were evaluated in [33, 41]. In addition to these classic FTDAs, we considered asynchronous (Byzantine) consensus algorithms, namely, BOSCO [57], C1CS [10], and CF1S [18], that are designed to work despite partial failure of the distributed system. In contrast to the conference version of this paper [39], we used a new version of the benchmarks from [37] that have been slightly updated for liveness properties. Hence, for some benchmarks, the running times of our tool may vary from [39]. The benchmarks, their source code in parametric of Promela, and the code of the threshold automata are freely available [30].

Implementation

ByMC supports several tool chains (shown in Fig. 1, p. 3), the first using counter abstraction (that is, process counters over an abstract domain), and the second using counter systems with counters over integers:

Data and counter abstractions In this chain, the message counters are first mapped to parametric intervals, e.g., counters range over the abstract domain D^={[0,1), [1,t+1),[t+1,n-t),[n-t,)}. By doing so, we obtain a finite (data) abstraction of each process, and thus we can represent the system as a counter system: We maintain one counter κ[] per local state  of a process, as well as the counters for the sent messages. Then, in the counter abstraction step, every process counter κ[] is mapped to the set of parametric intervals D^. As the abstractions may produce spurious counterexamples, we run them in an abstraction-refinement loop that incrementally prunes spurious transitions and unfair executions. More details on the data and counter abstractions and refinement can be found in [33]. In our experiments, we use two kinds of model checkers as backend:

  1. BDD The counter abstraction is checked with nuXmv [11] using Binary Decision Diagrams (BDDs). For safety properties, the tool executes the command check_invar. In our experiments, we used the timeout of 3 days, as there was at least one benchmark that needed a bit more than a day to complete.

  2. BMC The counter abstraction is checked with nuXmv using bounded model checking [6]. To ensure completeness (at the level of counter abstraction), we explore the computations of the length up to the diameter bounds that were obtained in [41]. To efficiently eliminate shallow spurious counterexamples, we first run the bounded model checker in the incremental mode up to length of 30. This is done by issuing the nuXmv command check_ltlspec_sbmc_inc, which uses the built-in SAT solver MiniSAT. Then, we run a single-shot SAT problem by issuing the nuXmv command gen_ltlspec_sbmc and checking the generated formula with the SAT solver lingeling [5]. In our experiments, we set the timeout to 1 day.

Reachability for threshold automata In this tool chain, to obtain a threshold automaton, our tool first applies data abstraction over the domain D^ to the Promela code, which abstracts the message counters that keep the number of messages received by every process, while the message counters for the sent messages are kept as integers. More details can be found in [40]. Having constructed a threshold automaton, we compare two verification approaches:

  1. PARA2 Bounded model checking with SMT The approach of this article. BYMC enumerates the schemas (as explained in Sect. 4), encodes them in SMT (as explained in Sect. 9) and checks every schema with the SMT solver Z3 [17].

  2. FAST Acceleration of counter automata In this chain, our tool constructs a threshold automaton and checks the reachability properties with the existing tool FAST [3]. For comparison with our tool, we run FAST with the MONA plugin that produced the best results in our experiments.

The challenge in the verification of FTDAs is the immense non-determinism caused by interleavings, asynchronous message passing, and faults. In our modeling, all these are reflected in non-deterministic choices in the Promela code. To obtain threshold automata, as required for our technique, our tool constructs a parametric interval data abstraction [33] that adds to non-determinism.

Comparing to [39], in this paper, we have introduced an optimization to schema checking that dramatically reduced the running times for some of the benchmarks. In this optimization, we group schemas in a prefix tree, whose nodes are contexts and edges are simple schemas. In each node of the prefix tree, our tool checks, whether there are configurations that are reachable from the initial configurations by following the schemas in the prefix. If there are no such reachable configurations, we can safely prune the whole suffix and thus prove many schemas to be unsatisfiable at once.

Evaluation

Table 1 summarizes the features of threshold automata that are automatically constructed by ByMC from parametric Promela. The number of local states |L| varies from 7 (FRB and STRB) to hundreds (C1CS and CBC). Our threshold automata are obtained by applying interval abstraction to Promela code, which keeps track of the number of messages received by each process. Thus, the number |L| is proportional to the number of control states and |D^|k, where D^ is the domain of parametric intervals (discussed above) and k is the number of message types. Sometimes, one can manually construct a more efficient threshold automaton that models the same fault-tolerant distributed algorithm and preserves the same safety properties. For instance, Fig. 2 shows a manual abstraction of ABA that has only 5 local states, in contrast to 61 local states in the automatic abstraction (cf. Table 1). We leave open the question of whether one can automatically construct a minimal threshold automaton with respect to given specifications.

Table 1.

The benchmarks used in our experiments. Some benchmarks, e.g., ABA, require us to consider several cases on the parameters, which are mentioned in the column “Case”. The meaning of the other columns is as follows: |L| is the number of local states in TA, |R| is the number of rules in TA, |Φrise| and |Φfall| is the number of (R)- and (F)-guards respectively. Finally, |S| is the number of enumerated schemas, and Bound is the theoretical upper bound on |S|, as given in Theorem 4.2

graphic file with name 10703_2017_297_Figa_HTML.jpg

Table 2 summarizes our experiments conducted with the techniques introduced in Sect. 10.2: BDD, BMC, PARA2, and FAST. On large problems, our new technique works significantly better than BDD- and SAT-based model checking. BDD-based model checking works very well on top of counter abstraction. Importantly, our new technique does not use abstraction refinement. In comparison to our earlier experiments [39], we verified safety of a larger set of benchmarks with nuXmv. We believe that this is due to the improvements in nuXmv and, probably, slight modifications of the benchmarks from [37].

Table 2.

Summary of our experiments on AMD Opteron®6272, 32 cores, 192 GB. The symbols are: “Inline graphic” for timeout (72 h. for BDD and 24 h. otherwise); “Inline graphic” for memory overrun of 32 GB; “Inline graphic” for BDD nodes overrun; “Inline graphic” for timeout in the refinement loop (72 h. for BDD and 24 h. otherwise); “Inline graphic” for spurious counterexamples due to counter abstraction

graphic file with name 10703_2017_297_Figg_HTML.jpg

NBAC and NBACC are challenging as the model checker produces many spurious counterexamples, which are an artifact of counter abstraction losing or adding processes. When using SAT-based model checking, the individual calls to nuXmv are fast, but the abstraction-refinement loop times out, due to a large number of refinements (about 500). BDD-based model checking times out when looking for a counterexample. Our new technique, preserves the number of proceses, and thus, there are no spurious counterexamples of this kind. In comparison to the general-purpose acceleration tool FAST, our tool uses less memory and is faster on the benchmarks where FAST is successful.

As predicted by the distributed algorithms literature, our tool finds counterexamples, when we relax the resilience condition. In contrast to counter abstraction, our new technique gives us concrete values of the parameters and shows how many processes move at each step of the counterexample.

Our new method uses integer counters and thus does not introduce spurious behavior due to counter abstraction, but still has spurious behavior due to data abstraction on complex FTDAs such as BOSCO, C1CS, and NBAC. In these cases, we manually refine the interval domain by adding new symbolic interval borders, see [33]. We believe that these intervals can be obtained directly from threshold automata, and no refinement is necessary. We leave this question to future work.

Sets of schemas and time to check a single schema

On one hand, Theorem 4.2 gives us a theoretical bound on the number of schemas to be explored. On the other hand, optimizations discussed in Sect. 8 introduce many ways of reducing the number of schemas. Two columns in Table 1 compare the theoretical bound and the practical number of schemas: the column “Theoretical bound” shows the bound of (|Φrise|+|Φfall|)!, while the column |S| shows the actual number of schemas. (For reachability, we are merging the schemas with the prefix tree, and thus the actual number of explored schemas is even smaller.) As one can see, the theoretical bound is quite pessimistic, and is only useful to show completeness of the set of schemas. The much smaller numbers for the fault-tolerant distributed algorithms are due to a natural order on guards, e.g., as xt+1 becomes true earlier than xn-t under the resilience condition n>3t. The drastic reduction in the case of CBC is due to the control flow optimization discussed in Sect. 8 and the fact that basically all guards are forward-unlocking.

When doing experiments, we noticed that the only kinds of guards that cannot be treated by our optimizations and blow up the number of schemas are the guards that use independent shared variables. For instance, consider the guards x0n-t and x1n-t that are counting the number of 0’s and 1’s sent by the correct processes. Even though they are mutually exlusive under the resilience condition n>3t, our tool has to explore all possible orderings of these guards. We are not aware of a reduction that would prevent our method from exploding in the number of schemas for this example.

Since the schemas can be checked independently, one can check them in parallel. Figure 9 shows a distribution of schemas along with the time needed to check an individual schema. There are only a few divergent schemas that required more than 7 s to get checked, while the large portion of schemas require 1–3 s. Hence, a parallel implementation of the tool should verify the algorithms significantly faster. We leave such a parallel extension for future work.

Fig. 9.

Fig. 9

The times required to check individual schemas and the distribution of schemas over these times (the value 0 refers to the running times of less than a second). The benchmarks containing the schemas that are verified in (a) T8 sec. and (b) T18 sec. are: (a) C1CS, CBC, CF1S, and (b) CBC and CF1S

Discussions and related work

We introduced a method to efficiently check reachability properties of FTDAs in a parameterized way. If n>7t as for BOSCO, even the simplest interesting case with t=2 leads to a system size that is out of range of explicit state model checking. Hence, FTDAs force us to develop parameterized verification methods.

The problem we consider is concerned with parameterized model checking, for which many interesting results exist [14, 15, 2123, 35]; cf. [7] for a survey. However, the FTDAs considered by us run under the different assumptions.

From a methodological viewpoint, our approach combines techniques from several areas including compact programs [49], counter abstraction [4, 55], completeness thresholds for bounded model checking [6, 16, 42], partial order reduction [8, 28, 53, 59], and Lipton’s movers [48]. Regarding counter automata, our result entails flattability [46] of every counter system of threshold automata: a complete set of schemas immediately gives us a flat counter automaton. Hence, the acceleration-based semi-algorithms [3, 46] should in principle terminate on the systems of TAs, though it did not always happen in our experiments. Similar to our SMT queries based on schemas, the inductive data flow graphs iDFG introduced in [24] are a succinct representations of schedules (they call them traces) for systems where the number of processes (or threads) is fixed. The work presented in [25] then considers parameterized verification. Further, our execution schemas are inspired by a general notion of semi-linear path schemas SLPS [45, 46]. We construct a small complete set of schemas and thus a provably small SLPS. Besides, we distinguish counter systems and counter abstraction: the former counts processes as integers, while the latter uses counters over a finite abstract domain, e.g., {0,1,many} [55].

Many distributed algorithms can be represented with I/O Automata [50] or TLA+ [44]. In these frameworks, correctness is typically shown with a proof assistant, while model checking is used as a debugger on small instances. Parameterized model checking is not a concern there, except one notable result [32].

The results presented in this article can be used to check reachability properties of FTDAs. We can thus establish safety of FTDAs. However, for fault-tolerant distributed algorithms liveness is as important as safety: The seminal impossibility result by Fischer, Lynch, and Paterson [26] states that a fault-tolerant consensus algorithm cannot ensure both safety and liveness in asynchronous systems. In recent work [37] we also considered liveness verification, or more precisely, verification of temporal logic specification with the G and F temporal operators. In [37], we use the results of this article as a black box and show that combinations of schemas can be used to generate counterexamples to liveness properties, and that we can verify both safety and liveness by complete SMT-based bounded model checking.

Acknowledgements

Open access funding provided by Austrian Science Fund (FWF). We are grateful to Azadeh Farzan for valuable discussions during her stay in Vienna and to the anonymous reviewers for their insightful comments regarding partial order reduction, and for suggestions that helped us in improving the presentation of the paper.

Footnotes

1

Our model requires all variables to be non-negative integers. Although these constraints (e.g., x10) have to be encoded in the SMT queries, we omit these constraints here for a more concise presentation.

Supported by: the Austrian Science Fund (FWF) through the National Research Network RiSE (S11403 and S11405), project PRAVDA (P27722), and Doctoral College LogiCS (W1255-N23); and by the Vienna Science and Technology Fund (WWTF) through project APALACHE (ICT15-103). This is an extended version of the paper “SMT and POR beat Counter Abstraction: Parameterized Model Checking of Threshold-Based Distributed Algorithms” that appeared in CAV (Part I), volume 9206 of LNCS, pages 85–102, 2015.

Contributor Information

Igor Konnov, Email: konnov@forsyte.at, http://forsyte.at/konnov.

Marijana Lazić, Email: lazic@forsyte.at, http://forsyte.at/lazic.

Helmut Veith, Email: veith@forsyte.at, http://forsyte.at/veith.

Josef Widder, Phone: +43 (1) 58801-18263, Email: widder@forsyte.at, http://forsyte.at/widder.

References

  • 1.Attiya H, Welch J. Distributed computing. 2. New York: Wiley; 2004. [Google Scholar]
  • 2.ByMC: Byzantine model checker (2013). http://forsyte.tuwien.ac.at/software/bymc/. Accessed Dec 2016
  • 3.Bardin S, Finkel A, Leroux J, Petrucci L. Fast: acceleration from theory to practice. STTT. 2008;10(5):401–424. doi: 10.1007/s10009-008-0064-3. [DOI] [Google Scholar]
  • 4.Basler G, Mazzucchi M, Wahl T, Kroening D (2009) Symbolic counter abstraction for concurrent software. In: CAV. LNCS, vol 5643, pp 64–78
  • 5.Biere A (2013) Lingeling, Plingeling and Treengeling entering the SAT competition 2013. In: Proceedings of SAT competition 2013; Solver and p. 51
  • 6.Biere A, Cimatti A, Clarke EM, Zhu Y (1999) Symbolic model checking without BDDs. In: TACAS. LNCS, vol 1579, pp 193–207
  • 7.Bloem R, Jacobs S, Khalimov A, Konnov I, Rubin S, Veith H, Widder J. Decidability of parameterized verification, synthesis lectures on distributed computing theory. San Rafael: Morgan & Claypool; 2015. [Google Scholar]
  • 8.Bokor P, Kinder J, Serafini M, Suri N (2011) Efficient model checking of fault-tolerant distributed protocols. In: DSN, pp 73–84
  • 9.Bracha G, Toueg S. Asynchronous consensus and broadcast protocols. J ACM. 1985;32(4):824–840. doi: 10.1145/4221.214134. [DOI] [Google Scholar]
  • 10.Brasileiro FV, Greve F, Mostéfaoui A, Raynal M (2001) Consensus in one communication step. In: PaCT. LNCS, vol 2127, pp 42–50
  • 11.Cavada R, Cimatti A, Dorigatti M, Griggio A, Mariotti A, Micheli A, Mover S, Roveri M, Tonetta S (2014) The nuXmv symbolic model checker. In: CAV. LNCS, vol 8559, pp 334–342
  • 12.Chandra TD, Toueg S. Unreliable failure detectors for reliable distributed systems. J ACM. 1996;43(2):225–267. doi: 10.1145/226643.226647. [DOI] [Google Scholar]
  • 13.Clarke E, Grumberg O, Jha S, Lu Y, Veith H. Counterexample-guided abstraction refinement for symbolic model checking. J ACM. 2003;50(5):752–794. doi: 10.1145/876638.876643. [DOI] [Google Scholar]
  • 14.Clarke E, Talupur M, Touili T, Veith H (2004) Verification by network decomposition. In: CONCUR 2004, vol 3170, pp 276–291
  • 15.Clarke E, Talupur M, Veith H (2008) Proving Ptolemy right: the environment abstraction framework for model checking concurrent systems. In: TACAS’08/ETAPS’08. Springer, Berlin, pp 33–47
  • 16.Clarke EM, Kroening D, Ouaknine J, Strichman O (2004) Completeness and complexity of bounded model checking. In: VMCAI. LNCS, vol 2937, pp 85–96
  • 17.De Moura L, Bjørner N (2008) Z3: an efficient SMT solver. In: Tools and algorithms for the construction and analysis of systems. LNCS, vol 1579, pp 337–340
  • 18.Dobre D, Suri N (2006) One-step consensus with zero-degradation. In: DSN, pp 137–146
  • 19.Drăgoi C, Henzinger TA, Zufferey D (2016) PSync: a partially synchronous language for fault-tolerant distributed algorithms. In: POPL, pp 400–415
  • 20.Drăgoi C, Henzinger TA, Veith H, Widder J, Zufferey D (2014) A logic-based framework for verifying consensus algorithms. In: VMCAI. LNCS, vol 8318, pp 161–181
  • 21.Emerson E, Namjoshi K (1995) Reasoning about rings. In: POPL, pp 85–94
  • 22.Emerson EA, Kahlon V (2003) Model checking guarded protocols. In: LICS. IEEE, pp 361–370
  • 23.Esparza J, Ganty P, Majumdar R (2013) Parameterized verification of asynchronous shared-memory systems. In: CAV, pp 124–140
  • 24.Farzan A, Kincaid Z, Podelski A (2013) Inductive data flow graphs. In: POPL, pp 129–142
  • 25.Farzan A, Kincaid Z, Podelski A (2015) Proof spaces for unbounded parallelism. In: POPL, pp 407–420
  • 26.Fischer MJ, Lynch NA, Paterson MS. Impossibility of distributed consensus with one faulty process. J ACM. 1985;32(2):374–382. doi: 10.1145/3149.214121. [DOI] [Google Scholar]
  • 27.Gmeiner A, Konnov I, Schmid U, Veith H, Widder J (2014) Tutorial on parameterized model checking of fault-tolerant distributed algorithms. In: SFM. LNCS, vol 8483. Springer, Berlin, pp 122–171
  • 28.Godefroid P (1990) Using partial orders to improve automatic verification methods. In: CAV. LNCS, vol 531, pp 176–185
  • 29.Guerraoui R. Non-blocking atomic commit in asynchronous distributed systems with failure detectors. Distrib Comput. 2002;15(1):17–25. doi: 10.1007/s446-002-8027-4. [DOI] [Google Scholar]
  • 30.https://github.com/konnov/fault-tolerant-benchmarks/tree/master/fmsd17
  • 31.Hawblitzel C, Howell J, Kapritsos M, Lorch JR, Parno B, Roberts ML, Setty STV, Zill B (2015) Ironfleet: proving practical distributed systems correct. In: SOSP, pp 1–17
  • 32.Jensen H, Lynch N (1998) A proof of Burns n-process mutual exclusion algorithm using abstraction. In: Steffen B (ed) TACAS. LNCS, vol 1384. Springer, Berlin, pp 409–423
  • 33.John A, Konnov I, Schmid U, Veith H, Widder J (2013) Parameterized model checking of fault-tolerant distributed algorithms by abstraction. In: FMCAD, pp 201–209
  • 34.John A, Konnov I, Schmid U, Veith H, Widder J (2013) Towards modeling and model checking fault-tolerant distributed algorithms. In: SPIN. LNCS, vol 7976, pp 209–226
  • 35.Kaiser A, Kroening D, Wahl T (2012) Efficient coverability analysis by proof minimization. In: CONCUR, pp 500–515
  • 36.Kesten Y, Pnueli A. Control and data abstraction: the cornerstones of practical formal verification. STTT. 2000;2:328–342. doi: 10.1007/s100090050040. [DOI] [Google Scholar]
  • 37.Konnov I, Lazić M, Veith H, Widder J (2017) A short counterexample property for safety and liveness verification of fault-tolerant distributed algorithms. In: POPL, pp 719–734
  • 38.Konnov I, Veith H, Widder J (2014) On the completeness of bounded model checking for threshold-based distributed algorithms: reachability. In: CONCUR. LNCS, vol 8704, pp 125–140
  • 39.Konnov I, Veith H, Widder J (2015) SMT and POR beat counter abstraction: parameterized model checking of threshold-based distributed algorithms. In: CAV (Part I). LNCS, vol 9206, pp 85–102
  • 40.Konnov I, Veith H, Widder J (2016) What you always wanted to know about model checking of fault-tolerant distributed algorithms. In: PSI 2015, revised selected papers. LNCS, vol 9609. Springer, pp 6–21
  • 41.Konnov I, Veith H, Widder J. On the completeness of bounded model checking for threshold-based distributed algorithms: reachability. Inf Comput. 2017;252:95–109. doi: 10.1016/j.ic.2016.03.006. [DOI] [Google Scholar]
  • 42.Kroening D, Strichman O (2003) Efficient computation of recurrence diameters. In: VMCAI. LNCS, vol 2575, pp 298–309
  • 43.Lamport L. Time, clocks, and the ordering of events in a distributed system. Commun ACM. 1978;21(7):558–565. doi: 10.1145/359545.359563. [DOI] [Google Scholar]
  • 44.Lamport L. Specifying systems: the TLA+ language and tools for hardware and software engineers. Boston: Addison-Wesley Longman Publishing Co. Inc; 2002. [Google Scholar]
  • 45.Leroux J, Sutre G (2004) On flatness for 2-dimensional vector addition systems with states. In: CONCUR 2004-concurrency theory. Springer, pp 402–416
  • 46.Leroux J, Sutre G (2005) Flat counter automata almost everywhere! In: ATVA. LNCS, vol 3707, pp 489–503
  • 47.Lesani M, Bell CJ, Chlipala A (2016) Chapar: certified causally consistent distributed key-value stores. In: POPL, pp 357–370
  • 48.Lipton RJ. Reduction: a method of proving properties of parallel programs. Commun ACM. 1975;18(12):717–721. doi: 10.1145/361227.361234. [DOI] [Google Scholar]
  • 49.Lubachevsky BD. An approach to automating the verification of compact parallel coordination programs. I. Acta Inform. 1984;21(2):125–169. doi: 10.1007/BF00289237. [DOI] [Google Scholar]
  • 50.Lynch N. Distributed algorithms. Burlington: Morgan Kaufman; 1996. [Google Scholar]
  • 51.Mostéfaoui A, Mourgaya E, Parvédy PR, Raynal M (2003) Evaluating the condition-based approach to solve consensus. In: DSN, pp 541–550
  • 52.Padon O, McMillan KL, Panda A, Sagiv M, Shoham S (2016) Ivy: safety verification by interactive generalization. In: PLDI, pp 614–630
  • 53.Peled D (1993) All from one, one for all: on model checking using representatives. In: CAV. LNCS, vol 697, pp 409–423
  • 54.Peluso S, Turcu A, Palmieri R, Losa G, Ravindran B (2016) Making fast consensus generally faster. In: DSN, pp 156–167
  • 55.Pnueli A, Xu J, Zuck L (2002) Liveness with (0,1,$\infty $)-counter abstraction. In: CAV. LNCS, vol 2404, pp 93–111
  • 56.Raynal M (1997) A case study of agreement problems in distributed systems: non-blocking atomic commitment. In: HASE, pp 209–214
  • 57.Song YJ, van Renesse R (2008) Bosco: one-step Byzantine asynchronous consensus. In: DISC. LNCS, vol 5218, pp 438–450
  • 58.Srikanth T, Toueg S. Simulating authenticated broadcasts to derive simple fault-tolerant algorithms. Distrib Comput. 1987;2:80–94. doi: 10.1007/BF01667080. [DOI] [Google Scholar]
  • 59.Valmari A (1991) Stubborn sets for reduced state space generation. In: Advances in Petri Nets 1990. LNCS, vol 483. Springer, pp 491–515
  • 60.Wilcox JR, Woos D, Panchekha P, Tatlock Z, Wang X, Ernst MD, Anderson TE (2015) Verdi: a framework for implementing and formally verifying distributed systems. In: PLDI, pp 357–368

Articles from Formal Methods in System Design are provided here courtesy of Springer

RESOURCES