<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta>
      <journal-title-group>
        <journal-title>Model dfs brab V F S M
Redis</journal-title>
      </journal-title-group>
    </journal-meta>
    <article-meta>
      <title-group>
        <article-title>Parameterized Veri cation of Publish/Subcribe Protocols via In nite-state Model Checking</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Giorgio Delzanno</string-name>
          <email>fgiorgio.delzannog@unige.it</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>DIBRIS, University of Genova</institution>
        </aff>
      </contrib-group>
      <volume>20</volume>
      <issue>970</issue>
      <abstract>
        <p>We apply the In nite-State Model Checking to formally specify and validate protocol skeletons for distributed systems with asynchronous communication and synchronous access to local data structures. More precisely, we validate the Redis Pub/Sub key-value Server. Redis is based on a publish-subscribe architecture used in Cloud Storage and Internet of Things ecosystems. For the considered protocol, we present a formal speci cation that combines ideas coming from round-based and shared-memory speci cation languages. The resulting model is validated via the SMT-based In nite-state Model Checker Cubicle. In this setting we use unbounded arrays to model (1) arbitrary collections of publishers and subscribers, (2) unbounded shared memory used as a communication media between processes. Our model is validated using the symbolic backward reachability algorithm implemented in the tool. The peculiarity of the algorithm is that, upon termination, the resulting correctness proof is guaranteed to hold for every number of process instances.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>Introduction</title>
      <p>
        Protocols designed to operate in distributed systems are often de ned for an
arbitrary number of components interacting via asynchronous communication.
Formal speci cation languages like Petri nets can be used to model skeletons
and abstractions of this kind of systems. In this setting the coverability decision
problem [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ] can be applied to specify potential violations of safety properties
independently from the number of system components. For distributed systems
it is often convenient to consider a generalization of the coverability problem
existentially quanti ed over an in nite set of initial con gurations [
        <xref ref-type="bibr" rid="ref7 ref8">7,8</xref>
        ]. Existential
coverability has been considered, e.g., in [
        <xref ref-type="bibr" rid="ref15 ref16 ref17 ref5 ref6">15,16,17,6,5</xref>
        ] to reason about
correctness of Broadcast Protocols. For fragments of Broadcast Protocols, (existential)
coverability can be solved algorithmically via the symbolic backward
reachability procedure de ned for Well-structured Transition Systems in [
        <xref ref-type="bibr" rid="ref3">3,21</xref>
        ]. The
procedure, together with a number of approximations and heuristics, has been
implemented in the SMT-based In nite-state Model Checker Cubicle [
        <xref ref-type="bibr" rid="ref11">11</xref>
        ].
Cubicle provides a speci cation language that combines both local and global update
rules. The combination is particularly useful when dealing with speci cation of
the internal behavior of protocols designed for client-server architectures.
      </p>
      <p>
        In this paper we focus our attention on the application of Cubicle [
        <xref ref-type="bibr" rid="ref11">11</xref>
        ] to
formally specify and validate distributed protocols that combine asynchronous
communication and synchronous operations on data structures local to network
nodes. As a case-study, we consider the Redis Pub/Sub key-value Server adopted
in Cloud Storage and Internet of Things eco-systems. Redis Server is based on
a publish-subscribe architecture that can be used to guarantee the consistency
of updates in database systems of microservice architectures. Technically, in the
paper we rst present a formal model of the Pub/Sub protocol in the array-based
speci cation language of Cubicle. Following recent works on veri cation of
heardof and round-based models of distributed protocols [
        <xref ref-type="bibr" rid="ref13 ref18 ref19 ref20 ref9">9,18,19,20,24,13</xref>
        ], we apply
here a combination of round-based and shared-memory speci cation languages.
Round-based models are quite useful to split complex protocol executions into a
sequence of interconnected phases for which round numbers act as identi ers or
timestamps. Shared-memory models can be used (1) to model synchronization
steps of data structures local to server nodes and (2) to de ne asynchronous
interaction between client nodes (publishers and subscribers).
      </p>
      <p>Cubicle captures in a natural way the combination of these two types of
models. First of all, it provides declaration of multi-dimensional unbounded arrays.
For instance, the declaration array Sub[proc,proc]; denotes a bidimensional
array in which indexes range over an unbounded set of process identi ers. In
our case study, each row of an unbounded matrix can be used to model a
protocol phase, e.g., the current con guration of a subscriber group. Each cell in
a row can then be used to represent the current state of a subscriber,
publisher, message, and so on. Furthermore, Cubicle transitions can specify both
local and global modi cations to groups of array cells. Atomic global updates
are obtained by using universally quanti ed transitions. Asynchronous updates
can be obtained by splitting a global update in a series of local updates executed
non-deterministically.</p>
      <p>
        The resulting model is validated through the SMT-based veri cation engine
of Cubicle. Cubicle implements a symbolic backward reachability algorithm in
which sets of con gurations are represented via formulas in fragments of First
Order Logic that combine Presburger Arithmetics and the Theory of Arrays
[
        <xref ref-type="bibr" rid="ref11 ref4">11,25,4,22</xref>
        ]. By construction, the Cubicle veri cation algorithm ensures that,
upon termination, the resulting correctness proof is guaranteed to hold for any
number of processes. In other words Cubicle can be applied as an automated
engine for solving parameterized veri cation problems. For our case-study, we
successfully validated di erent versions of the Redis Pub/Sub protocol and
identify corner cases for the form of transition guards.
      </p>
      <p>The paper is organized as follows. We rst introduce our case-study. We then
propose a formalization guided by the above described combination of ideas
coming from round-based and shared memory speci cation models and by functional
requirements of the protocol. We then discuss validation results obtained via the
Cubicle engine. Finally, we discuss related work and address some future research
directions.
Redis is a Publish/Subscribe (Pub/Sub) system that can be used as key-value
server. Redis is used in microservice applications to ensure consistency of
updates of distributed databases. The underlying publish/subscribe protocol can
indeed be used to propagate local updates to a given key to a set of connected
services. In the original Pub/Sub implementation clients can use three types of
commands: PUBLISH, SUBSCRIBE, and UNSUBSCRIBE. To track
subscriptions, Redis uses a global variable pubsub channels which maps channel names
to sets of subscribed client objects. A client object is a virtual image of a
TCPconnected client maintained in the server. When a client submits a SUBSCRIBE
command for a given channel, its client object gets added to the set of clients
for that channel name as shown in Fig. 1. To PUBLISH, Redis looks up the
subscribers in the pubsub channels variable, and for each client, it schedules a job to
send the published message to the corresponding client socket. To optimize the
management of connection failures (e.g. clients close their connections), Redis
annotates each client with its set of subscribed channels, and keeps this in sync
with the main pubsub channels structure. This way, instead of iterating over
every channel, Redis only needs to visit the channels the client was subscribed to.
Fig. 2 illustrates the con guration obtained from Fig. 1 when adding the above
mentioned auxiliary structure. At the implementation level the pubsub channels
is de ned as an hash table to optimize key-search and hash table resizing. To
summarize, the algorithm for the PUBLISH and (UN)SUBSCRIBE operations
are informally de ned as follows.</p>
      <p>{ To PUBLISH, hash the channel name to get a hash chain. Iterate over the
hash chain, comparing each channel name to our target channel name. Once
the target channel name is found, get the corresponding list of clients. Iterate
over the linked list of clients, sending the published message to each client.
{ To SUBSCRIBE, nd the linked list of clients as before. Append the new
client to the end of the linked list (constant time). Also, add the channel to
the client's hash table (constant time).
{ To UNSUBSCRIBE, nd the linked list of clients for the channel, as before.</p>
      <p>Then iterate over the entire list and remove the client.</p>
      <p>Further optimizations are related to lazy resizing strategies of hash tables and
bit-level representation of hash tables and channel names. We do not describe
these features here and focus instead on the protocol skeleton used in the Redis
server.
3</p>
    </sec>
    <sec id="sec-2">
      <title>Formal Speci cation of the Redis Pub/Sub Server</title>
      <p>To model the Redis architecture and extract correctness requirements, we will
rst focus on some peculiarities and properties of the underlying Pub/Sub
protocol. First of all, we remark that the object manipulated in the Server data
structures represent TCP client connections. A TCP connection can be viewed
as a perfect channel in which messages are delivered in the same order as they
are sent. Under this assumption, we can restrict ourselves to failures due to
network connections drops or to explicit client disconnections. Furthermore, we will
assume that (1) the Redis implementation ensures the synchronization between
the di erent data structures maintained in the server, (2) each data structure
(e.g. pubsub channel) is maintained consistent via standard concurrency
control abstractions (concurrent data structures, synchronized blocks, etc). These
assumptions allows us to focus on a model with two di erent layers: (1) a
synchronous layer used to model updates of the data structure maintained by the
Redis server. (2) an asynchronous layer used to model responses. More precisely,
subscribe requests will be modeled via synchronous updates of an abstraction of
the pubsub channel data structure, whereas publish requests will be modeled in
two phases: a synchronous step used to update the server data structures and
and asynchronous one used to send noti cations to subscribers.</p>
      <p>
        Another important observation is related to the expected behavior of the
Pub/Sub protocol. Subscribe and unsubscribe requests can be submitted any
time to a Redis server. Thus, at least in principle, it is impossible to
guarantee that, for a xed topic, a given update will reach all subscribers that are in
the pubsub channel during the completion of a publish request. For instance,
a subscriber can join the server right after the update has been distributed to
all TCP connection objects but before it is actually received by all clients, an
unsubscribe request can be received by the server before the completion of the
publish request of another client, a TCP connection might drop during the
protocol execution, etc. To model the above mentioned scenarios, it is convenient
to adopt a round-based view of the protocol behavior. In each round we use a
shared memory model to specify the current state of the pubsub channel. More
speci cally, we use two unbounded arrays Sub and Msg, indexed on round and
process indenti ers, to model: (1) the state of subscribers in di erent rounds
of the protocol, and (2) messages waiting to be delivered to subscribers in that
round. Notice that each row of the two matrices is associated to a distinct round.
A round consists of synchronous steps in which either a (non deterministically
selected) subscriber joins a group associated to a given topic or a publisher
prepares the message to be sent to the current set of subscribers. The asynchronous
phase of a round consists in the distribution of noti cations to the subscriber
group. Rounds are used here as a conceptual tool to model di erent phases of
the protocol. In real execution traces several phases may overlap. Following the
methodology discussed in [
        <xref ref-type="bibr" rid="ref18 ref19 ref20 ref9">9,18,19,20</xref>
        ], overlappings can be eliminated by using
permutation schemes (e.g. left and right movers). To model the dynamics of
subscribers groups, we operate as follows. Subscribers can non-deterministically
create new groups by selecting a round number for which there are no
pending messages prepared by publishers. As soon as a publisher associates to that
round number a given message object (preparation of the noti cation phase),
new subscribers need to create new groups using a fresh round identi er. The
interesting point of a round-based model of the protocol is that the same idea
can be applied to model network failures and recon gurations. Indeed anytime
any con guration of a subscriber group can be generated by selecting a fresh
round identi ers and discharging the previous one. In other words for any
possible real protocol executions we can rearrange protocol and group formation
steps in order to de ne a sequence of rounds with the same groups and the same
set of noti cations. For instance, an execution in which several messages are sent
to the same subscribers can be mimicked by a sequence of rounds in which a
single message is sent to every subscriber and so on.
      </p>
      <p>We do not consider here any order between round identi ers. The reason is
that we rely on TCP connections for maintaining the order between a sequence
of updates sent by the same publisher. However our goal is to show the
correspondence between updates sent by a publisher and received by a subscriber
within the same round. To ensure this property, we need to ensure freshness
of every newly created subscriber group, and ensure that object preparation is
done synchronously (or using some form of serialization step).</p>
      <p>In our model we apply some additional abstractions. Firstly, we focus on
a single channel name (topic), assuming that the synchronization of the data
structure associating clients to topics and topics to clients are done correctly
in the protocol implementation of the Redis server Secondly, we consider only
noti cations with two possible values, namely One and Two, since we two values
are enough to show a possible inconsistency between a publisher and a subscriber
view of the same update.</p>
      <p>Figure 3 summarizes the intuition of the model that we will formally specify
using Cubicle's input language in the rest of the section.</p>
      <sec id="sec-2-1">
        <title>Array Variables</title>
        <p>We rst de ne types and array variables to model publishers, subscribers, and
pending object messages in di erent rounds.
type pstate = Idle | Busy | One | Two
type sstate = SIdle | SOne | STwo
type mstate = Null | MOne | MTwo
array Pub[proc] : pstate
array P[proc,proc] : pstate
array S[proc,proc] : sstate
array Sub[proc,proc] : bool
array Msg[proc,proc] : mstate
More speci cally, the interpretation of the declared data structures is as follows:
{ pstate de nes the publisher state,
{ sstase de nes the subscriber state,
{ mstate is used to model the state of the shared-memory,
{ Pub models the state of publishers: Pub[n] is initially Idle and it is set to</p>
        <p>Busy after the selection of a round number.
{ P models the state of publishers after the selection of a round number, i.e.,
Pub[t,n]=One [resp. Two] means that, in round t, n has chosen to send One
[resp. Two].
{ Sub models a subscriber group in a speci c round, i.e., Sub[t; p] = T rue if,
in round t, p belongs to the subscriber group.
{ S models the state of subscribers after the selection of round numbers.
{ nally, Msg models the ow of messages from publishers to subscribers, i.e.,
Msg[t,p] identi es a message that, in round t, has to be delivered to
subscriber p.
The initial con guration is de ned via the following Cubicle statement.
init (t n) {</p>
        <p>Pub[n] = Idle &amp;&amp;
P[t,n] = Idle &amp;&amp;
S[t,n] = SIdle &amp;&amp;
Sub[t,n] = False &amp;&amp;</p>
        <p>Msg[t,n] = Null
The above statement must be interpreted as a conjunctive formula universally
quanti ed over t and n. In other words in the initial con guration Pub,P and S
are in idle state, there are no subscription groups and no message objects.
The rst transitions speci es the subscription step of a given client.
transition subscribe(t n)
requires {</p>
        <p>Msg[t,n] = Null &amp;&amp;
Msg[t,t] = Null &amp;&amp;
forall_other r. (Msg[t,r] = Null)
}
{
Sub[t,n] := True;
}
For a subscriber to join a group at round t, the rule requires the absence of
message objects in the same round. Since the initial con guration does not put
any constraint on groups, any subscriber group can be generated by using this
rule until a given round identi er t remains fresh.</p>
      </sec>
      <sec id="sec-2-2">
        <title>Publish</title>
        <p>The second transition combines an asynchronous request done by a publisher
with a synchronous step done by the Redis server in order to prepare message
objects for every subscriber of the current round.
transition publish1(t n)
requires {</p>
        <p>Pub[n] = Idle &amp;&amp;
Msg[t,n] = Null &amp;&amp;
Msg[t,t] = Null &amp;&amp;
forall_other r. (Msg[t,r] = Null)
}
{
Pub[n] := Busy;
P[t,n] := One;
Msg[p,q] := case
| p=t &amp;&amp; q=n : MOne
| p=t &amp;&amp; Sub[t,q]=True : MOne
| _ : Msg[p,q];
In this rule a publisher with identi er n selects a fresh round number (in which
subscribers could have formed a group with arbitrary shape) and then prepares
message objects for every subscriber associated to that round number.
The rst case p=t &amp;&amp; q=n : MOne of the update rule is used to insert at least
a MOne message in the current round (in case there are no other subscribers).
The second case p=t &amp;&amp; Sub[t,q]=True : MOne assigns the state MOne to the
message object of every subscriber. The state of the message objects of other
rounds or other indexes remains unchanged.</p>
        <p>The following rule is used to select value T wo and assign state M T wo to
message objects.
transition publish2(t n )
requires {</p>
        <p>Pub[n] = Idle &amp;&amp;
Msg[t,n] = Null &amp;&amp;
Msg[t,t] = Null &amp;&amp;
forall_other r. (Msg[t,r] = Null)
}
{
Pub[n] := Busy;
P[t,n] := Two;
Msg[p,q] := case
| p=t &amp;&amp; q=n : MTwo
| p=t &amp;&amp; Sub[p,q]=True : MTwo
| _ : Msg[p,q];</p>
        <p>The combined e ect of the previous rules is that of storing the type of noti
cation (One or Two), in a non-deterministically chosen, unused round identi er t,
and of initializing the state of every cell ht; qi (current round t, subscriber q) of
the Msg matrix with the corresponding states (MOne for One and MTwo for Two).</p>
        <p>Finally, we assume that publishers can reset their state and return to the
Idle state in order to start a new round (and possibly send a di erent value).
transition reset(n)
requires {</p>
        <p>Pub[n] = Busy
We now come to the de nition of the noti cation phase. Noti cations are
generated by non-deterministically delivering message objects to subscribers.
}
{
}
{</p>
        <p>Pub[n] := Idle;</p>
      </sec>
      <sec id="sec-2-3">
        <title>Noti cations</title>
        <p>ttransition notify1(t n)
requires {</p>
        <p>S[t,n] = SIdle &amp;&amp;
Msg[t,n] = MOne
transition notify2(t n)
requires {</p>
        <p>S[t,n] = SIdle &amp;&amp;
Msg[t,n] = MTwo</p>
        <p>S[t,n] := STwo;
4</p>
      </sec>
    </sec>
    <sec id="sec-3">
      <title>Validation through Cubicle</title>
      <p>Our correctness requirement must necessarily be formulated with respect to a
given round. More speci cally, we would like to show that only when a subscriber
group remains stable for a long enough period (that we identify as a round),
then every noti cation sent by the publisher will be received by every subscriber
in the group. This kind of property is similar to correctness criteria used in
consensus protocols like Paxos. Under this hypothesis, unsafe con gurations can
be speci ed using the following judgements adopted by Cubicle to specify bad
con gurations:
}
}
{
}
}
}
}
The subscriber state S stores in a local state the value of the received message
for the current round number.
unsafe (t m n) {</p>
      <p>P[t,m] = One &amp;&amp; S[t,n] = STwo
}
}
unsafe (t m n) {</p>
      <p>P[t,m] = Two &amp;&amp; S[t,n] = SOne
unsafe (t n) {</p>
      <p>P[t,n] = Two &amp;&amp; S[t,n] = SOne
unsafe (t n) {</p>
      <p>P[t,n] = One &amp;&amp; S[t,n] = STwo
Cubicle interprets this kind of formulas as existentially quanti ed over the
parameter names. Therefore, the judgements specify con gurations in which, through
the shared-memory model of subscription and message objects, values read by
subscribers are di erent from those published by publishers in the same round.</p>
    </sec>
    <sec id="sec-4">
      <title>Cubicle Engine at Work</title>
      <p>The Cubicle veri cation engine is based on symbolic backward exploration.
Cubicle operates over sets of existentially quanti ed formulas called cubes. The
search procedure maintains a set V and a priority queue Q resp. of visited and
unvisited cubes. Initially, let V be empty and let Q contain the cubes
representing bad states. At each iteration, the procedure selects the highest-priority
cube from Q and checks for intersection with the formula denoting the initial
con gurations (satis ability of conjunction of and formulas in the initial
conditions). If the test fails, it terminates reporting a possibile error trace. If the
test passes, the procedure proceeds to the subsumption check, i.e., implication
between formulas. If subsumption fails, then add to V , compute all cubes in
predt (for every t), add them to Q, and move on to the next iteration. If the
subsumption check succeeds, then drop from consideration and move on. The
algorithm terminates when a safety check fails or Q becomes empty. When an
unsafe cube is found, Cubicle actually produces a counterexample trace.</p>
      <p>
        Formulas containing universally quanti ed formulas (generated during the
computation of predecessors) are over-approximated by existentially quanti ed
formulas. In presence of universally quanti ed guards the class of formulas
manipulated by the backward reachability loop of Cubicle in not closed under
preimage. To handle such formulas, Cubicle implements a safe but over-approximate
pre-image computation. Given a cube 9i: and a guard G of the form 8j: (j),
the pre-image replaces G by the conjunction V 2 (j;i) (j) of instances over
the permutation of (j; i). In other words, in order to handle universally
quantied guards, Cubicle applies a declarative (and syntactic) version of the monotone
abstraction introduced in [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ]. Safety checks, being ground satis ability queries,
are easy for SMT solvers. The challenge is in the subsumption check because
of their size and the existential implies existential logical form. Cubicle applies
the heuristics described in [
        <xref ref-type="bibr" rid="ref11">11</xref>
        ] to handle subsumption. The BRAB algorithm,
introduced in [
        <xref ref-type="bibr" rid="ref12">12</xref>
        ], automatically computes over-approximations of backward
reachable states that are checked to be unreachable in a nite instance of the
system using the Mur model checker. The resulting approximations
(candidate invariants) are model checked together with the original safety properties.
Completeness of the approach is ensured by a mechanism for backtracking on
spurious traces introduced by too coarse approximations.
5.1
      </p>
      <sec id="sec-4-1">
        <title>Pub/Sub Protocol Validation</title>
        <p>When applying Cubicle to our formal model of the Redis Pub/Sub protocol
enriched with judgments expressing bad con gurations, the tool proves the model
correct in few seconds. More speci cally, Cubicle visits 20 nodes with at most 3
process indexes, 970 xpoint checks, and 806 calls to the Alt-Ergo SMT solver.
Since Cubicle operates over unbounded arrays, the above result provides a
correctness proof of the considered model for any number of publishers and
subscribers. The proof certi cate can be obtained by taking the (negation of the)
set of assertions (formulas) collected during the xpoint computation. When</p>
        <p>
          D I C
3 0 0 Yes
3 0 0 Yes
3 0 6 Yes
3 0 8 Yes
3 0 0 No
Fig. 4. Experimental results: V=visited nodes, F= xpoint tests, S=solver calls,
M=max process number, D=deleted node, I=number of invariants (brab),
C=property checked (Yes/No).
invoked using the BRAB algorithm with parameter 2 the tool infers 6
invariants that reduce the visited nodes to 12, the xpoint checks to 518, and the
number of calls to the solver to 291. The execution time remains unchainged.
When invoked using the BRAB algorithm with parameter 3 the tool infers 8
invariants at the cost of a signi cant increase of the execution time. The table
in Fig. 4 summarizes the results obtained with the di erent heuristics provided
by Cubicle. In Fig. 4, in order to check robustness, we also consider variations,
as such as Redis1, of the above discussed model. Redis1 is obtained by
removing from the publisher rules the the rst case in the Msg update action, namely
| p=t &amp;&amp; q=n : MOne in publish1 and | p=t &amp;&amp; q=n : MTwo in publish2.
When validated in Cubicle, this modi cation leads to the following error trace
(in the Cubicle output notation):
pub1(#1,#2)-&gt;Sub(#1, #3)-&gt;pub2(#1,#3)-&gt;notify2(#1,#3)-&gt;unsafe[
          <xref ref-type="bibr" rid="ref1">1</xref>
          ].
In the trace we can nd two phases (rounds) that are not separated via distinct
identi ers. This leads to the following undesired behaviour: a publisher sends a
message, say One, when no subscriber is registered to the considered topic, yet.
As a consequence no message object is inserted in the shared-memory (Redis
server data structure). Subscribers can then re-use the same round number and,
in the second part of the session, join the group before a second message of type
Two is brodcast to the subscriber group. The guard in the update rule forbids
this behavior by marking the round after the rst publish message as used. This
way, we enforce the correspondence between round numbers and protocol phases.
6
        </p>
      </sec>
    </sec>
    <sec id="sec-5">
      <title>Related Work and Conclusions</title>
      <p>
        We have presented an application of the SMT-based In nite-state Model Checker
Cubicle to the veri cation of a parameterized model of the Pub/Sub architecture
implemented in the Redis server. The formal speci cation is based on the
combination of a round-based interpretation of the protocol behavior with a shared
memory representation of the updates to its internal data structures. This work
is strictly related, although applied in a di erent class of protocols, with our
recent work on the application of logic-based declarative methods for the
verication of distributed systems [
        <xref ref-type="bibr" rid="ref10 ref14">14,10</xref>
        ]. More speci cally, in [
        <xref ref-type="bibr" rid="ref10 ref14">14,10</xref>
        ] we proposed
to apply a logic-based language called GLog and Cubicle [
        <xref ref-type="bibr" rid="ref11">11,23</xref>
        ] as a declarative
veri cation framework for distributed systems. GLog is based on a quanti ed
predicate logic in a nite relational signature with no function symbols. Con
gurations are represented as sets of ground atomic formulas (instances of unary
and binary predicates). Update rules consist of a guard and two sets of rst
order predicates that de ne resp. deletion and addition of state components.
Rules can be applied to update a global con guration component by component
and to test global conditions on the vicinity of a node by restricting updates
to given predicates. Termination of an update subprotocol can then be checked
via a global condition. Similar speci cation patterns have been applied to model
non-atomic consistency protocol and mutual exclusion protocols with non-atomic
global conditions. GLog has been applied to manually analyze distributed
protocols in [
        <xref ref-type="bibr" rid="ref14">14</xref>
        ]. Cubicle [
        <xref ref-type="bibr" rid="ref11">11,23</xref>
        ], an SMT-based in nite-state model checker based on
work by Ghilardi et al. [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ], can be applied as an automated veri cation engine for
existentially quanti ed coverability queries in GLog. In Cubicle parameterized
systems can be speci ed as unbounded arrays in which individual components
can be referred to via an array index. The Cubicle veri cation engine performs a
symbolic backward reachability analysis using an SMT solver for computing
intermediate steps (preimage computation, entailment and termination test) and
applies overapproximates predecessors using upward closed sets as in monotone
abstractions [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ]. A peculiar feature of Cubicle w.r.t. MCMT [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ] is that the tool
can handle unbounded matrices. This is particularly relevant when modeling
topology-sensitive protocols as done in GLog using binary relations de ned over
component identi ers. Furthermore, existentially quanti ed coverability decision
problems can be mapped into Cubicle. Indeed, classes of initial con gurations are
speci ed by using partial speci cations of initial con gurations in Cubicle veri
cation judgements. In nite sets of bad con gurations can be expressed as unsafe
con gurations in Cubicle veri cation judgements. We believe that the proposed
methodology (array-based speci cations of round-based protocols with complex
local data structures, veri cation via symbolic exploration) is applicable to other
classes of distributed systems such as consensus protocols or protocols that use
consensus protocols as building blocks (e.g. distributed objects/ledgers).
ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages,
POPL 2016, St. Petersburg, FL, USA, January 20 - 22, 2016, pages 400{415, 2016.
21. A. Finkel and P. Schnoebelen. Well-structured transition systems everywhere!
      </p>
      <p>Theor. Comput. Sci., 256(1-2):63{92, 2001.
22. S. Ghilardi and S. Ranise. Backward reachability of array-based systems by SMT
solving: Termination and invariant synthesis. Logical Methods in Computer
Science, 6(4), 2010.
23. A. Mebsout. Inference d'invariants pour le model checking de systemes parametres.
(Invariants inference for model checking of parameterized systems). PhD thesis,
University of Paris-Sud, Orsay, France, 2014.
24. T. Tsuchiya and A. Schiper. Veri cation of consensus algorithms using satis ability
solving. Distributed Computing, 23(5-6):341{358, 2011.
25. http://users.mat.unimi.it/users/ghilardi/mcmt/.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <given-names>P. A.</given-names>
            <surname>Abdulla</surname>
          </string-name>
          and
          <string-name>
            <given-names>G.</given-names>
            <surname>Delzanno</surname>
          </string-name>
          .
          <article-title>Parameterized veri cation</article-title>
          .
          <source>STTT</source>
          ,
          <volume>18</volume>
          (
          <issue>5</issue>
          ):
          <volume>469</volume>
          {
          <fpage>473</fpage>
          ,
          <year>2016</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <given-names>P. A.</given-names>
            <surname>Abdulla</surname>
          </string-name>
          , G. Delzanno,
          <string-name>
            <given-names>N. Ben</given-names>
            <surname>Henda</surname>
          </string-name>
          ,
          <article-title>and</article-title>
          <string-name>
            <given-names>A.</given-names>
            <surname>Rezine</surname>
          </string-name>
          .
          <article-title>Monotonic abstraction: on e cient veri cation of parameterized systems</article-title>
          .
          <source>Int. J. Found. Comput. Sci.</source>
          ,
          <volume>20</volume>
          (
          <issue>5</issue>
          ):
          <volume>779</volume>
          {
          <fpage>801</fpage>
          ,
          <year>2009</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <given-names>P. A.</given-names>
            <surname>Abdulla</surname>
          </string-name>
          and
          <string-name>
            <given-names>B.</given-names>
            <surname>Jonsson</surname>
          </string-name>
          .
          <article-title>Ensuring completeness of symbolic veri cation methods for in nite-state systems</article-title>
          .
          <source>Theor. Comput. Sci.</source>
          ,
          <volume>256</volume>
          (
          <issue>1-2</issue>
          ):
          <volume>145</volume>
          {
          <fpage>167</fpage>
          ,
          <year>2001</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <given-names>F.</given-names>
            <surname>Alberti</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Ghilardi</surname>
          </string-name>
          , and
          <string-name>
            <given-names>N.</given-names>
            <surname>Sharygina</surname>
          </string-name>
          .
          <article-title>A framework for the veri cation of parameterized in nite-state systems</article-title>
          . Fundam. Inform.,
          <volume>150</volume>
          (
          <issue>1</issue>
          ):1{
          <fpage>24</fpage>
          ,
          <year>2017</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <given-names>N.</given-names>
            <surname>Bertrand</surname>
          </string-name>
          ,
          <string-name>
            <given-names>G.</given-names>
            <surname>Delzanno</surname>
          </string-name>
          ,
          <string-name>
            <surname>B.</surname>
          </string-name>
          <article-title>Konig, A. Sangnier, and</article-title>
          <string-name>
            <given-names>J.</given-names>
            <surname>Stu</surname>
          </string-name>
          <article-title>ckrath. On the decidability status of reachability and coverability in graph transformation systems</article-title>
          .
          <source>In RTA'12</source>
          , volume
          <volume>15</volume>
          <source>of LIPIcs</source>
          , pages
          <volume>101</volume>
          {
          <fpage>116</fpage>
          .
          <string-name>
            <surname>Schloss</surname>
          </string-name>
          Dagstuhl - Leibniz-Zentrum fuer Informatik,
          <year>2012</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <given-names>N.</given-names>
            <surname>Bertrand</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P.</given-names>
            <surname>Fournier</surname>
          </string-name>
          ,
          <article-title>and</article-title>
          <string-name>
            <given-names>A.</given-names>
            <surname>Sangnier</surname>
          </string-name>
          .
          <article-title>Distributed local strategies in broadcast networks</article-title>
          .
          <source>In 26th International Conference on Concurrency Theory, CONCUR</source>
          <year>2015</year>
          , Madrid, Spain,
          <source>September 1.4</source>
          ,
          <issue>2015</issue>
          , pages
          <fpage>44</fpage>
          {
          <fpage>57</fpage>
          ,
          <year>2015</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7.
          <string-name>
            <given-names>R.</given-names>
            <surname>Bloem</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Jacobs</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Khalimov</surname>
          </string-name>
          , I. Konnov,
          <string-name>
            <given-names>S.</given-names>
            <surname>Rubin</surname>
          </string-name>
          ,
          <string-name>
            <given-names>H.</given-names>
            <surname>Veith</surname>
          </string-name>
          , and
          <string-name>
            <given-names>J.</given-names>
            <surname>Widder</surname>
          </string-name>
          .
          <article-title>Decidability of Parameterized Veri cation</article-title>
          .
          <source>Synthesis Lectures on Distributed Computing Theory</source>
          . Morgan &amp; Claypool Publishers,
          <year>2015</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          8.
          <string-name>
            <given-names>R.</given-names>
            <surname>Bloem</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Jacobs</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Khalimov</surname>
          </string-name>
          , I. Konnov,
          <string-name>
            <given-names>S.</given-names>
            <surname>Rubin</surname>
          </string-name>
          ,
          <string-name>
            <given-names>H.</given-names>
            <surname>Veith</surname>
          </string-name>
          , and
          <string-name>
            <given-names>J.</given-names>
            <surname>Widder</surname>
          </string-name>
          .
          <article-title>Decidability in parameterized veri cation</article-title>
          .
          <source>SIGACT News</source>
          ,
          <volume>47</volume>
          (
          <issue>2</issue>
          ):
          <volume>53</volume>
          {
          <fpage>64</fpage>
          ,
          <year>2016</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          9.
          <string-name>
            <given-names>B.</given-names>
            <surname>Charron-Bost</surname>
          </string-name>
          and
          <string-name>
            <given-names>A.</given-names>
            <surname>Schiper</surname>
          </string-name>
          .
          <article-title>The heard-of model: computing in distributed systems with benign faults</article-title>
          .
          <source>Distributed Computing</source>
          ,
          <volume>22</volume>
          (
          <issue>1</issue>
          ):
          <volume>49</volume>
          {
          <fpage>71</fpage>
          ,
          <year>2009</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          10. S. Conchon,
          <string-name>
            <surname>G.</surname>
          </string-name>
          <article-title>Delzanno, and</article-title>
          <string-name>
            <given-names>A.</given-names>
            <surname>Ferrando</surname>
          </string-name>
          .
          <article-title>Parameterized veri cation of topologysensitive distributed protocols goes declarative</article-title>
          .
          <source>In Proceedings of NETYS</source>
          <year>2018</year>
          , to appear,
          <year>2018</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          11.
          <string-name>
            <given-names>S.</given-names>
            <surname>Conchon</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Goel</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Krstic</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Mebsout</surname>
          </string-name>
          , and
          <string-name>
            <given-names>F.</given-names>
            <surname>Za</surname>
          </string-name>
          <article-title>di. Cubicle: A parallel smtbased model checker for parameterized systems - tool paper</article-title>
          . In Computer Aided Veri cation - 24th
          <source>International Conference, CAV 2012</source>
          , Berkeley, CA, USA, July
          <volume>7</volume>
          -
          <issue>13</issue>
          ,
          <year>2012</year>
          Proceedings, pages
          <volume>718</volume>
          {
          <fpage>724</fpage>
          ,
          <year>2012</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          12.
          <string-name>
            <given-names>S.</given-names>
            <surname>Conchon</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Goel</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Krstic</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Mebsout</surname>
          </string-name>
          , and
          <string-name>
            <given-names>F.</given-names>
            <surname>Za</surname>
          </string-name>
          <article-title>di. Invariants for nite instances and beyond</article-title>
          . In Formal Methods in Computer-Aided Design,
          <string-name>
            <surname>FMCAD</surname>
          </string-name>
          <year>2013</year>
          ,
          <article-title>Portland</article-title>
          ,
          <string-name>
            <surname>OR</surname>
          </string-name>
          , USA, October
          <volume>20</volume>
          -
          <issue>23</issue>
          ,
          <year>2013</year>
          , pages
          <fpage>61</fpage>
          {
          <fpage>68</fpage>
          ,
          <year>2013</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          13.
          <string-name>
            <given-names>H.</given-names>
            <surname>Debrat</surname>
          </string-name>
          and
          <string-name>
            <given-names>S.</given-names>
            <surname>Merz</surname>
          </string-name>
          .
          <article-title>Verifying fault-tolerant distributed algorithms in the heard-of model</article-title>
          .
          <source>Archive of Formal Proofs</source>
          ,
          <year>2012</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref14">
        <mixed-citation>
          14.
          <string-name>
            <given-names>G.</given-names>
            <surname>Delzanno</surname>
          </string-name>
          .
          <article-title>A logic-based approach to verify distributed protocols</article-title>
          .
          <source>In Proceedings of the 31st Italian Conference on Computational Logic</source>
          , Milano, Italy, June 20-22,
          <year>2016</year>
          ., pages
          <volume>86</volume>
          {
          <fpage>101</fpage>
          ,
          <year>2016</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref15">
        <mixed-citation>
          15. G. Delzanno,
          <string-name>
            <given-names>A.</given-names>
            <surname>Sangnier</surname>
          </string-name>
          , and
          <string-name>
            <given-names>G.</given-names>
            <surname>Zavattaro</surname>
          </string-name>
          .
          <article-title>Parameterized veri cation of ad hoc networks</article-title>
          .
          <source>In CONCUR 2010 - Concurrency Theory, 21th International Conference, CONCUR 2010</source>
          , Paris, France,
          <source>August 31-September 3</source>
          ,
          <year>2010</year>
          . Proceedings, pages
          <volume>313</volume>
          {
          <fpage>327</fpage>
          ,
          <year>2010</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref16">
        <mixed-citation>
          16. G. Delzanno,
          <string-name>
            <given-names>A.</given-names>
            <surname>Sangnier</surname>
          </string-name>
          , and
          <string-name>
            <given-names>G.</given-names>
            <surname>Zavattaro</surname>
          </string-name>
          .
          <article-title>On the power of cliques in the parameterized veri cation of ad hoc networks</article-title>
          .
          <source>In Foundations of Software Science and Computational Structures - 14th International Conference, FOSSACS</source>
          <year>2011</year>
          ,
          <article-title>Held as Part of the Joint European Conferences on Theory and Practice of Software, ETAPS 2011</article-title>
          , Saarbrucken, Germany, March 26-April 3,
          <year>2011</year>
          . Proceedings, pages
          <volume>441</volume>
          {
          <fpage>455</fpage>
          ,
          <year>2011</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref17">
        <mixed-citation>
          17. G. Delzanno,
          <string-name>
            <given-names>A.</given-names>
            <surname>Sangnier</surname>
          </string-name>
          , and
          <string-name>
            <given-names>G.</given-names>
            <surname>Zavattaro</surname>
          </string-name>
          .
          <article-title>Veri cation of ad hoc networks with node and communication failures</article-title>
          .
          <source>In FORTE/FMOODS'12</source>
          , volume
          <volume>7273</volume>
          <source>of LNCS</source>
          , pages
          <volume>235</volume>
          {
          <fpage>250</fpage>
          . Springer,
          <year>2012</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref18">
        <mixed-citation>
          18.
          <string-name>
            <surname>C. Dragoi</surname>
            ,
            <given-names>T. A.</given-names>
          </string-name>
          <string-name>
            <surname>Henzinger</surname>
            ,
            <given-names>H.</given-names>
          </string-name>
          <string-name>
            <surname>Veith</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          <string-name>
            <surname>Widder</surname>
            , and
            <given-names>D.</given-names>
          </string-name>
          <article-title>Zu erey. A logic-based framework for verifying consensus algorithms</article-title>
          . In Veri cation,
          <source>Model Checking, and Abstract Interpretation - 15th International Conference, VMCAI</source>
          <year>2014</year>
          , San Diego, CA, USA, January
          <volume>19</volume>
          -
          <issue>21</issue>
          ,
          <year>2014</year>
          , Proceedings, pages
          <volume>161</volume>
          {
          <fpage>181</fpage>
          ,
          <year>2014</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref19">
        <mixed-citation>
          19.
          <string-name>
            <surname>C. Dragoi</surname>
            ,
            <given-names>T. A.</given-names>
          </string-name>
          <string-name>
            <surname>Henzinger</surname>
            , and
            <given-names>D.</given-names>
          </string-name>
          <article-title>Zu erey. The need for language support for fault-tolerant distributed systems</article-title>
          .
          <source>In 1st Summit on Advances in Programming Languages, SNAPL 2015, May 3-6</source>
          ,
          <year>2015</year>
          , Asilomar, California, USA, pages
          <volume>90</volume>
          {
          <fpage>102</fpage>
          ,
          <year>2015</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref20">
        <mixed-citation>
          20.
          <string-name>
            <surname>C. Dragoi</surname>
            ,
            <given-names>T. A.</given-names>
          </string-name>
          <string-name>
            <surname>Henzinger</surname>
            , and
            <given-names>D.</given-names>
          </string-name>
          <article-title>Zu erey. Psync: a partially synchronous language for fault-tolerant distributed algorithms</article-title>
          .
          <source>In Proceedings of the 43rd Annual</source>
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>