4/16/13

Sakai@IITD : PROGRAMMING LANGUAGES 1L1 : Assignments

Logout

M y Workspace

COM PUTER ARCHITECTURE 1L1

PROGRAMMING LANGUAGES 1L1

Assignments
Assignment - In progress
Complete the form, then choose the appropriate button at the bottom.
Home

Title
Syllabus Schedule Announcements Resources Assignments Tests & Quizzes Gradebook Chat Room M essages News Web Content Section Info Roster Site Info Search
Users present:

Assignment 6: Lambda calculus and abstract machines 24 Apr, 2013 11:55 pm Not Started Points (max 10.0)

Due Status Grade Scale Instructions

In this assignment you will model the lambda calculus 1. Define an OCaml data type lc for the pure lambda calculus 2. Define functions ht, size, fv that give the height, size (number of atomic terms) and free variables in a given lambda term. 3. Define a function subst that given a lambda term e, a variable x and another lambda term e' , returns e[e'/x]. 4. Define a function subterm_occ which returns all the occurrence positions (given as sequences over {L, R} of all occurrences of a given term e_1 inside another given term e_2. 5. Implement closures, using type and data type definitions, and write a functions isValueClosure that checks whether a given closure is a value closure or not. 6. Define functions that implement the big-step closure semantics for both call-y-value and call-by-name parameter passing. 7. For closed lambda terms, implement the SECD machine that defines execution under call-by-value. 8. For closed lambda terms, implement the Krivine machine that defines executionunder call-by-name semantics. Show that your abstract machine implementations are correct with respect to the semantics oyou have coded in part 6. For 7&8, define suitable functions to initialize the machine, and (in 8) to unload the machine. For (7), show that the closure that is obtained as the answer corresponds in a formal sense to the value closure that the call-by-value semantics of (6) returns.

RAHUL GOEL . V ISWA GAJULAV ARTHY TUSHAR GUPTA PIYUSH SHARMA

Submission
Assignment Text This assignment allows submissions using both the text box below and attached documents. Type your comments in the box below and use the Add Attachments button to include other documents. Save frequently while working.
https://sakai.iitd.ac.in/portal/site/3f9feb40-b45f-4f19-a6fd-18c9c631cac8/page/05c3eecb-c603-4118-8cd9-e98ac6500ad0

Source

1/2

2.ac.iitd.Ser ver localhost https://sakai.4/16/13 Sakai@IITD : PROGRAMMING LANGUAGES 1L1 : Assignments Source Style Format Font Size Attachments No attachments yet Select a file from computer (5 Gateway Mobile V iew Copyr ight 2003-2010 The Sakai Foundation. All r ights r eser ved.? . Sakai@IITD .8.Sakai 2.0 (Ker nel 1.in/portal/site/3f9feb40-b45f-4f19-a6fd-18c9c631cac8/page/05c3eecb-c603-4118-8cd9-e98ac6500ad0 2/2 .1).

Sign up to vote on this title
UsefulNot useful

Master Your Semester with Scribd & The New York Times

Special offer: Get 4 months of Scribd and The New York Times for just $1.87 per week!

Master Your Semester with a Special Offer from Scribd & The New York Times