grin-compiler / grin

GRIN is a compiler back-end for lazy and strict functional languages with whole program optimization support.
https://grin-compiler.github.io/
1.03k stars 38 forks source link

Eval statistics. #77

Closed andorp closed 4 years ago

andorp commented 4 years ago

This is a preliminary for the counting immutable beans implementation.

Motivation: The CIB runtime reuses heap locations after instrumentation of the code. I am going to implement such an evaluator but before that I would like to measure the heap access patterns for the Idris compiled programs. Thus I need this piece of functionality first.

Anabra commented 4 years ago

I have done something similar in the past. Maybe have a look at this? I personally prefer another monadic layer to tuple return.

andorp commented 4 years ago

@Anabra I agree. My plan here is to wait for the #32 and import the abstract interpretation mechanism from mini-grin which can implement the definitional interpreter and can be decorated easily, like including the statistics. I should have mentioned this raising this PR.