Code Monkey home page Code Monkey logo

Comments (2)

Heaven2024 avatar Heaven2024 commented on June 25, 2024

another case in incremental mode:

(set-logic ALL)
(set-option :incremental true)
(declare-const i2 Int)
(declare-fun f (Int Int) Int)
(assert (! (forall ((q0 Int) (q1 Int))
            (=> (= (f i2 q0) 0) (= q1 (* i2 q0)))):named IP_3))
(push 1)
(assert (> i2 10))
(check-sat)
(get-model)
(pop 1)
(check-sat)
(get-model)

cvc5 --produce-models --check-model --finite-model-find   test.smt2
sat
(
(define-fun i2 () Int 11)
(define-fun f (($x1 Int) ($x2 Int)) Int 11)
)
unknown
(
(define-fun i2 () Int 11)
(define-fun f (($x1 Int) ($x2 Int)) Int (ite (and (= $x1 11) (= $x2 0)) (- 1) 0))
)

In fact, the solution problem after the pop command is equivalent to:

(set-logic ALL)
(declare-const i2 Int)
(declare-fun f (Int Int) Int)
(assert (! (forall ((q0 Int) (q1 Int))
            (=> (= (f i2 q0) 0) (= q1 (* i2 q0)))):named IP_3))
(check-sat)
(get-model)

cvc5 --produce-models --check-model --finite-model-find   test.smt2
sat
(
(define-fun i2 () Int 0)
(define-fun f (($x1 Int) ($x2 Int)) Int (- 1))
)

from cvc5.

ajreynol avatar ajreynol commented on June 25, 2024

When cvc5 returns "unknown", the model returned is not guaranteed to be a model of original input formula. It however will in practice satisfy all quantifier-free constraints in most decidable theories.

FYI, for more details on how to understand information from cvc5 and further diagnose issues like this, I recommend reading my latest blog post here: https://cvc5.github.io/blog/2024/04/15/interfaces-for-understanding-cvc5.html

from cvc5.

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.