rascal
rascal copied to clipboard
Call tracing is implemented using static fields of `AbstractFunction` breaking Evaluator instance encapsulation
Describe the bug
In the tutor I know get the call traces of the compiler itself while running an example code that traces factorial.
The reason is this code in AbstractFunction, and the code that uses these fields:
protected static int callNesting = 0;
protected static boolean callTracing = false;
We should move the callNesting field to a property of the Evaluator instance itself; then all bugs related to this will be resolved.