qi icon indicating copy to clipboard operation
qi copied to clipboard

Explore logging as a way to get more precise compiler tests

Open countvajhula opened this issue 11 months ago • 0 comments

(I thought we already had an issue for this but I don't see it.)

Currently, we have assertions in the compiler tests to check whether an expression was deforested. These assertions are based on crude string matching on the produced syntax. This means our deforestation tests aren't as tractable as we'd like. It could be better to have each optimization log when it is applied, so we can instead just verify in the tests that the log is present, and present the expected number of times, by capturing logs from an appropriate port during execution of the test.

This was suggested by @stamourv on Discourse, and is employed in Typed Racket.

countvajhula avatar Apr 05 '24 02:04 countvajhula