Reference no: EM13149986
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 satisable 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
Least break even on the sale of the items
: If Lampley Company decides to re-work the items, how much should the company be willing to invest to ensure that they would at least break even on the sale of the items?
|
Compute private saving-public saving and national saving
: Find the equilibrium interest rate. Now suppose that G rises to 1,250. Compute private saving, public saving, and national saving. d. Find the new equilibrium interest rate.
|
Substantive ways in which herb and renee may use
: From the scenario, suggest substantive ways in which Herb and Renee may use the information in the table in order to ascertain the profit maximizing level of output and price. Provide a rationale for your decision.
|
Promissory note payable to the order
: A $5,000 promissory note payable to the order of Neptune is discounted to Bane by blank endorsement for $4,000. King steals the note from Bane and sells it to Ott, who promises to pay King $4,500. After paying King $3,000, Ott learns that King sto..
|
By a minimal interpretation that makes a formula
: 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.
|
Find score of on the college entrance exam
: A score of on the college entrance exam. Assuming that average refers to the mean, which of the following claims must be true based on this information?
|
Net cost of machine for capital budgeting purposes
: What is the net cost of the machine for capital budgeting purposes? (That is, what is the year 0 net cash flow?) What are the net operating cash flows in Years 1,2, and 3? What is the additional Year 3 cash flow (that is, the after-tax salvage and th..
|
Find the activation energy for this sterilisation process
: milk is pasteurised when heated to 63 C for 30 minutes, but if it is heated to 74 C it takes only 15 seconds for the same result. Find the activation energy for this sterilisation process
|
Petition in bankruptcy
: Burton did not notify Wilson of these facts. Two days later when Burton again presented the instrument for payment, Burton was told that Foxx's creditors had filed a petition in bankruptcy that morning. Which of the following statements is true?
|