plum-umd / abstracting-definitional-interpreters

Abstracting Definitional Interpreters
67 stars 2 forks source link

Program crashes eval-pdcfa-gc #82

Open polux opened 6 years ago

polux commented 6 years ago

The following program seems to crash eval-pdcfa-gc (but not eval-pdcfa-widen-gc).

(define (fiblike N)                                             
  (parse                                                        
   `((rec f (λ (x)
             (if0 x                                             
                  1                                             
                  (+ (f (- x 1)) (f (- x 1))))))                
         ,N)))

Evaluating this program with input 5 yields:

hash-ref: no value found for key
  key: 'f

Interestingly the real fib function (where the second call is (- x 2)) does not crash eval-pdcfa-gc. So this must be due to some interaction between the cache and the GC.