Skip to content

Add wave front invariant static check#32

Merged
ninioArtillero merged 3 commits into
masterfrom
wavefront-check
Jul 16, 2026
Merged

Add wave front invariant static check#32
ninioArtillero merged 3 commits into
masterfrom
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.

@ninioArtillero
ninioArtillero marked this pull request as ready for review July 14, 2026 17:47
Base automatically changed from deprecated-doc to master July 14, 2026 23:37
@ninioArtillero
ninioArtillero merged commit 03e59e5 into master Jul 16, 2026
13 checks passed
@ninioArtillero
ninioArtillero deleted the wavefront-check branch July 23, 2026 17:01
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