Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Required invariant minimal example #166

Open
wants to merge 2 commits into
base: cli-beta
Choose a base branch
from

Conversation

nivcertora
Copy link
Contributor

@nivcertora nivcertora requested a review from nd-certora April 7, 2025 09:03
@nivcertora nivcertora self-assigned this Apr 7, 2025
Copy link
Contributor

@nd-certora nd-certora left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe someone can help explain the new require invariant, is it not quite as written here.

2. A **CVL specification** (`DataInvariant.spec`) that declares an invariant requiring **nonnegative** balances.
3. A **configuration file** (`DataInvariant.conf`) used to run the Certora Prover with our spec.

Under the **old** semantics, the invariant won't be enforced at the time the hook triggered, leading to a **false passing** invariant execution. Under the **new** `requireInvariant` semantics, the invariant is checked at rule boundaries or after calls/havocs for strong invariants, correctly **failing** when a negative balance occurs.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we say which version of certora?

the requireinvariant is checked at the rule boundaries on the arguments passed...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new version isn't published yet so i am not sure how to mention specific version here, @yoav-el-certora maybe you know how we should handle this.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Once @johspaeth merge his PR, we will know the release version for this example.
Please keep us updated.

(Both this PR and the other one should not merge before Johannes merge his PR)

@nivcertora nivcertora requested a review from nd-certora April 7, 2025 17:13
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.

3 participants