Generating random expressions sometimes results in an infinite loop
Open
Nobody has claimed this yet.
- Dominant language
- Racket
- Stars
- 112
- Forks
- 42
- PR merge metrics
- No merged PRs in 30d
Description
Consider the following program:
#lang racket/base
(require redex/reduction-semantics)
(define-language L
(self ::= (self)))
(define-judgment-form L
#:mode (--> I O)
#:contract (--> self self)
[----------- "Do Nothing"
(--> (self) (self))])
(define (f el)
(printf "F ran!\n")
(if (redex-match L val el) #true
(= 1 (length (apply-reduction-relation --> el)))))
(printf "Start generation...\n")
(redex-check L self (f (term self)))
This code appears to print "Start generation..." before getting stuck while generating test cases.
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
Run the supplied Racket reproducer first and inspect the redex-check random-expression generation path. Trace why generation does not terminate for the self grammar, then verify that the same program completes instead of getting stuck.
Written by the indexing model from the issue text.
Assessment
- Domain
- testing-qa
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100