1. What is the value of the following Impcore expression?
(if (> 3 5) 17 99)
2. Which of the following best describes the syntactic structure of
Impcore?
(a) An expression can contain a definition
(b) A definition can contain an expression
(c) Both of the above
(d) None of the above
3. What is the value of the following Impcore expression:
(while (> n 0)
(begin
(set n (- n 1))
33))
4. Does this Impcore test pass? Why or why not?
(check-expect (+ 1 2 3) 6)
5. Does this Impcore test pass? Why or why not?
(check-error (+ 1 2 3))
Next read about abstract syntax on pages 16 and 17.
6. After reading about abstract syntax, look at this picture of an
abstract-syntax tree for a "calculator expression":
![Picture of an abstract-syntax tree](ast.jpg)
Answer these questions:
(a) What concrete syntax could you write in C for this expression?
(b) What concrete syntax could you write in Impcore for this expression?
(c) How many different concrete C expressions describe the same *computation*?
(d) How many different concrete Impcore expressions describe the same *computation*?
**Note**: the "computation" is the act of dividing 12 by 3, then
subtracting the result from 9. It's a different computation from,
say, adding 2 and 3, which although it produces the same value, is
not the same computation.