--
You received this message because you are subscribed to the Google Groups "Utah Compilers, Spring 2013" group.
To unsubscribe from this group and stop receiving emails from it, send an email to utah-compilers-spri...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
For this test using reference impl pycps_rkt.zo:var = 1 assert var != 0, 'zero' assert var >= 0
I get this error:
arity mismatch;
the expected number of arguments does not match the given number
expected: 1
given: 0when using these suggested asserts in {lir,cps}-header.rkt:(define (assert1 thunk) (when (not (thunk))
(error "Assertion failure!"))) (define (assert2 thunk1 thunk2)
(when (not (thunk1)) (error "Assertion failure!")))
There is a missing parameter somewhere because the params to assert are wrapped in lambdas that end up taking continuations as params.
Perhaps the missing param is when the thunk is applied inside the assert procedure at:
(when (not (thunk <missing-param?>))
reference cps output shows a required param, the continuation:
((cps assert2) (lambda (k1) ((cps equal?) g$var 0 k1)) (lambda (k2) (k2 "not zero")) $halt)