Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generating random expressions sometimes results in an infinite loop #248

Open
joshuaharry opened this issue Sep 17, 2021 · 0 comments
Open

Comments

@joshuaharry
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant