Request: once-and-for-all definitions of free-vars, free-in, not-free-in
Nobody has claimed this yet.
- Dominant language
- Racket
- Stars
- 112
- Forks
- 42
- PR merge metrics
- No merged PRs in 30d
Description
I'll try to submit a patch in the coming weeks, but I'm going to leave this here for now in case someone knows how to do it more quickly than I do.
It seems like with the addition of binding-forms, we should be able to add a few more binding related (meta)functions "once-and-for-all", like was done for substitute and alpha-equivalent?.
In particular:
; Returns the free variables of any_e
free-vars : any_e -> (any_x ...)
; Returns #t when any_x is free in any_e, and #f otherwise.
free-in : any_e any_x -> #t or #f
; Returns #t when any_x is not free in any_e, and #f otherwise.
not-free-in : any_e any_x -> #t or #f
; Returns any_e with each any_xi replaced by any_ei. Substitution should be performed in order, so any any_e{i-1} can have any_xi.
; e.g.s
; (substitute* x (x y) (1 2)) -> 1
; (substitute* x (x y) (y 1)) -> 1
; (substitute* (x y) (x y) (1 2)) -> (1 2)
substitute* : any_e (any_xi ..._0) (any_ei ..._ 0) -> any_e
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Review the existing binding-forms support and the implementations of substitute and alpha-equivalent? first. Compare the proposed free-vars, free-in, not-free-in, and substitute* interfaces with the examples in the issue, then confirm that the intended semantics and completion criteria are agreed before starting implementation.
Written by the indexing model from the issue text.
Assessment
- Domain
- compilers
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100