Submission deadline: Wednesday, July 6, 2016 (11:59 p.m.)
The aim of this programming assignment is to implement unification in first-order logic (FOL). Unification is one of the main steps to perform resolution in FOL.
A substitution of terms for variables is a set
{x1 ← t1, ..., xn ← tn}
where each xi
is a distinct variable and each
ti
is a term which is not identical to the
corresponding variable xi
. The empty
substution
is the empty set [Ben-Ari (2012), Definition 10.4].
Let U = {A1, ..., An}
be a
set of atoms. A unifier θ
is a substitution such that:
A1θ = ... = Anθ.
A most general unifier
(MGU) for U
is a unifier
μ
such that any unifier θ
of U
can
be expressed as:
θ = μλ
for some substitution λ
[Ben-Ari (2012),
Definition 10.11].
Haskell: The module FOL
defines a data type for
the atoms in FOL. This module can be found in the
GitHub repository logic-cm0845-
lab3.
FOL
, define a function
unify :: Atom -> Atom -> [Atom]
that returns a list with the atoms obtained after performing the
substitution expressed by the MGU of the two given atoms in FOL.
unify(A1,A2,B)
where
B
is a list with the atoms obtained after performing the
substitution expressed by the MGU of A1
and A2
.
Submission is electronic. Send an email to
asr(at)eafit(dot)edu(dot)co
and
dmonto39(at)eafit(dot)edu(dot)co
and attach a
compressed file (.zip or .tar.gz) with your solution.
Your submission has to include the following:
Unification.hs
or unification.pl
,
a file with your solution for the assignment.README.txt
(or README.md
), a file
containing at least the following information:
Ben-Ari, Mordechai (2012). Mathematical Logic for Computer Science. 3rd ed. Springer.