aims the main purpose of the assignment is to let


Aims: The main purpose of the assignment is to let you

  •  perform operations on les;
  •  manipulate structures;
  •  manipulate pointers;
  •  implement an interface.

General description

Your program will read two kinds of data from two les: names and predicates. It will read a formal expression from standard input and check whether that expression is syntactically correct, i.e., built from the names and predicates that have been read, together with a few boolean operators. Then your program will read from a third le a set of basic facts assumed to be true, and check whether the formal expression itself is true. Finally, it will nd out whether it is possible to make some basic facts true to make the formal expression itself true (this being trivially the case if the answer to the previous question is positive), and in case it is, write a possible solution to a le. The program will use an abstract interface that you will have to implement. The interface and the client program will be provided.

Your program will:

 take a sequence of symbols from standard input (possibly over many lines), ending in Carriage return followed by Control D (Control Z in Windows) to signal end of input;

determine if the sequence of symbols is a formula;

 if the answer to the previous question is yes, determine if the formula is true in the interpretation stored in true_atoms.txt;

 if the previous question has been addressed and has received a negative answer, determine if the formula is satis able and if it is, write a minimal interpretation that makes it true in a le witnesses_satisfiability.txt, one atom per line (in any order) with no repetition.

By a minimal interpretation that makes a formula true, we mean that if one atom is removed from the interpretation then the resulting interpretation does no longer make the formula true.


Download:- code.tar.gz

Request for Solution File

Ask an Expert for Answer!!
C/C++ Programming: aims the main purpose of the assignment is to let
Reference No:- TGS0490931

Expected delivery within 24 Hours