Please read Chapters 1-4 in your textbook.
Please do the following problems from the book:
2.2.7 (transitive closure) full proof required, 3.5.13 (Funny rules)For the second question, please explain your answers, but no proof is required.
Also answer the following question:
Which of the theorems 3.5.4, 3.5.7, 3.5.8, 3.5.11, 3.5.12 remain true after adding the ruled for arithmetic expressions (Figure 3-2)?Explain your answers; no proofs needed. (Ex. 3.5.14 and its solution should help, as should definition 3.5.15.)
Add a short-circuit ``or'' operator to
the language. Give the evaluation rules and add it to the terms,
and update the ML evaluator arith to handle it.
You will need to make small changes in each of these files:
core.ml (please indicate where you made changes) on paper.
The changed files should be left in the homework1 directory of
your AFS volume.
Test your new implementation on the following test cases:
(iszero (succ 0)) or (pred true); (iszero 0) or (pred true);The first should get stuck, but the second should reduce to
true.
As with all homeworks, please turn in your homework on paper at the beginning of lecture. This should include relevant excerpts from any computer files you write (so all grading can be on paper). Please put the complete program in the appropriate homework directory in your AFS volume.