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

support for addmod #135

Open
dddejan opened this issue Jan 27, 2020 · 0 comments
Open

support for addmod #135

dddejan opened this issue Jan 27, 2020 · 0 comments

Comments

@dddejan
Copy link
Member

dddejan commented Jan 27, 2020

pragma solidity >=0.5.0;

contract A {
  function f(uint x, uint y, uint m) public returns (uint r) {
    r = addmod(x, y, m);
  }
}

Currently gives

$ solc-verify.py issue.sol --solver cvc4 --output .
Error while running verifier, details:
Parsing ./issue.sol.bpl
./issue.sol.bpl(20,1): Error: call to undeclared procedure: addmod#25
1 name resolution errors detected in ./issue.sol.bpl

From documentation addmod(uint x, uint y, uint k) returns (uint): compute (x + y) % k where the addition is performed with arbitrary precision and does not wrap around at 2**256. Assert that k != 0 starting from version 0.5.0.

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

No branches or pull requests

1 participant