Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Explore logging as a way to get more precise compiler tests #170

Open
countvajhula opened this issue Apr 5, 2024 · 0 comments
Open

Explore logging as a way to get more precise compiler tests #170

countvajhula opened this issue Apr 5, 2024 · 0 comments
Labels
compiler developer Relevant only to Qi developers

Comments

@countvajhula
Copy link
Collaborator

(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 countvajhula added developer Relevant only to Qi developers compiler labels Apr 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compiler developer Relevant only to Qi developers
Projects
None yet
Development

No branches or pull requests

1 participant