Programming Assignment 3 - Propositional Reasoning

Intelligent Systems, Spring 2015


Table of Contents

Due Date

This assignment is due by Thursday, 19 March, at 11:50 p.m.. This is both the first and final deadline; it will not be possible to submit the assignment after the Thursday, 19 March, 11:50 p.m. deadline. See the turn-in page (last modified on 2015 February 7) for information about turning in your assignment.

Introduction

Propositional reasoning over a knowledge base can be used to answer questions about topics covered by the knowledge base. This assignment develops a simple propositional reasoner capable of answering questions related to a knowledge base.

The Assignment

Write a Java class that answers questions asked against a knowledge base and and interpretation for the knowledge base. The class should implement the PropositionalReasoner interface defined in the file /export/home/class/mucs520/pa3/PropositionalReasoner.java.

The PropositionalReasoner interface defines the method

PropositionalDefiniteClause [] 
answer(PropositionalDefiniteClause.Atom... query);

In addition to implementing the answer() method, the class implementing the PropositionalReasoner interface should also implement a constructor accepting a knowledge base and an interpretation for the knowledge base. The knowledge base and interpretation are to be used to answer questions asked of the knowledge base by answer() method calls.

Input

The parameter to the answer() method is a propositional definite clause to be determined relative to the knowledge base and interpretation passed into the reasoner when constructed.

Output

If the question passed into the answer() method follows from the knowledge base and interpretation associated with the reasoner, then answer() should return the sequence of steps used to prove the question. Otherwise answer() should return null.

Writing the Reasoner

Compile your Java source files with the command

$ javac -Xlint -cp /export/home/class/mucs520/pa3/pa3.jar:. java-source-files

Here are some suggestions for writing the reasoner code:

Running the Reasoner

Once you've written a reasoner class, and other classes you may need, you can run your solver by typing

$ java -cp /export/home/class/mucs520/pa3/pa3.jar:. main

in the directory containing your class files. The jar file can be found in the assignment directory /export/home/class/mucs520/pa3, or you may have a copy stashed elsewhere. If you do make a copy, make sure you keep it up-to-date with the copy in the assignment directory.


This page last modified on 2015 March 7.

Creative
    Commons License