Coder Social home page Coder Social logo

[QUESTION] Get SMT formula about esbmc HOT 5 CLOSED

MJJ-Shuai avatar MJJ-Shuai commented on June 10, 2024
[QUESTION] Get SMT formula

from esbmc.

Comments (5)

MJJ-Shuai avatar MJJ-Shuai commented on June 10, 2024 1

@fbrausse Oh, I see. I will give it a try. Thank you again.

from esbmc.

fbrausse avatar fbrausse commented on June 10, 2024

Hi @MJJ-Shuai. ESBMC can generate SMT formulas instead of solving the safety properties it normally checks with --smtlib --smt-formula-only --output FILE.smt2. There are other ways to generate such formulas, too, specific to each built-in solver. For that, replace --smtlib by, e.g., --z3 and you will notice that the result will be a different, but equi-satisfiable, formula understandable by Z3.

This program however is a bit too simple for ESBMC to regularly invoke an SMT solver for. ESBMC will solve it directly. However, by adding the options --unwind 1 --no-simplify it will generate such a formula. This one for --smtlib: gh-1829.txt Note that the --unwind bound is specific to this program. In general, when a program contains potentially unbounded loops, this bound could be higher or not exist at all without specialized solving strategies, such as k-induction.

You might find that the formula is relatively large compared to the given program. That is because a lot of it relates to setting up symbols required for dealing with lifetime properties of dynamically allocated objects and the address space in general.

from esbmc.

MJJ-Shuai avatar MJJ-Shuai commented on June 10, 2024

@fbrausse Thanks for your quick reply, I will consider your suggestions. Besides, if I need to use cvc5,esbmc can also generate smt formula for it, right?

from esbmc.

fbrausse avatar fbrausse commented on June 10, 2024

@fbrausse Thanks for your quick reply, I will consider your suggestions. Besides, if I need to use cvc5,esbmc can also generate smt formula for it, right?

ESBMC at the moment doesn't have a cvc5 backend, but it does have a cvc4 one. Unfortunately, the cvc4 backend can't produce SMT output files right now (it talks to the cvc4 API directly). However, the --smtlib output is the most general and should be understood by all SMT-Lib v2 compliant solvers including cvc5.

from esbmc.

lucasccordeiro avatar lucasccordeiro commented on June 10, 2024

@fbrausse: Can you please submit a PR to update our documentation https://ssvlab.github.io/esbmc/documentation.html#smt-backends with these commands?

from esbmc.

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.