Unformatted text preview: In particular, demonstrate that your semantics compute the correct values for the following terms: 1. 2-1 2. 3*2-3 3. 3*(2-3) Hand in your extended grammar, the semantic rules given in Prolog, and the natural semantics. In addition, hand in the computations in Prolog and in the natural semantics that demonstrate your rules for the three problems above. Hint : You will need to transform the terms in the above problems into abstract syntax trees first. The abstract syntax tree for problem 1 above should read minus(const(2),const(1)) ....
View Full Document
- Spring '08
- abstract syntax tree, natural semantics