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

Standardisation of quotations in echo #31

Closed
edwardcwang opened this issue Sep 26, 2024 · 7 comments
Closed

Standardisation of quotations in echo #31

edwardcwang opened this issue Sep 26, 2024 · 7 comments

Comments

@edwardcwang
Copy link

edwardcwang commented Sep 26, 2024

Different solvers seem to differ on whether or not to include the quotation marks in the echo command.
e.g. Z3 and Yices exclude the quotes whereas the others include the quotes.

$ cvc5 -i -q --no-interactive
(echo "hello")
"hello"
$ cvc4 -i -q --no-interactive --lang smt2
(echo "hello")
"hello"
$ mathsat 
(echo "hello")
"hello"
$ z3 -smt2 -v:0 -in
(echo "hello")
hello
$ yices-smt2 --smt2-model-format --incremental
(echo "hello")
hello
@fontainep
Copy link
Contributor

Hi,

thanks for your comment. The standard document clarifies that:
"(echo s) where s is a string literal, simply prints back s as is—including the surrounding double-quotes."
See page 68 of the latest 2.6 release: https://smt-lib.org/papers/smt-lib-reference-v2.6-r2024-09-20.pdf

Does this answer your question?

@edwardcwang
Copy link
Author

Hi, thanks for clarifying. In this case z3 and yices are out of spec then?

@fontainep
Copy link
Contributor

It seems so...

@edwardcwang
Copy link
Author

So for Z3 as per Z3Prover/z3#5745 it turns out that (set-option :smtlib2_compliant true) is necessary.

$ z3 -smt2 -v:0 -in
(set-option :smtlib2_compliant true)
success
(echo "A")
"A"
$ z3 -smt2 -v:0 -in
(echo "A")
A

@edwardcwang
Copy link
Author

For yices this is already filed in SRI-CSL/yices2#416

@fontainep
Copy link
Contributor

Thanks for digging out the information!
Can we close the issue for SMT-LIB?

@edwardcwang
Copy link
Author

Of course! Thanks for your help.

@edwardcwang edwardcwang closed this as not planned Won't fix, can't repro, duplicate, stale Oct 16, 2024
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

2 participants