Coder Social home page Coder Social logo

Comments (4)

blishko avatar blishko commented on June 29, 2024

Hi @sallywang147,

do I read it correctly that you are using solc 0.7.0? That is rather old version of the compiler, SMTChecker has matured significantly since then.

On the latest version, I see different results from SMTChecker.
Can you check with the latest version and let us know if you still consider the answers incorrect?

One note about your examples:

uint128[] memory y;// = new uint128[](1);
y[0] = 23;

This is an access out of bounds, so the code would always revert at this point, making the assertions that follow always unreachable (and thus safe).

from solidity.

sallywang147 avatar sallywang147 commented on June 29, 2024

Hi @blishko, many thanks for your quick response! I totally agree that the newer compiler version (>=0.8.0) would prevent this issue. On 0.7.0, I think the root cause is not SMTChecker but the older compiler. For example, the 0.7.0 compiler generated x[0] = 0 when it really should've been x[0] = 23. That's why SMTChecker throws the violation when it executes the assertion assert(x[0]==23);. Is this explanation plausible? or in your view, is the issue caused by something else? Many thanks for your time!

from solidity.

blishko avatar blishko commented on June 29, 2024

I suspect that the SMTChecker warnings are independent of the code generated by the compiler.
Unfortunately, we cannot afford to investigate the behaviour in the old version of the compiler when the new version does not suffer from this issue.

from solidity.

sallywang147 avatar sallywang147 commented on June 29, 2024

Ah no worries at all, many thanks again for your quick response! I'll close the comment.

from solidity.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.