CISC 404/604
Unification and Resolution
Let
L
be a set of literals that we wish to unify.
Let
sub
←
[ ].
While
 L
sub

6
= 1
Scan left to right till a disagreement is found
If neither term (at place of disagreement) is a variable then return(”not unifiable”)
else
Let
x
be the ”variable” term and let the other term be
t
If
x
occurs in
t
then return(”not unifiable”)
else
sub
←
sub
·
[
x

t
]
return
sub
We will now apply this algorithm from the example from Uwe Schoening’s book that was discussed in
class.
L
=
{
P
(
f
(
z, g
(
a, y
))
, h
(
z
))
, P
(
f
(
f
(
u, v
)
, w
)
, h
(
f
(
a, b
)))
}
sub
←
[
z

f
(
u, v
)]
L
sub
=
{
P
(
f
(
f
(
u, v
)
, g
(
a, y
))
, h
(
f
(
u, v
)))
, P
(
f
(
f
(
u, v
)
, w
)
, h
(
f
(
a, b
)))
}
sub
←
[
z

f
(
u, v
)]
·
[
w

g
(
a, y
)]
L
sub
=
{
P
(
f
(
f
(
u, v
)
, g
(
a, y
))
, h
(
f
(
u, v
)))
, P
(
f
(
f
(
u, v
)
, g
(
a, y
))
, h
(
f
(
a, b
)))
}
sub
←
[
z

f
(
u, v
)]
·
[
w

g
(
a, y
)]
·
[
u

a
]
L
sub
=
{
P
(
f
(
f
(
a, v
)
, g
(
a, y
))
, h
(
f
(
a, v
)))
, P
(
f
(
f
(
a, v
)
, g
(
a, y
))
, h
(
f
(
a, b
)))
}
sub
←
[
z

f
(
u, v
)]
·
[
w

g
(
a, y
)]
·
[
u

a
]
·
[
v

b
]
L
sub
=
{
P
(
f
(
f
(
a, b
)
, g
(
a, y
))
, h
(
f
(
a, b
)))
}
The unifying substitution can also be rewritten as [
z

f
(
a, b
)
, w

g
(
a, y
)
, u

a, v

b
]
This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
A clause
R
is obtained by resolving clauses
C
1
and
C
2
if
1. Let
σ
1
and
σ
2
be substitutions such that the clauses
C
1
σ
1
and
C
2
σ
2
have no variables in common,
2. Let
L
1
, . . . , L
n
∈ C
1
σ
1
(
n
≥
1) and
L
0
1
, . . . , L
This is the end of the preview.
Sign up
to
access the rest of the document.
 Spring '09
 Conjunctive normal form, Literal

Click to edit the document details