Add unallocated node type

This commit is contained in:
Yiyun Liu 2025-06-07 16:34:28 -04:00
parent 4a63f28a63
commit ba13ba5dbd
3 changed files with 119 additions and 15 deletions

View file

@ -31,3 +31,4 @@
(check-equal? (exp-final-node (ap-exp 'K 100 99)) 100)
(check-equal? (exp-final-node `(let ((x ,(ap-exp 'S 'K 'K 3)) (y 5)) ,(ap-exp 'K 'x 'x))) 3)
(check-equal? (exp-final-node `(let ((x ,(ap-exp 'S 'K 'K 3)) (y 5)) ,(ap-exp 'K 'y 'x))) 5)
;; (check-equal? (exp-final-node `(letrec ((y x) (x ,(ap-exp 'S 'K 'K 3))) ,(ap-exp 'K 'y 'x))) 5)