Giter VIP home page Giter VIP logo

Comments (7)

qinheping avatar qinheping commented on August 16, 2024

In loop contracts, we replace quantified variables with a tmp variable and add the tmp variable to the symbol map. However, the detection of the quantified variables is not complete now: https://github.com/diffblue/cbmc/blob/develop/src/goto-instrument/contracts/utils.cpp#L425. It does not include equal expression. The error doesn't persist once I add the equal expression to the detection.

from cbmc.

qinheping avatar qinheping commented on August 16, 2024

As a workaround before the fix is merged, you may want to use the boolean variable arrays_not_match and invariant arrays_not_match != __CPROVER_forall instead.

from cbmc.

rod-chapman avatar rod-chapman commented on August 16, 2024

Please let me know when this fix is merged.

from cbmc.

rod-chapman avatar rod-chapman commented on August 16, 2024

I tried inverting the logic and using != instead of ==, but I don't like it because it makes the code much harder to read and understand.

With that change, I get 2 warnings that say "warning: ignoring forall" which are followed by a print out of some syntax tree. What does that mean?

from cbmc.

remi-delmas-3000 avatar remi-delmas-3000 commented on August 16, 2024

"warning: ignoring forall"

The SAT backend eagerly grounds quantifiers when domains are small, but ignores them when domains are too large, which is seems to be the case here. You should try using the SMT back-end to solve this example, quantifiers are passed to the SMT back-end and grounded using the solver's heuristics.

from cbmc.

rod-chapman avatar rod-chapman commented on August 16, 2024

OK. Please improve the error message to make it clearer what's wrong and what the corrective action should be.

from cbmc.

qinheping avatar qinheping commented on August 16, 2024

Please let me know when this fix is merged.

#8299 was merged.

from cbmc.

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.