This preview has intentionally blurred sections. Sign up to view the full version.View Full Document
Unformatted text preview: 3. Problem 3 (15 Points) We say that there are no assignments in RPAL. Then what is `x = 1' in the following RPAL program? let x = 1 in x + 1 4. Problem 4 (15 Points) Are tuples in RPAL evaluated left-to-right or right-to-left? Write a short RPAL program (one line) in which this direction is important for the result. Write down the result under the two different scenarios. 5. Problem 5 (40 Points) Using the CSE machine, evaluate the following RPAL program. Show the output of the program (if any), and the environment structure. let rec f n = n eq 1 -> 1 | n + f (n-2) in f 5...
View Full Document
- Fall '08
- Computer program, different normal forms, RPAL, Programming Language Principles, following RPAL