argotorg / argotorg/solidity

[SMTChecker] Use natspec annotation to abstract function

Open
#11,030 3 comments 0 reactions 0 assignees View on GitHub
medium impact must have eventually smt
Dominant language
C++
Stars
25.7k
Forks
6.2k
Avg merge
1d 11h
Merged PRs (30d)
21

Description

Some contracts use functions like `pow` or `sqrt`, which are pretty hard to verify.
We could use natspec annotations to allow the user to force calls to that function to be abstracted as UF, which might help in some cases:
```
// @ spec-smtchecker abstract
function pow(uint a, uint b) {
...heavy stuff...
}
```

Contributor guide

Open the contributing guide

Research direction

Start by reading the SMTChecker implementation and the existing NatSpec annotation handling. Trace how function calls are represented for verification and determine where the proposed `spec-smtchecker abstract` annotation would be recognized. Done means calls to annotated functions are abstracted as uninterpreted functions without changing unannotated behavior, with coverage for cases such as `pow` or `sqrt`.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, solidity
Domain
blockchain, compilers
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.