CS 470 - Theorem Prover Programming Assignment


You will program a theorem prover based on refutation resolution. You can use a simple storage strategy (array or linked list). You will also need to use a resolution strategy in order to minimize that actual number of resolutions executed for your proof. You should also try to maintain completeness.

You do not need to automate the transformation into normal form (you can do that by hand). You will be asked to solve common FOL proofs such as the following.

a) Every ambassador speaks only to diplomats, and some amassador speaks to someone, therefore there is a diplomat.

b) Every computer science student works harder than somebody, and everyone who works harder than someone else gets less sleep than that person. Maria is a computer science student. Therefore Maria gets less sleep than someone else.

Note that one should not only be able to query whether the last sentence is true, but alse give a query of the form "does there exist some person x who gets less sleep than someone else." In that case your program should not only return true, but return at least one specific value of x which causes the truth.

Your program should be able to work in two modes: a) random (but no repeats) resolutions, and b) resolution with a heuristic strategy. You program should keep a dynamic and final count (output to the screen) of the number of resolutions executed. Your program should also output the actual proof - the sequence of resolutions and resolvents which lead to the proof.

Grading: Your program will be tested on a couple of proofs (we won't give them to you before hand) similar to those above. Part of the grade (~60%) will be based on whether your program correctly accomplishes the proof. The other portion (40%) will be based on how much better the heuristic version of your program does compared to the random version. The ratio of (# of resolutions for heuristic)/(# of resolutions for random) will be the criteria for quality of your program.