Handle failing case for relation generation.

This commit is contained in:
Burke Fetscher 2012-11-30 17:30:34 -06:00
parent 7c7c1fbafc
commit 26766e413a
2 changed files with 5 additions and 1 deletions

View File

@ -441,7 +441,8 @@
(λ ()
(match (gen-proc)
[`(,jf-name (,trms (... ...)))
`(,jf-name ,@trms)])))
`(,jf-name ,@trms)]
[#f #f])))
#`(make-jf-gen/proc 'jf/mf-id #,clauses lang-id 'pat size))))]
[_
(raise-syntax-error 'redex-generator

View File

@ -73,6 +73,9 @@
(test-equal (generate-term nats #:satisfying (sum (s z) (s z) n) +inf.0)
'(sum (s z) (s z) (s (s z))))
(test-equal (generate-term nats #:satisfying (sum z z (s z)) 5)
#f)
(for ([_ 100])
(match (generate-term nats #:satisfying (sum n_1 n_2 n_3) 5)
[`(sum ,l ,r ,res)