Skip to content

Add wave front invariant static check#32

Draft
ninioArtillero wants to merge 3 commits into
deprecated-docfrom
wavefront-check
Draft

Add wave front invariant static check#32
ninioArtillero wants to merge 3 commits into
deprecated-docfrom
wavefront-check

Conversation

@ninioArtillero

@ninioArtillero ninioArtillero commented Jul 9, 2026

Copy link
Copy Markdown
Collaborator

This PR adds static checks for the documented invariants of furtherReaching and dstep without introducing semantic effects. For the latter, a LiquidHaskell refinement type alias WaveFront is defined, to express the invariant more concisely, and a new phantom (i.e. unused in the source) parameter that passes the current iteration number (or equivalently, the edit trace length of the input node list) is added.

Two helper functions _kdiag and _wfDiags are defined to be used inside refinement predicates;their names start with an underscore to avoid compiler warnings of unused functions.

The {-@ LIQUID "--ple" @-} pragma is required for the appropriate unfolding of reflected functions (like _wfDiags here), necessary for the checks to work as expected.

cabal bench shows no (noticeable) performance variation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant