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

Verification with NonLinear Arithmetic Disabled? #573

Open
DavePearce opened this issue May 25, 2023 · 1 comment
Open

Verification with NonLinear Arithmetic Disabled? #573

DavePearce opened this issue May 25, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@DavePearce
Copy link
Collaborator

DavePearce commented May 25, 2023

Given the known limitations of Z3, an interesting question is whether or not we can use the DafnyEVM with the flag --disable-nonlinear-arithmetic. My expectation is that this will not work out of the box. Rather, it will work once we have added lemmas in suitable places for it to verify. But, I'm not sure how much effort will be involved here. If its not too much effort ... then it might be worth doing, and maintaining going forward.

@DavePearce DavePearce added the enhancement New feature or request label May 25, 2023
@DavePearce
Copy link
Collaborator Author

The following methods are impacted:

  • function Pow(n:nat, k:nat)
  • function GcdExtended(a: nat, b: nat)
  • function Shr(lhs: u256, rhs: u256)
  • function Div(lhs: i256, rhs: i256)
  • function Rem(lhs: i256, rhs: i256)
  • function Sar(lhs: i256, rhs: u256)
  • function DivWithZero(lhs:u256, rhs:u256)
  • function QuadraticCost(memUsedSize: nat)
  • lemma QuadraticCostIsMonotonic(x: nat, y: nat)
  • function f(x: nat)

Marking these with {:verify false} means that the code base with verify under --disable-nonlinear-arithmetic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant