






















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!























Computer Science DepartmentUniversity of Illinois at Urbana-Champaign
1
Membership Equational Logic Membership equational logic generalizes
order-sorted equational logic. This generalization is explained in Section11 of,J. Meseguer, “Membership Algebra as a LogicalFramework for Equational Specification,” pp.18–61, Springer LNCS 1376, 1998.where membership equational logic is also proposed, and itis shown to naturally
extend^ order-sorted equational logic in a conservative way.
2
Membership Equational Logic (III) A membership equational theory
is a pair^ (Σ, E), with
Σ^ a membership equational signature, and
E^ a set of^ conditional Σ-equations and^ Σ-memberships of the form,′^ (∀X)^ t^ =^ t⇐^ u=^1
v∧^...^ ∧^ u=^ v∧^ w^1 n^ n^
:^ s∧^...^ ∧^ w:^ s 1 1 m^ m (∀X)^ t^ :^ s^ ⇐^ u=^1
v∧^...^ ∧^ u=^ v∧^ w^1 n^ n^
:^ s∧^...^ ∧^ w:^ s 1 1 m^ m That is, the sentences in
E^ are universally quantified
Horn clauses^ whose atoms are
Σ-atoms.
4
Membership Equational Logic (IV) Syntactic sugar conventions:′^ • Subsorts. Given sorts^ s, s
∈^ S, the declarationk
′^ s < sis syntactic sugar for the conditional membership′^ (∀x^ :^ k)^ x^ :^ s⇐^ x^ :^ s. • Operations. If^ f^ ∈^ Σ
, and^ s∈^ Sk...k,k^1 k 1 n 1 ,... ,^ s∈^ S,n^ k n^ s^ ∈^ S, then the declarationk
f^ :^ s... s−→^ s^ is syntactic^1 n^ sugar for (∀x:^ k,... , x:^ k)^1 1 n^ n
f^ (x,... , x) :^ s^ ⇐^ x^1 n^1
:^ s∧^...^ ∧^ x:^ s. 1 n^ n
-^ Variables.^ (∀x^ :^ s, X
)^ a^ ⇐^ a∧^...^ ∧^ ais syntactic sugar^1 n^ for the Σ-sentence (∀x^ :^ k, X)^ a^ ⇐^ a∧^...^1
∧^ a∧^ x^ :^ s,n^ where^ s^ ∈^ Sand^ a^ k^
and the^ aare atoms. Thenj^ f^ :^ s... s−→^ s^ is equivalent to^1 n^ (∀x:^ s,... , x:^ s)^1 1 n^ n
f^ (x,... , x) :^ s.^1 n
5
Membership Equational Logic (VI) For (Σ, E) a membership equational theory, the
inference rules^ extend those of (order-sorted) equational logic in anatural way, and are the following:1.^ Reflexivity.
E^ ⊢^ (∀X)^ t^ =^ t
2.^ Symmetry.
′ E ⊢ (∀X) t = t ′ (^) E ⊢ (∀X) t= t
3.^ Transitivity.^ E^ ⊢^ (
′^ ∀X) t = tE^ ⊢^ (∀X ′^ ′′) t=^ t ′′ E ⊢ (∀X) t = t^7
4.^ Congruence.^ E^ ⊢^ (∀X
′) t= t...^ E^ ⊢^ (∀ 1 1
′X) t= tn n E^ ⊢^ (∀X)^ f^ (t,... , t) =^1 n
′′ f (t,... , t) 1 n where we assume that
f^ :^ k... k→^ k^ is in^1 n^
Σ, and the ′terms t, t∈^ T(X)iΣki i^ ,^1 ≤^ i^ ≤^ n.
5.^ Membership.^ E^ ⊢
′^ (∀X) t = tE^ ⊢^ (∀ X)^ t^ :^ s ′ (^) E ⊢ (∀X) t: s^8
Soundness, Completeness, and Initial Models These inference rules are
sound and complete
. Furthermore, any membership equational theory
(Σ, E)^ has an^ initial algebra^ TΣ
, defined as a quotient of the term/E algebra^ Tby:Σ^ ′^ •^ t^ ≡t⇔^ E^ ⊢E^
′ (∀∅) t = t • [t]∈ T⇔ E ⊢ (∀∅)^ t^ :^ s≡Σ/E,s (^) E
10
Simplification, Confluence, and Termination As explained in,A. Bouhoula, J.-P. Jouannaud, and J. Meseguer,“Specification and Proof in MembershipEquational Logic,” Theoretical Computer Science,326:35–132, 2000,all the results about^ equational simplification
,^ confluence and^ termination^ extend in a natural way to membershipequational logic theories.
11
Reachability Models in General Given a general rewrite theory^ R
= (Σ, E, φ, R), its R-reachability relation
(resp.,^ R-rewriting relation
, resp., R-provability relation
)^ →, is defined proof-theoretically, forR each kind^ k^ in^ Σ^ and each
′ [t], [t]^ ∈^ T, by the equivalence,Σ/E,k ′ [t] →[t] ⇔ R ⊢^ (∀∅)^ t^ −→^ tR
which by the^ Equality
rule is independent of the choice of ′ t, t. Model-theoretically,
R-reachability^ can be defined as the family of relations, indexed by the kinds
k^ in^ Σ, interpreting the sorts
Arrow^ in the initial model of thek^ following membership equational theory
Reach(R):^13
Reachability Models in General (II) The signature, equations, and memberships of
Reach(R) contain the signature, equations, and memberships of (Σ, E), to which we add:^ •^ for each kind^ k^
in^ Σ^ a new kind^ [Pair
]^ with four sorts:k (^01) Arrow,^ Arrow,^ Arrow k^ k and^ Pairand subsortk k^ (^0) inclusions ArrowArrow k^ 1 <^ Arrow<^ Pair, and withk^ k k^ operators^ (^ →^ ) :^ k k
−→^ Pair, and^ s, t^ :^ k
Pair−→^ k,k^ satisfying the equations,
s(x^ →^ y) =^ x,^ t(x^ →
y) =^ y, and (s(z)^ →^ t(z)) =^ z • we lift each^ f^ :^ k... k^1
−→^ k^ in^ Σ^ withn {^1 ,... , n} −^ φ(f^ ) =^ {i
,... , i} 6^ =^ ∅^ to, 1 m
14
-^ for each rewrite rule in
∧′ (^) l : (∀X) t −→ t⇐ ( ∧′ u= u) ∧ (^ v:^ si j^ j i i^ j ∧′) ∧ (^ w−→^ w) l^ l^ l ′^ with, say t, tof kind
′ k, and w, wof kindl l^ k, we give thel conditional membership,′^1 (∀X) (t^ →^ t) :^ Arrow⇐^ k^
∧^ ∧′ (^ u=^ u)∧(^ v:^ si^ j^ j^ i^ i^ j
∧′)∧(^ (w→^ w) :^ Arrowl^ k^ l^ l ).l (^16)
Comments on the Definition of
Reach(R)
Sice we are interested in identifying
one-step rewrites, in which only one subterm is rewritten, we have introduced^1 the sorts^ Arrowand have^ k^
restricted^ the rewriting logic inference rules used in defining
Reach(R). Specifically:
-^ the^ Congruence^
rule is restricted, so that only onenonfrozen position can be rewitten at a time
-^ the^ Replacement
rule is resticted, so that no rewritesare allowed in the substitution. However, this restricted system can derive the sameinferences^ R ⊢^ (∀∅)
′^ t −→ tas the original one.
17
Verification of Declarative Concurrent Programs We are now ready to discuss the subject of
verification of declarative concurrent programs
, and, more specifically, the verification of properties of Maude
system modules, that is, of declarative concurrent programs that are
rewrite theories. There are two levels of specification involved: (1) a
system specification^ level, provided by the rewrite theory andyielding an^ initial model
for our program; and (2) a
property specification^ level, given by some property (or properties)
ϕ that we want to prove about our program. To say that ourprogram^ satisfies^ the property
ϕ^ then means exactly to say that its initial model does.
19
Verification of Declarative Concurrent Programs (II) Specifically, we have considered the
reachability^ initial model,^ Tof a rewrite theoryReach(R)^
The question then becomes, which
language^ shall we use to express the^ properties
ϕ^ that we want to prove hold in the model^ T? That is, how should we express relevantReach(R) properties^ ϕ^ such that,
T|=^ ϕ.Reach(R)^ One possibility is to use the
first-order language F OL(Reach(R))^ associated to the theory
Reach(R).^20