CSE-321 Programming Languages Abstract Machine E POSTECH May 1, 2006 박성우.

Slides:



Advertisements
Similar presentations
Substitution & Evaluation Order cos 441 David Walker.
Advertisements

1 Programming Languages (CS 550) Mini Language Interpreter Jeremy R. Johnson.
CSE341: Programming Languages Lecture 2 Functions, Pairs, Lists Dan Grossman Winter 2013.
CSE-321 Programming Languages Review POSTECH June 10, 2010 박성우.
The lambda calculus David Walker CS 441. the lambda calculus Originally, the lambda calculus was developed as a logic by Alonzo Church in 1932 –Church.
Elements of Lambda Calculus Functional Programming Academic Year Alessandro Cimatti
1 Programming Languages (CS 550) Lecture Summary Functional Programming and Operational Semantics for Scheme Jeremy R. Johnson.
CSE-321 Programming Languages Predicative Polymorphic -Calculus POSTECH May 23, 2007 박성우.
CSE 425: Semantic Analysis Semantic Analysis Allows rigorous specification of a program’s meaning –Lets (parts of) programming languages be proven correct.
CSE-321 Programming Languages Subtyping POSTECH May 14, 2007 박성우.
CS 355 – Programming Languages
CSE-321 Programming Languages Polymorphism POSTECH May 15, 2006 박성우.
Computability and Complexity 14-1 Computability and Complexity Andrei Bulatov Cook’s Theorem.
1 Introduction to Computability Theory Lecture15: Reductions Prof. Amos Israeli.
1 CS 312 – Lecture 28 Continuations –Probably the most confusing thing you’ve seen all semester… Course summary –Life after CS 312.
1 Scheme Scheme is a functional language. Scheme is based on lambda calculus. lambda abstraction = function definition In Scheme, a function is defined.
FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY
Lecture 19 Exam: Tuesday June15 4-6pm Overview. General Remarks Expect more questions than before that test your knowledge of the material. (rather then.
Dec Formal Semantics1 Programming Language Theory Formal Semantics Leif Grönqvist The national Graduate School of Language Technology (GSLT) MSI.
Fall 2004COMP 3351 Regular Expressions. Fall 2004COMP 3352 Regular Expressions Regular expressions describe regular languages Example: describes the language.
Technical Report Writing and Presentation Skills Course Outline 1.
COMP313A Programming Languages Introduction. More Housekeeping Stuff Reading Material Textbook –Programming Languages: Principles and Practice by Kenneth.
CSE-321 Programming Languages Overview POSTECH March 4, 2014 박성우.
1 SML fn x => e e 1 e 2 0, 1, 2,..., +, -,... true, false, if e then e else e patterns datatypes exceptions structures functors fun f x = e variables.
Mean and Standard Deviation of Grouped Data Make a frequency table Compute the midpoint (x) for each class. Count the number of entries in each class (f).
CSE-321 Programming Languages Overview POSTECH March 5, 2007 박성우.
Advanced Database Course (ESED5204) Eng. Hanan Alyazji University of Palestine Software Engineering Department.
CSE-321 Programming Languages Overview POSTECH March 3, 2011 박성우.
Formal Semantics Chapter Twenty-ThreeModern Programming Languages, 2nd ed.1.
Type Safety Kangwon National University 임현승 Programming Languages.
CSE-321 Programming Languages Inductive Definitions POSTECH March 14, 2007 박성우.
CSE-321 Programming Languages Inductive Definitions POSTECH March 15, 2006 박성우.
1 ML fun x -> e e 1 e 2 0, 1, 2,..., +, -,... true, false, if e then e else e patterns datatypes exceptions structures functors let f x = e variables These.
Introduction to Programming Languages S1.3.1Bina © 1998 Liran & Ofir Introduction to Programming Languages Programming in C.
CSE 425: Control Flow I Categories of Control Flow Constructs Sequencing –order of expressions and statements Selection –if, else, switch Iteration –loops.
© Kenneth C. Louden, Chapter 11 - Functional Programming, Part III: Theory Programming Languages: Principles and Practice, 2nd Ed. Kenneth C. Louden.
3.2 Semantics. 2 Semantics Attribute Grammars The Meanings of Programs: Semantics Sebesta Chapter 3.
Types and Programming Languages Lecture 6 Simon Gay Department of Computing Science University of Glasgow 2006/07.
1 Formal Semantics. 2 Why formalize? ML is tricky, particularly in corner cases generalizable type variables? polymorphic references? exceptions? Some.
1 CSCD 326 Data Structures I Software Design. 2 The Software Life Cycle 1. Specification 2. Design 3. Risk Analysis 4. Verification 5. Coding 6. Testing.
CSE-321 Programming Languages -Calculus (II) POSTECH March 27, 2006 박성우.
Practice solving systems by graphing 1.)2.) 2x + 5y = –5 x + 3y = 3.
5.3 – Solving Multi-Step Inequalities. *Just like solving equations*
Types and Programming Languages Lecture 12 Simon Gay Department of Computing Science University of Glasgow 2006/07.
Implementing a Dependently Typed λ -Calculus Ali Assaf Abbie Desrosiers Alexandre Tomberg.
-Calculus Kangwon National University 임현승 Programming Languages These slides are based on the slides by Prof. Sungwoo Park at POSTECH.
CSE-321 Programming Languages Review POSTECH June 14, 2011 박성우.
Copyright 2001, Matt Dwyer, John Hatcliff, and Radu Iosif. The syllabus and all lectures for this course are copyrighted materials and may not be used.
Advanced Formal Methods Lecture 3: Simply Typed Lambda calculus Mads Dam KTH/CSC Course 2D1453, Some material from B. Pierce: TAPL + some from.
Foundations of (Theoretical) Computer Science Chapter 2 Lecture Notes (Section 2.2: Pushdown Automata) Prof. Karen Daniels, Fall 2010 with acknowledgement.
CSE-321 Programming Languages (So Many Topics) POSTECH May 29, 2006 박성우.
Interpreters and Higher-Order Functions CSE 413 Autumn 2008 Credit: CSE341 notes by Dan Grossman.
Why Study Automata? What the Course is About Administrivia 1 Welcome to CSE309.
CSE-321 Programming Languages Curry-Howard Isomorphism POSTECH June 4, 2009 박성우.
PA 221 Wills, Trusts, and Estate Planning Unit One.
CSE-321 Programming Languages -Calculus (II) POSTECH March 26, 2007 박성우.
CSE 425: Functional Programming I Programs as Functions Some programs act like mathematical functions –Associate a set of input values from the function’s.
 To find the numerical value of the expression, simply substitute the variables in the expression with the given number. Evaluate: 2x + 7, if x = 4 Substitute.
Language Recognition MSU CSE 260.
Why Study Automata Theory and Formal Languages?
CSE-321 Programming Languages Simply Typed -Calculus
CSE 20 Survey CK Cheng UC San Diego
CS 611: Lecture 9 More Lambda Calculus: Recursion, Scope, and Substitution September 17, 1999 Cornell University Computer Science Department Andrew Myers.
September 4, 1997 Programming Languages (CS 550) Lecture 6 Summary Operational Semantics of Scheme using Substitution Jeremy R. Johnson TexPoint fonts.
A Verified Compiler for an Impure Functional Language
Solving Systems using Substitution
Typed Arithmetic Expressions
CS 456 Interactive Software.
Background In his classic 1972 paper on definitional interpreters, John Reynolds introduced two key techniques: Continuation-passing style - Makes.
Announcements Quiz 6 HW7 due Tuesday, October 30
Presentation transcript:

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?