I upload this version, but wishing to use another late day to get a perfect version tomorrow. The eta reduction seems to have something wrong. Variable renaming will be in the form as x', x'', y', y'', etc. Since the language is based on the lambda calculus, it will need to include a constructor for functions. Repeat step 4) to interpret more Lambda calculus input files Value type You’ll need a type to represent the values your language works on, a sum of all the types of values you want to work with.Enter "main" to enter the Main function, then at the prompt of "Please enter a filename containing lambda expressions:", enter the input file name and a list of results will be displayed.If program loads successfully, it displays "Ok, modules loaded: PA1Helper, Main." Lambda Calculus Interpreter (Haskell) Author: Hao Zhong Date: September 2015 Features: The goal of this assignment is to write a lambda calculus interpreter in a functional programming language to reduce lambda calculus expressions in a callbyvalue (applicative order) manner.In terminal, run "ghci PA1SampleUsage.hs".Change to the directory where PA1SampleUsage.hs, PAHelper.hs, and all input file locate.In his version, there are three types of symbolic expressions: xxif xxis a symbol (variable), where we presume we have an infinite set of symbols to draw from. Your interpreter is expected to take each lambda calculus expression and repeatedly perform beta reduction until no longer possible (a value expression that can no longer be betareduced) and then eta reduction until no longer possible.ĭetailed description of the assignment can be found here: To Run: The lambda calculus Alonzo Church came up with a fairly nice and simple calculus that can be used as a basis for both computation and mathematics. There are several steps of the process that are missed because they are built into the Racket language. I decided I would try to implement it in Haskell instead of Racket. The goal of this assignment is to write a lambda calculus interpreter in a functional programming language to reduce lambda calculus expressions in a callbyvalue (applicative order) manner. Compiling and Interpreting the Lambda Calculus in Haskell This whole project is based on this post by Matt Might.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |