racket / racket/redex

check syntax doesn't consider extensions to non-terminals as uses

Open
#137 3 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

In the program

#lang racket
(require redex)
(define-language a
  (on ::= 1))
(define-extended-language b a
  (on ::= .... (- 2 1)))

(redex-match? b on (- 2 1))

if i try to fix the typo and rename on to one, I get:

#lang racket
(require redex)
(define-language a
  (one ::= 1))
(define-extended-language b a
  (on ::= .... (- 2 1)))

(redex-match? b one (- 2 1))

where the extension in the language b is still named on.

I would expect that the on in the extended language should be both a usage of on from language a and as a second definition of on when its referred to in the redex-match?

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 with the two Racket examples in the issue and trace the syntax-checking entry point for define-extended-language and non-terminal extensions. The change is done when renaming the base language's non-terminal causes the stale extension reference to be recognized as a use and reported appropriately.

Written by the indexing model from the issue text.

Assessment

Domain
devtools
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 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.