racket/collects/redex/private/tmp.rkt
Burke Fetscher 44dd4acb44 Additional random test generation capability for Redex.
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
2012-10-17 16:30:51 -05:00

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))