This is a project for the course CS350A: Principles of Programming Languages
Requires Haskell to run
To start the interpreter run the code using runhaskell or ghc :
> runhaskell lci.hs
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
> "(\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
- Kaushik Raj V Nadar (200499)
- Lakshmi Pravallika (200282)