30.01.2013 Views

Logical Analysis and Verification of Cryptographic Protocols - Loria

Logical Analysis and Verification of Cryptographic Protocols - Loria

Logical Analysis and Verification of Cryptographic Protocols - Loria

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

2.1. PRELIMINARIES 25<br />

Figure 2.1 Knuth-Bendix completion procedure<br />

Input:<br />

An equational theory H <strong>and</strong> a reduction order > over T (F, X ).<br />

Output:<br />

A finite convergent rewrite system R that is equivalent to H, if the procedure<br />

terminates successfully;<br />

or “fail”, if the procedure terminates unsuccessfully.<br />

Initialisation:<br />

If there exists an equation l<br />

·<br />

= r ∈ H such that l �= r, l ≯ r <strong>and</strong> r ≯ l then<br />

terminates with output fail<br />

�<br />

otherwise, i = 0 <strong>and</strong> R0 = l → r such that l · = r ∈ H <strong>and</strong><br />

�<br />

l > r<br />

repeat Ri+1 = Ri;<br />

for all 〈l, r〉 ∈ CP (Ri) do<br />

1. reduce l, r to some Ri-normal form l ↓, r ↓;<br />

2. if l ↓�= r ↓ <strong>and</strong> neither l ↓> r ↓ nor r ↓> l ↓, then terminate with output fail;<br />

3. if l ↓> r ↓, then Ri+1 = Ri ∪ {l ↓→ r ↓};<br />

4. if r ↓> l ↓, then Ri+1 = Ri ∪ {r ↓→ l ↓};<br />

od<br />

i=i+1;<br />

until Ri = Ri−1;<br />

output Ri;<br />

Knuth-Bendix completion procedure<br />

The Knuth-Bendix completion procedures [131] (also called basic completion procedure),<br />

which is described in Figure 2.1, starts with an equational theory H <strong>and</strong><br />

tries to find a convergent rewrite system R that is equivalent to H. We assume<br />

that the order > used in the procedure is a reduction order <strong>and</strong> it is given as an<br />

input <strong>of</strong> the procedure. We recall that a reduction order > is any order which is<br />

stable, well-founded, <strong>and</strong> monotone (see Section 2.1.5).<br />

The Knuth-Bendix procedure removes automatically all trivial equations (re-<br />

·<br />

spectively trivial critical pairs) <strong>of</strong> the form l = l (respectively 〈l, l〉 or 〈l, r〉 with<br />

l ↓= r ↓).<br />

Thus, the basic completion procedure may show three different types <strong>of</strong> behaviour,<br />

depending on the particular input H <strong>and</strong> >:

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!