Code Monkey home page Code Monkey logo

Comments (4)

wintersteiger avatar wintersteiger commented on September 13, 2024

Floating-point constraints are usually translated first into bit-vectors and then into propositional SAT. Conversion terms from/to (non-numeral) reals translate into large non-linear constraints over the reals, which the (new, fast) purely propositional SAT solver can't handle, so it falls back to the (old, slow) SMT core that handles all theories, but is often slower. In the case of these non-linear constraints it's simply not strong enough and it either doesn't terminate or gives up early and returns unknown.

For numerals, we can get rid of those expressions altogether (and I've added another one of those in 59911f78), but for general constraints, there is no efficient method yet.

from z3.

wintersteiger avatar wintersteiger commented on September 13, 2024

Closing this issue as all questions are answered. There is no simple solution to the performance problems, so will require more research. Feel free to re-open if new information becomes available.

from z3.

LeventErkok avatar LeventErkok commented on September 13, 2024

Indeed, there isn't much point to keeping this ticket here.

I'll just note that most of the interesting floating-point verification work actually involves showing that certain operations will produce exact results. The typical approach is to take two floats, convert them to reals, do the operation with infinite precision, and turn the result back to a float using the rounding mode. Then, one shows that this result is precisely the same as just doing the corresponding operation directly on the floats without moving to reals and back. (This is the required behavior in the IEEE754 sense.)

I'd even say that this is the raison d'etre for why we want an automated floating-point logic in the first place.

Of course, none of this is criticism for Z3 or SMT. It's just that such problems are hard and more research is needed. But without proper real/float conversion support in solvers, the automation is inherently limited in its industrial use.

from z3.

wintersteiger avatar wintersteiger commented on September 13, 2024

You're completely right of course and we are aware of those problems. We have plans to extend the floating point reasoning in that direction, but that will take some time.

from z3.

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.