0

I'm using DrRacket if that helps.

So for example evaluating (* 1 2)the evaluation trace would be:

eval: (* 1 2) Env0  
eval: * Env0  
list-of-values: (1 2) Env0  
eval: 1 Env0  
list-of-values: (2) Env0  
eval: 2 Env0  
list-of-values: () Env0  
apply: [*] (1 2)

If it's not possible to show the environment the evaluation is taking place in, is there at least a way to show the evaluation trace (I was thinking maybe it was possible by running the metacircular evaluator and getting it to trace in the relevant places)?

  • Use DrRacket's debugger, it'll show you a step-by step evaluation. Alternatively, if you're interested in interpreters, you could implement one on top, like the ones shown in [SICP](http://mitpress.mit.edu/sicp/full-text/book/book-Z-H-25.html#%_chap_4). – Óscar López Jan 11 '15 at 16:25
  • This might help you, seems like your problem: http://stackoverflow.com/questions/24226924/using-trace-to-display-a-procedure-in-racket/25478312#25478312 – David Merinos Jan 15 '15 at 20:49

1 Answers1

0

Try http://docs.racket-lang.org/reference/debugging.html?q=trace#%28form._%28%28lib._racket%2Ftrace..rkt%29._trace%29%29

It doesn't show the environment.

Also: try the algebraic stepper.

soegaard
  • 30,661
  • 4
  • 57
  • 106