Skip to content

Assert and Unfold in pure functions#248

Merged
marcoeilers merged 7 commits into
masterfrom
assert_in_pure_functions
Nov 11, 2025
Merged

Assert and Unfold in pure functions#248
marcoeilers merged 7 commits into
masterfrom
assert_in_pure_functions

Conversation

@marcoeilers

@marcoeilers marcoeilers commented Nov 11, 2025

Copy link
Copy Markdown
Owner

This PR adds the ability to use Unfold(P(...)) and Assert(e) as statements inside pure functions the same way they can be used in non-pure functions: Assert checks if the given assertion holds at this point in the program, and Unfold unfolds the given predicate on the given path (s.t. it remains unfolded on this path).

They are translated into unfolding and asserting expressions on the Viper level.


This change is Reviewable

@marcoeilers
marcoeilers merged commit 35a6796 into master Nov 11, 2025
4 checks passed
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