effekt-lang / effekt-lang/effekt

Assert pre/post/invariants of phases

Open
#330 0 comments 1 reaction 0 assignees View on GitHub
area:compiler feature
Dominant language
Scala
Stars
469
Forks
41
Avg merge
1d 16h
Merged PRs (30d)
23

Description

It would be great if each [`Phase`](https://github.com/effekt-lang/effekt/blob/master/effekt/shared/src/main/scala/effekt/Phase.scala) would have an additional method(s) that could check the pre- and postconditions and thus maintain invariants of the ASTs.

There should be a `debug` flag or similar in the [config](https://github.com/effekt-lang/effekt/blob/master/effekt/jvm/src/main/scala/effekt/EffektConfig.scala) that enables this. Since this might slow down the compilation and CI significantly we might only want to run this when merging into master and not on each push.

Ideally, we would have some reusable components to check invariants such as `NoLocalDefinition`, `NoAdditionalFreeVars`, `TypeChecks`, ...

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.