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

regression with arith.solver=6 #7502

Open
mtzguido opened this issue Jan 6, 2025 · 3 comments
Open

regression with arith.solver=6 #7502

mtzguido opened this issue Jan 6, 2025 · 3 comments
Assignees

Comments

@mtzguido
Copy link
Contributor

mtzguido commented Jan 6, 2025

Hi, we found this failure while upgrading F* projects, specifically HACL* to Z3 4.13.3. Some files were taking considerably longer times when compared to Z3 4.8.5 (>1 hour from just a minute or two), and failing instead of succeeding.

Here's one somewhat distilled example (still running ddsmt to minimize further). hacl-min.smt2.txt

I bisected the issue but I don't think it's very useful. It points to 28c827f:

# first bad commit: [28c827fb69b3de2449044dedf62233c09e658ee1] fix #2919

Specifically it seems to be this chunk of it
28c827f#diff-1e1c1b4bddfd09f68a39e64cf5fcda0bb3bec7306f9c8548fa2a081e5afab4f8L840-R840

-            if (st.m_num_non_linear != 0 && st.m_has_int) 
-                m_context.register_plugin(alloc(smt::theory_mi_arith, m_manager, m_params));
-            else 
-                setup_lra_arith();
+            setup_lra_arith();

which I think is just making sure that solver=6 is respected.

(Also, even if Z3 fails here, it seems to take a really long time for the rlimit we give it, so I suspect there's also an rlimit leak here somewhere. Or the units are very different between solver 2 and 6.)

Some more context: hacl-star/hacl-star#1014

@levnach
Copy link
Contributor

levnach commented Jan 7, 2025

Here some first observations. In the current master the long run does not happen but instead I get an "unknown". It seems it is extremely rare occurrence as well.
Running the master release for random seeds 0-10000 the timeout of 20 seconds produced 10001 unsats very fast. I will try to figure out the origin of "unknown"

@mtzguido
Copy link
Contributor Author

mtzguido commented Jan 7, 2025

Smaller version: full_min.smt2.txt (ddsmt still churning)
Ah, nevermind, ddsmt reduced the rlimit and this does not really show the same problem.

@mtzguido
Copy link
Contributor Author

mtzguido commented Jan 8, 2025

I'm not sure how helpful this is, but here's a smaller file that runs much slower with solver 6 than 2... but only with few seeds (e.g. 0), and it does say unsat eventually.
hacl-min-try4.smt2.txt

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

3 participants