Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

does not accept (model (define-fun X () Real 2) ) #20

Open
jwaldmann opened this issue Mar 15, 2021 · 1 comment
Open

does not accept (model (define-fun X () Real 2) ) #20

jwaldmann opened this issue Mar 15, 2021 · 1 comment

Comments

@jwaldmann
Copy link

opensmt uses decimal literals for real values, as in

echo "(set-logic QF_LRA)(set-option :produce-models true)(declare-fun X () Real)(assert (< 1 X)) (check-sat) (get-model)" | opensmt -p
sat
(model
(define-fun X () Real 2)
)

it seems that the smtlib2 model parser insists on 2.0, as produced by

echo "(set-logic QF_LRA)(set-option :produce-models true)(declare-fun X () Real)(assert (< 1 X)) (check-sat) (get-model)" | cvc4 --lang smt

sat

(model
(define-fun X () Real 2.0)
)
@jwaldmann
Copy link
Author

jwaldmann commented Mar 16, 2021

The actual error message is

pure-matchbox: smtlib2: Unknown get-model response: 2 has type int, but real was expected.
CallStack (from HasCallStack):
  error, called at ./Language/SMTLib2/Pipe/Internals.hs:238:19 in smtlib2-pipe-1.0-K1MUvLCfPFO2upHs8kKb7q:Language.SMTLib2.Pipe.Internals

this is in getModel (not in modelEvaluate)

jwaldmann pushed a commit to jwaldmann/smtlib2 that referenced this issue Mar 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant