

























Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!


























Jos´ e Meseguer Computer Science Department University of Illinois at Urbana-Champaign 1
Abstraction Methods To prove that a, possibly infinite-state, Kripke structure
and initial state a satisfy an
− formula ϕ , with, say,
the set of atomic propositions actually appearing in ϕ , it is enough to find an
-simulation
and an initial state b
such that aHb and:
the set of states reachable from b in
is finite, and
ϕ . Then, we can model check the property
, b
ϕ to prove A , a
ϕ
. Methods to find such an
are called abstraction methods
. This lecture will describe some recent results in joint work with Narciso Mart´ ı-Oliet and Miguel Palomino on abstraction methods for systems specified by rewritetheories. 2
Equational Quotient Abstractions We are of course particularly interested in abstractionmethods for systems specified by rewrite theories. Recallthat, given a rewrite theory
, E, φ, R
and a kind k , we can associate to its reachability initial model
Reach ( R ) the Kripke structure,
, k
Σ /E,k
1 R
R
where, by definition,
t
1 R [t ′
t
t ′
Reach ( R ) ,Arrow 1
Typically, we do not need the extremely general labelingfunction
R , which associates to each
t
Σ /E,k the set of F OL -definable state predicates holding in
t
. 4
Equational Quotient Abstractions (II) It is enough to focus on those state predicates actually occurring in a particular formula ϕ , which we may assume have been defined by the general method described whenexplaining the Maude
model checker. We assume that
has been defined as a Maude module, and that we have equationally specified with equations
a finite set of (possibly parametric) state predicate symbols Π
. Then our (possibly infinite) set of atomic predicates is the set
Π
θ
p
p
, θ canonical ground substitution
. This defines a labeling function,
Π
t
θ
p
Π
t
θ
p
true
We are then interested in the Kripke structure, K
, k
Π
Σ /E,k
1 R
Π
. 5
Equational Quotient Abstractions (IV) But can
, k
Π
E ′^ , which we have just defined in terms of the underlying Kripke structure
, k
Π , be understood as the Kripke structure associated to another rewrite theory ? Let us take a closer look at, K
, k
Π
E ′^
Σ /E,k
E ′^
1 R
E ′^
Π / ≡ E ′^
The first obvious observation is that, by definition, we have, T Σ /E,k
E ′^
Σ /E ∪ E ′ ,k
. A second, similarly obvious, observation (exercise) is that if
is k
deadlock-free , that is, if we have,
1 R
1 R
, then the rewrite theory R
′^
′, φ, R
is also k -deadlock-free, and we have, (
1 R /E ′^
1 R /E ′^
1 R
E ′^
7
Equational Quotient Abstractions (V) Therefore, for
k -deadlock-free, our obvious candidate for a rewrite theory having
, k
Π
E ′^ as its underlying Kripke structure is the rewrite theory, R
′^
′, φ, R
, that is, we just add to
the equations
′ , and do not change at all the rules
. How restrictive is the requirement that
is k -deadlock-free? There is no real loss of generality
. To a theory
satisfying the usual executability assumptions and having equational conditions we can always associate a semantically equivalent (from the
point of view) theory R kd.f. which is k -deadlock-free (see Ex .27.3). Therefore, at a purely mathematical level,
′^ seems to be what we want. The problem comes with the followingtwo executability questions : 8
Equational Quotient Abstractions (VII) Likewise, we can try to check whether the rules
are ground coherent relative to
′^ (or to
′′ ) and if the check fails we can again try to complete the rules
to a semantically equivalent set of rules
′^ (no suitable Maude tools exist for this at the moment; they are in their designstage).By this process we can hopefully arrive at an executable theory
′^
′′ , φ, R ′
which is semantically equivalent to R
′
. We can then use
′^ to try to model check properties about
. But we are not finished yet. What about the statepredicates
? 10
Equational Quotient Abstractions (VIII) Recall that these (possibly parameterized) state predicateswill have been defined by means of equations
in a Maude module importing the specification of
and also the MODEL-CHECKER module. The question is whether the state predicates
are preserved under the equations
′. This indeed may be a problem. We need to unpack a littlethe definition of the innocent-looking labeling function, L Π / ≡ E ′^ , which is of course defined by the intersection formula,
Π / ≡ E ′^
t
∪ E ′^
[x ]E ⊆ [t ]E ∪ E ′
Π
x
E
11
Equational Quotient Abstractions (X) Note that, in that case, and assuming that the equations E
′^
(or
′′
) are ground confluent, sort-decreasing, and terminating, we do not need to change the equations
to define the state predicates
on
′^ (or its semantic equivalent
′ ). Therefore, we have an isomorphism (given by a pair ofinvertible bisimulation maps)
, k
Π
E ′^
′ , k
Π
or, in case we need the semantically-equivalent
′ , an isomorphism,
, k
Π
E ′^
′ , k
Π
13
Equational Quotient Abstractions (XI) The crucial point in both isomorphisms is that the labelingfuction of the righthand side Kripke structure is now equationally defined by the same equations
as for the extension of
. So we can do it all in Maude. Furthermore, the quotient
Π -simulation map, K
, k
Π
′ , k
Π is then by construction strict , and therefore reflects satisfaction of arbitrary
formulae (cf. Ex .26.1). 14
Equational Quotient Abstractions (XIII) Suppose a k -topmost rewrite theory in which all equations in
′^ are of the form, t
t ′ with t and t ′^ of kind k
. Suppose, furthermore, that the equations
′^
are ground confluent, sort-decreasing, and terminating. Then, it is relatively easy to prove as anexercise ( Ex .27.4.) that if for each such equation and each state predicate p we can prove the inductive property, E
ind
~x
~y
t
~x
p
~y
true
t ′
~x
p
~y
true
then we have established the preservation of the statepredicates
by the equations
′
. We can use a tool like Maude’s ITP to mechanically discharge proof obligations ofthis kind. 16
Equational Quotient Abstractions (XIV) The above method of proving properties based onequational quotient abstractions can be used beyond thecase of purely propositional LTL properties. In some cases we can also prove LTL properties involving free variables asparameters.Let
, E, φ, R
be a rewite theory, and let ϕ
′
be a formula with free variables , say x 1
s 1 ,... , x n
s n , defined in a protecting extension of
and involving a finite set of possibly parametric statepredicates
which we assume defined in a computable way by
ground confluent, sort-decreasing and terminating. 17
Equational Quotient Abstractions (XVI)
likewise, for k the kind of states, and for each 1
j
m , the set of
′′ -canonical ground terms t j,l of kind k such that
′′
θ j
t j,l
is likewise finite , with
l
q j , and can be effectively determined (that is, on
Σ /E ′′
defines a finite set of initial states) Then, we have the following useful result, which is left asan exercise: Theorem : If for each j ,
j
m , and for each l ,
l
q j we can prove by model checking that,
Reach ( R ′)
t j,l
LT L θ j
ϕ
then we have proved,
Reach ( R )
LT L
ϕ. 19
A Bakery Protocol Example In the early stages of algebraic specification all formalismswould use a
data type as an example. In the relatively early stages of abstraction techniques it is likewise de rigueur to show how the technique in question handles Lamport’s bakery protocol.This is an infinite-state protocol that achieves mutualexclusion between processes by the usual method commonin bakeries and deli shops: there is a number dispenser, andcustomers are served in sequential order according to thenumber that they hold.A simple Maude specification for the case of two processesis as follows, 20