Skip to content

ChakshuGautam/lc-interpreter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

599c2cc · Jan 22, 2025

History

9 Commits
Jan 22, 2025
Jan 22, 2025
Jan 22, 2025
Jan 22, 2025
Jan 22, 2025
Jan 22, 2025
Jan 21, 2025
Jan 22, 2025
Jan 22, 2025
Jan 22, 2025
Jan 22, 2025
Jan 21, 2025
Jan 22, 2025
Jan 22, 2025

Repository files navigation

λ-Calculus Interpreter

An interactive lambda calculus playground built with JavaScript. Try it live here.

Lambda Calculus Interpreter Screenshot

About

This is a learning project to understand lambda calculus through implementation. The interpreter supports:

  • Basic lambda calculus syntax
  • Function abstraction and application
  • Variable substitution
  • Beta reduction
  • Church numerals

I was reading Haskell Book and wanted to implement the interpreter. I will document my journey once the interpreter is complete.

Usage

If you are looking to work on the interpreter, you can run the following commands:

npm install
npm test

If you are planning to work on the cli/playground, you can run the following commands:

npm run dev

TODO

  • Pass all interpreter tests | 3 pending
  • Add a linter
  • Error Handling
    • Better error messages for syntax errors
    • Visual indication of error location
    • Type checking and validation
  • Terminal Experience
    • Command history (up/down arrows)
    • Clear screen command
    • Tab completion
    • Save/load expressions
  • Beta Reduction Steps
    • Show step-by-step reduction
    • Visual tree representation

Resources

Contributing

Please help me with the pending test cases on interpreter.test.js and pointing mistakes in the interpreter. I have currently commented those out. I have also not completely grasped the interpreter written by Tadeu Zagallo too.

License

MIT

Releases

No releases published

Packages

No packages published