strange behavior of a continuation passing interpreter (Chap 5 EOPL3)

56 views
Skip to first unread message

kwarm...@shaw.ca

unread,
Feb 24, 2014, 6:42:43 PM2/24/14
to eo...@googlegroups.com
The attached file contains a continuation passing interpreter that is stripped down version of a much larger interpreter which contains arithmetic and logical operations , let, letrec, proc, etc.
I retained only the operations necessary to demonstrate my problem.
When (run test--) is tried the tests 1,2,3 yield the error message 
"expval-extractors: Looking for a {bool or num}, found #(struct:list-val (#(struct:num-val 5)
 #(struct:num-val 6) #(struct:num-val 7) #(struct:num-val 8) #(struct:num-val 9) #(struct:num-val 10)))"  
On the other hand The logically eqivalent tests 1x,2x,3x all run properly
Can antbody give me a clue as to the reason for this behavior. 
stripped.rkt

Kenneth Armstrong

unread,
Feb 24, 2014, 7:41:50 PM2/24/14
to eo...@googlegroups.com
I should have mentioned this behavior only occurs when list operations are involved. Otherwise the large interpreter handles everything else properly. I also discovered that I forgot to strip: (define (extend-env-expval ---); (define (extend-env-expvals* ---); (define-datatype proc ---) in stripped.rkt.
Reply all
Reply to author
Forward
0 new messages