Question: write a Prolog program that transforms a given propositional formula into conjunc- tive normal form. In this, follow the example program given in Section 2.9

write a Prolog program that transforms a given propositional formula into conjunc- tive normal form. In this, follow the example program given in Section 2.9 of Fittings book, which shows a program to transform a propositional formula into disjunctive normal form. In your program, you need to define the unary operator neg and the binary operators and, or, imp, revimp, uparrow, downarrow, notimp, and notrevimp, which denote the eight aforemen- tioned primary connectives (see Table 2.1 in the book). Also reuse the predicates conjunctive/1, disjunctive/1 that recognise - and -formulas, and the predicates components/3 and component/2 that split formulas into their components (see Table 2.2 in the book). The interface of this part of the program should be a predicate clauseform(X,Y), where Y is the conjunctive normal form of the formula X. For example, for the query ?- clauseform(a imp b, Y)., the result should be Y=[[neg a, b]], and for the query ?- clauseform(neg(a uparrow b), Y), the result should be Y=[[a],[b]].

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!