## Context
This PR implements issue #26, adding a De Bruijn indexed reduction engine as an alternative to the standard lambda calculus interpreter.
## Summary
- Add `-i` flag to select interpreter (`lambda` or `debruijn`)
- Create `debruijn` package with Expression types:
- `Variable` with integer index and optional label
- `Abstraction` without named parameter (parameter is implicit)
- `Application` same as lambda
- Implement shift and substitute operations for De Bruijn indices
- Add conversion functions between lambda and De Bruijn representations
- Update CLI to support switching between interpreters
- Add De Bruijn tests to verify all samples pass
## Test Plan
- [x] All existing lambda interpreter tests pass
- [x] All De Bruijn interpreter tests pass with same expected output
- [x] Invalid interpreter flag returns appropriate error
- [x] Both interpreters produce identical results for all test samples
Closes #26
Add a new interpreter option (-i debruijn) that uses De Bruijn indices
for variable representation, eliminating the need for variable renaming
during substitution.
- Add -i flag to select interpreter (lambda or debruijn)
- Create debruijn package with Expression types (Variable with index,
Abstraction without parameter, Application)
- Implement shift and substitute operations for De Bruijn indices
- Add conversion functions between lambda and De Bruijn representations
- Update CLI to support switching between interpreters
- Add De Bruijn tests to verify all samples pass
Closes#26
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Context
This PR implements issue #26, adding a De Bruijn indexed reduction engine as an alternative to the standard lambda calculus interpreter.
Summary
-iflag to select interpreter (lambdaordebruijn)debruijnpackage with Expression types:Variablewith integer index and optional labelAbstractionwithout named parameter (parameter is implicit)Applicationsame as lambdaTest Plan
Closes #26
Pull request closed