racket / racket/redex

Feature request: “shallow” version of `compatible-closure-context`

Open
#209 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Racket
Stars
112
Forks
42
PR merge metrics
No merged PRs in 30d

Description

I would like a slight variant of compatible-closure-context that is “shallow” instead of recursive. This is best explained by example. Consider the following language:

(define-language L
  [e ::= x (λ x e) (e e)]
  [C ::= hole (λ x C) (C e) (e C)]
  [S ::= (λ x hole) (hole e) (e hole)]
  [x ::= variable-not-otherwise-mentioned])

Currently, the pattern (compatible-closure-context e) is equivalent to the pattern C. However, I would like Redex to be able to instead generate the pattern S. I don’t understand the terminology well enough to suggest a name for such a pattern, but it seems straightforward to implement, since it’s really just a small variant on compatible-closure-context.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the implementation and tests for compatible-closure-context, then compare its current recursive behavior with the issue's L and S examples. Done means a supported shallow variant produces S rather than C and has coverage for the demonstrated language.

Written by the indexing model from the issue text.

Assessment

Domain
compilers
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.