Skip to content

kaushik3012/CS350-Lambda-Calculus-Interpreter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 

Repository files navigation

Lambda Calculus Interpreter

This is a project for the course CS350A: Principles of Programming Languages
Requires Haskell to run

Usage

To start the interpreter run the code using runhaskell or ghc :

> runhaskell lci.hs


Features

The interpreter supports the following features :

  • Identifying whether the expression entered is a λ-term
  • Printing the free variables
  • substitute a λ-term replacing all free occurrences of a variable in another λ-term
  • Applying the Beta-reduction rule and converting it to the normal form

Example

> "(\x.\y.x)"
Free Variables in (\x.\y.x): []
Normal form of (\x.\y.x):
\x.\y.x
> "(\x.\y.x)(\x.x)"
Free Variables in (\x.\y.x)(\x.x): []
Normal form of (\x.\y.x)(\x.x):
\b.\x.x
> "(\x.x)a"
Free Variables in (\x.x)a: ["a"]
Normal form of (\x.x)a:
a

Team Members

  • Kaushik Raj V Nadar (200499)
  • Lakshmi Pravallika (200282)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published