Skip to content

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

@countvajhula

Description

@countvajhula

(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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions