
This adds the option to generate random terms that satisfy judgment-forms and metafunctions. Currently functionality does not include: - patterns/terms using: ellipses, in-hole/hole and relatives, side-conditions, unquotes - define-relation - redex-check integration
23 lines
388 B
Racket
23 lines
388 B
Racket
#lang racket
|
|
|
|
(require redex/reduction-semantics
|
|
redex/private/gen-trace
|
|
redex/private/search)
|
|
|
|
(define-language L
|
|
(v a
|
|
b
|
|
c))
|
|
|
|
(define-metafunction L
|
|
[(is-a? a)
|
|
T]
|
|
[(is-a? v)
|
|
F])
|
|
|
|
(enable-gen-trace!)
|
|
(test-equal (generate-term L #:satisfying
|
|
(is-a? b) any
|
|
+inf.0)
|
|
'((is-a? b) = F))
|