js-slang
js-slang copied to clipboard
Infinite loop detector: Cycle detection may have errors
Currently the cycle detection equality check uses stringify, which cannot differentiate between arrays which have the same values but different references.
e.g. in
const xs = pair(1, 1);
const ys = pair(xs, xs);
const ys_alt = pair(pair(1, 1), pair(1, 1));
it will treat ys and ys_alt as equal, which might lead to some false positives.