GithubHelp home page GithubHelp logo

Comments (5)

mpreiner avatar mpreiner commented on July 29, 2024

I'm not sure I understand what the issue is? Can you please elaborate.

from boolector.

gsingla21 avatar gsingla21 commented on July 29, 2024

with PROP Engine ON, Incremental Mode On,
(x>=1 && x<=10) provides different possible value of x (e.g. 1,9,8,6,...) everytime boolector_sat is executed.
But for
(x>=0 && x<=10) provides only x=0 for every time boolector_sat is executed. (e.g. 0,0,0,0,0,...)
Not just this one, problem lies with every constraint where x=0 is a possible solution. It doesn't propagate if x=0 is a possible solution.
As you can see in above table, x>=0 equivalent btor file is just zero, it should have been something like
1 var 32 x
2 zero 32
3 ult 1 1 2
4 root 1 -3

from boolector.

mpreiner avatar mpreiner commented on July 29, 2024

Just to be clear: the prop engine is a local search engine, which can be randomized via the BTOR_OPT_SEED option. It is not guaranteed that it will always produce different model values for subsequent boolector_sat calls. If you want Boolector to provide different model values, you have to explicitly block these model values with new constraints. It is just coincidence that in your case it will return different values.

Your example code for (x >= 1 && x <= 10) produces the following for me:

i: 0 sat x: 15
i: 1 sat x: 15
i: 2 sat x: 15
i: 3 sat x: 15
i: 4 sat x: 15
i: 5 sat x: 5
i: 6 sat x: 15
i: 7 sat x: 15
i: 8 sat x: 15
i: 9 sat x: 15

Using a different random seed it will produce:

i: 0 sat x: 15
i: 1 sat x: 7
i: 2 sat x: 15
i: 3 sat x: 15
i: 4 sat x: 15
i: 5 sat x: 5
i: 6 sat x: 15
i: 7 sat x: 15
i: 8 sat x: 8
i: 9 sat x: 15

For the x >= 0 case it always returns 0 since this is the first value the local search engine tries and succeeds.

As you can see in above table, x>=0 equivalent btor file is just zero, it should have been something like
1 var 32 x
2 zero 32
3 ult 1 1 2
4 root 1 -3

When Boolector prints

1 zero 1
2 root 1 -1

just means that Boolector's preprocessor+rewriting was able to simplify the formula to true. This has nothing to do with the propagation engine.

from boolector.

gsingla21 avatar gsingla21 commented on July 29, 2024

Got it, Thanks

from boolector.

valeryjust avatar valeryjust commented on July 29, 2024

@mpreiner @gsingla21 Sorry for bothering you. I want to know is there a way to change the first value the local search engine tries and succeeds ?

from boolector.

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.