Submission deadline: Wednesday, May 11, 2016 (11:59 p.m.)
The aim of this programming assignment is to translate first-order logic (FOL) formulae to the prenex conjunctive normal form (PCNF).
A formula is in PCNF if it is of the form
Q1x1 ... Qnxn M
where the Qi are quantifiers and M is a quantifier-free formula in conjunctive normal form. The (possibly empty) sequence Q1x1 ... Qnxn is called the prefix and M is called the matrix [Ben-Ari (2012), Definition 9.9 and van Dalen (2013), Definition 3.5.10]. Every formula in FOL can be transformed into an equivalent formula in PCNF [van Dalen (2013), Theorem 3.5.11].
FOL
defines a data type for the
formulae in FOL.Examples
gives some examples of
the data type Formula
.CNF
has implementations of some
steps to get the CNF from a formula in predicate logic.PCNF
has some help to solve the
programming lab.FOL
, define a function
pcnf :: Formula -> Formulathat returns the PCNF of a given formula in FOL.
CNF
and PCNF
,
although it is not mandatory. If you decide to use these
modules, fill in the blanks by replacing the
undefined
in the module PCNF
with code of your own.
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:
PCNF.hs
, a Haskell module file with your
solution for the assignment.README.txt
(or README.md
), a file
containing at least the following information:
pcnf
if you need them.Ben-Ari, Mordechai (2012). Mathematical Logic for Computer Science. 3rd ed. Springer.
van Dalen, Dirk (2013). Logic and Structure. 5th ed. Springer.
CM0845 Logic |