3 OVERVIEW OF THE
LANGUAGE TLA
+
TLA
+
is a language intended for the high level speci-
fication of reactive, distributed, and in particular asyn-
chronous systems. It combines the linear-time tempo-
ral logic of actions TLA (Lamport, 1994), and mathe-
matical set theory. The language has a mechanism for
structuring in the form of modules, either by exten-
sion, or by instance. The semantics of TLA is based
on behaviors of state variables. It can be viewed as a
logic built in an incremental way in three stages :
1. predicates whose semantics is based on states.
2. actions whose semantics is based on pairs of
states.
3. temporal formulas of actions whose semantics is
based on state behaviors of variables.
A TLA specification of a system denoted by
Spec(S) looks like : Init ∧ [Next]
x
∧ L where :
1. Init is the predicate which specifies initial states,
2. x is the list of all state variables and [Next]
x
means that either two consecutive states are equal
on x, x
′
= x (stuttering), or Next is an action (a re-
lation) that describes the next-state relation, usu-
ally written as a disjunction of more elementary
actions,
3. L is a fairness assumption (strong or weak) on
actions. WF
unprimed
var(S)
(S) defines the condi-
tion of weak fairness over the system S and
SF
unprimed var(S)
(S) defines the condition of strong
fairness over the system S, where primed
var(S)
are primed occurrences of the system variables x
and as is conventional, a primed occurrence v
′
of
a state variable v denotes the value of v in the
state following the transition described by Next.
unprimed
var(S) are unprimed occurrences of the
system variables x and an unprimed occurrence
denotes the value of a variable v in the state be-
fore the transition.
In the sequel we will focus on the extension of the
event B method with liveness properties, their syntax,
their semantics and verification rules.
4 ASSIGNING TEMPORAL
MEANING TO B MODELS
This section defines an extension to event B in order
to deal with liveness properties. The most important
construction we need is the ”leads to” eventuality op-
erator as in TLA and Unity which expresses require-
ments on behaviors, i.e. sequence of states. In order
to assess eventuality properties we must state assump-
tions on the fair occurrence of events. Such assump-
tions are stated using the TLA operators WF and SF.
WF(e) assumes that the event e is weakly fair, i.e. the
event e occurs infinitely often provided that it is even-
tually always enabled. SF(e) assumes that the event e
is strongly fair, i.e. the event e occurs infinitely often
provided that it is infinitely often enabled.
We indeed integrate some pieces of the language
TLA
+
into the event B models and we deal with proof
obligations of ”temporal” B models.
In the following, we start with the syntax of the
extension, then we give a semantics and verification
rules of liveness properties over traces as it is done in
TLA
+
. We suggest the use of TLA
+
operators because
the two methods are very close with respect to their
foundations.
4.1 Syntax of the Extension
In order to establish liveness properties we must as-
sume some progress conditions on the system. As
long as we have to verify that an event system sat-
isfies safety properties, it is sufficient to refer to a pair
of states (before and after states of a triggering event).
But in order to prove temporal properties we need
to introduce behaviors (sequences of states) starting
from the initial state and where two consecutive states
s
i
and s
i+1
are such that some event enabled in s
i
and
leads to the state s
i+1
.
Before defining the syntax of formulae which ex-
tends B expressivity, we start with some definitions.
State and rigid variables. The state of a system is
composed of a denumerable set of flexible or state
variables (V). Let (X) be a denumerable set of rigid
variables. These variables are not modified by pro-
gram transitions and hence keep the initially chosen
value during a program run (logical constant). A state
is a valuation of flexible variables.
Terms and States. A term t is defined recursively as
follows :
t ::= c | x | f (t
1
, ...,t
n
) where c is a constant, x is a
variable (x ∈ [V ∪ X]) , t
1
, ...,t
n
are terms and f is a
function symbol with arity n.
Atomic propositions. An atomic proposition ap is a
formula of the form :
ap ::= p(t
1
, ...,t
n
) where p is a predicate symbol with
arity n and t
1
, ...,t
n
are terms.
State predicates. A state predicate sp is a formula
defined by the following grammar
sp ::= ap | ¬sp | sp∨ sp | sp∧ sp | sp ⇒ sp | sp ⇔
SPECIFICATION AND PROOF OF LIVENESS PROPERTIES IN B EVENT SYSTEMS
29