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

jfs-smt2cxx can't handle all formulas that jfs can #39

Open
moyix opened this issue Dec 7, 2020 · 3 comments
Open

jfs-smt2cxx can't handle all formulas that jfs can #39

moyix opened this issue Dec 7, 2020 · 3 comments
Labels

Comments

@moyix
Copy link

moyix commented Dec 7, 2020

There seems to be a slight mismatch in the set of formulas accepted by jfs-smt2cxx versus jfs. An example is 20170501-Heizmann-UltimateAutomizer/cos_polynomial_true-unreach-call.c_9.smt2 (attached), which is quickly solved using jfs but dies with unsupported kind under jfs-smt2cxx:

user@ccbb42e224b5:~$ jfs/build/bin/jfs /out/20170501-Heizmann-UltimateAutomizer/cos_polynomial_true-unreach-call.c_9.smt2 
sat
user@ccbb42e224b5:~$ jfs/build/bin/jfs-smt2cxx /out/20170501-Heizmann-UltimateAutomizer/cos_polynomial_true-unreach-call.c_9.smt2 
unsupported kind
UNREACHABLE executed at /home/user/jfs/src/lib/Core/Z3ASTVisitor.cpp:237!
Aborted (core dumped)

I'll try to look into this more when I have some time but thought I'd file the issue in case it was instantly obvious what was going wrong.

cos_polynomial_true-unreach-call.c_9.txt

@delcypher
Copy link
Collaborator

The jfs-smt2cxx tool doesn't run any simplifications passes over the constraints. jfs does run simplifications passes so its likely the simplification passes remove the expression that is causing the crash. To work around this you can use the jfs-opt tool to run the simplification passes that jfs normally runs and then pass the output to jfs-smt2cxx.

It would be useful to know which expression is causing the crash though because ideally we don't want jfs-smt2cxx to crash like this.

@delcypher delcypher added the bug label Dec 7, 2020
@moyix
Copy link
Author

moyix commented Dec 7, 2020

Aha, that does explain it. After diffing the output of jfs-opt and jfs-opt -standard-passes, the culprit seems to be this line:

((_ to_fp 11 53) roundNearestTiesToEven (/ 1.0 2.0))

which gets simplified to

(fp #b0 #b01111111110 #x0000000000000)

@delcypher
Copy link
Collaborator

It's most likely the (/ 1.0 2.0) that's causing the problem. The type (sort in SMT-LIB parlance) there looks like a real number (not supported by JFS) rather than a floating-point number.

moyix added a commit to moyix/fpsmt_gpu that referenced this issue Dec 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants