CSE-321 Programming Languages Abstract Machine E POSTECH May 1, 2006 박성우
2 Operational Semantics of -Calculus explicit analysis of an expression
3 Key Ideas in Environment Semantics No substitutions –Delay the substitution [v / x] e as much as possible. store [v / x] in the environment. proceed to evaluate e. replace x by v only if necessary. A closure stores the values of all free variables in a given -abstraction.
4 Environment Semantics
5 Abstract Machine E explicit analysis of an expression and no substitution
6 Outline Overview V Abstract machine E Fixed point construct
7 Abstract Machine C + Environment Semantics
8 States of the Abstract Machine E
9 Definition
10 State Transition
11 State Transition
12 State Transition
13 Example
14 Outline Overview V Abstract machine E V Fixed point construct
15 Reduction Rule
16 fix for creating recursive functions
17 Abstract Syntax and Typing
18 Reduction
19 Outline Overview V Abstract machine E V Fixed point construct V Midterm
20 Score Distribution
21 55 Points Given for Free Problem 1: SML programming (20 points) –Question 1 from Assignment 2 –Question 2 from SML Style Guide –Question 3 from Assignment 2 Problem 2: reductions (10 points) –Question 1 and 2 from Course Notes Problem 5: substitution (15 points) –From Assignment 4 Problem 7: abstract machine C (10 points) –From Assignment 5
22 Average The midterm was designed with an anticipated average of 70. –55 points given for free –15 points from the rest Average = No question was particularly difficult, except the encoding of 'halve'. –2 students solved the 'halve' problem.
23 Conclusion Average –Positive (falls a bit short of expectation.) –Except inductive proofs using rule induction. Assignment 6 written part Don't get frustrated by your midterm score. –Midterm counts for only 10% of your final grade. –Final exam will be assigned 30% (tentatively). –Assignments 7 and 8 will be more important than the midterm.
24 A Question for Students 36 students got 20+ points on the functional set problem of Assignment 2. –26 students got 30 points. Only 14 students got empty, singleton, member, insert correct on Question 1-3. How did this happen?