racket / racket/redex

judgment-form generation failure when variable-not-otherwise-mentioned combines with variable-not-in

Open
#76 0 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

The call to generate-program here always fails:

#lang racket
(require redex/reduction-semantics)
(define-language L
  (x ::= variable-not-otherwise-mentioned (list x)))

(define-judgment-form L
  #:mode (J I I O)
  [(where x ,(variable-not-in (term (x_a x_b)) 'q))
   ------------------
   (J x_a x_b x)])

(generate-term L #:satisfying (J any_1 any_2 any_3) 4)

The issue seems to be in the ground-or-ok function: https://github.com/racket/redex/blob/745e22c32359a469a2925156b902ba1550e9e378/redex-lib/redex/private/jdg-gen.rkt#L31 which doesn't seem to be treating variable-not-in properly.

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 running the supplied Racket example and inspect ground-or-ok in redex-lib/redex/private/jdg-gen.rkt at the linked location. Trace how variable-not-otherwise-mentioned and variable-not-in are handled during judgment-form generation; done means the generate-program call no longer fails for this reproduction.

Written by the indexing model from the issue text.

Assessment

Domain
compilers
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.