3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-27 10:55:50 +00:00
Commit graph

807 commits

Author SHA1 Message Date
Nikolaj Bjorner
7c177584f3 add propagators to grobner 2022-07-14 15:45:07 -07:00
Nikolaj Bjorner
981c82c814 fix initialization order 2022-07-13 18:11:18 -07:00
Nikolaj Bjorner
894fb836e2 fix build break (debug assertion) and isolate gomory functionality
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-07-13 17:26:56 -07:00
Nikolaj Bjorner
b81f70f6fc split nla_grobner to separate file 2022-07-13 13:05:57 -07:00
Nikolaj Bjorner
8900db527f add diagnostics for grobner 2022-07-12 20:49:54 -07:00
Nikolaj Bjorner
316ed778e0 Tune Grobner equations
\brief convert p == 0 into a solved form v == r, such that
   v has bounds [lo, oo) iff r has bounds [lo', oo)
   v has bounds (oo,hi]  iff r has bounds (oo,hi']

   The solved form allows the Grobner solver identify more bounds conflicts.
   A bad leading term can miss bounds conflicts.
   For example for x + y + z == 0 where x, y : [0, oo) and z : (oo,0]
   we prefer to solve z == -x - y instead of x == -z - y
   because the solution -z - y has neither an upper, nor a lower bound.

The Grobner solver is augmented with a notion of a substitution that is applied before the solver is run.
2022-07-11 16:14:26 -07:00
Nikolaj Bjorner
b68af0c1e5 working on reconciling perf for arithmetic solvers
this update integrates inferences to smt.arith.solver=6 related to grobner basis computation and handling of div/mod axioms to reconcile performance with smt.arith.solver=2.

The default of smt.arth.nl.grobner_subs_fixed is changed to 1 to make comparison with solver=2 more direct.

The selection of cluster equalities for solver=6 was reconciled with how it is done for solver=2.
2022-07-11 07:38:51 -07:00
Nuno Lopes
73a24ca0a9 remove '#include <iostream>' from headers and from unneeded places
It's harmful to have iostream everywhere as it injects functions in the compiled files
2022-06-17 14:10:19 +01:00
Nikolaj Bjorner
3d00d1d56b prepare for equality propagation from Grobner basis
Attempt to remedy performance regressions from the new solver core for NLA. It misses easy lemmas, presumably due to weaker bounds information.
2022-06-14 09:51:07 -07:00
Nikolaj Bjorner
b629960afb proof format
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-06-06 07:18:33 -07:00
Nikolaj Bjorner
da3f31697b fix proof checking for bounds propagation 2022-05-30 10:18:16 -07:00
Nikolaj Bjorner
4b495e4b96 nits 2022-04-02 17:50:45 -07:00
Nikolaj Bjorner
6d836e7e2f expose model update 2022-03-19 09:23:08 -07:00
Nikolaj Bjorner
b69ad786f2 na
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2021-12-08 09:04:13 -08:00
Nikolaj Bjorner
e45ae32685 unsound equality propagation #5676
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2021-12-08 09:02:05 -08:00
Lev Nachmanson
7758b519bc
Handle correctly cancelled run (#5695)
* remove the bound on total iterations in simplex

Signed-off-by: Lev Nachmanson <levnach@hotmail.com>

* remove unncesseray checks in  get_freedom_interval_for_column()

Signed-off-by: Lev Nachmanson <levnach@hotmail.com>

* fix the build of test-z3

Signed-off-by: Lev Nachmanson <levnach@hotmail.com>

* Revert "remove unncesseray checks in  get_freedom_interval_for_column()"

This reverts commit 6770ed85e3.

* optimize get_freedom_interval_for_column() for feasible case

Signed-off-by: Lev Nachmanson <levnach@hotmail.com>

* add function lar_solver::status_feasible

Signed-off-by: Lev Nachmanson <levnach@hotmail.com>

* rename status_is_feasible() to is_feasible()

Signed-off-by: Lev Nachmanson <levnach@hotmail.com>

* fix the linux build

Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
2021-12-05 18:38:37 -08:00
Nikolaj Bjorner
1618c970df adding checks
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2021-12-03 13:17:48 -08:00
Nikolaj Bjorner
970347e797 infeas
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2021-12-03 13:00:52 -08:00
Lev Nachmanson
d50c4bfcc1 remove an unused var
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
2021-11-28 09:44:50 -08:00
Nikolaj Bjorner
3c16edc8d3 check for v1 == v2
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2021-11-12 09:11:17 -08:00
Nikolaj Bjorner
63ac2ee0d1 #5614 turn on / off options to get better performance.
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2021-11-11 17:54:46 -08:00
Nikolaj Bjorner
87d4ce2659 working on #5614
there are some different sources for the performance regression illustrated by the example. The mitigations will be enabled separately:
- m_bv_to_propagate is too expensive
- lp_bound_propagator misses equalities in two different ways:
   - it resets row checks after backtracking even though they could still propagate
   - it misses equalities for fixed rows when the fixed constant value does not correspond to a fixed variable.

FYI @levnach
2021-11-02 14:55:39 -07:00
Henrich Lauko
96671cfc73
Add and fix a few general compiler warnings. (#5628)
* rewriter: fix unused variable warnings

* cmake: make missing non-virtual dtors error

* treewide: add missing virtual destructors

* cmake: add a few more checks

* api: add missing virtual destructor to user_propagator_base

* examples: compile cpp example with compiler warnings

* model: fix unused variable warnings

* rewriter: fix logical-op-parentheses warnings

* sat: fix unused variable warnings

* smt: fix unused variable warnings
2021-10-29 15:42:32 +02:00
Nikolaj Bjorner
2e96557827 fix #5560 - add a throttle on maximal size of bignums created for propagate-value lemmas
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2021-09-21 08:55:28 -07:00
Nikolaj Bjorner
72f6271d82 #5532
bugs in:
- rewriting of 0-ary expressions was incomplete
- sharing annotations when a node has two theories attached it is shared
- sharing of const of an array

Remove unreadable part of pretty printer for lp solver.
2021-09-06 19:14:03 +02:00
Nikolaj Bjorner
55daa2424c fix #5362 2021-06-22 12:26:27 -07:00
Lev Nachmanson
3a5b88e52b set status to CANCELLED on the total_iterations threshold bailout
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
2021-06-07 07:34:16 -07:00
Nikolaj Bjorner
5da4b29136 turn on parity test 2021-06-04 10:18:24 -07:00
Nikolaj Bjorner
0182187296 fix regression in arithmetic resource bound
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2021-06-03 11:41:42 -07:00
Nikolaj Bjorner
8a02167e30 get-universe
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2021-06-01 21:08:08 -07:00
Nikolaj Bjorner
3e773fba5e get-universe
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2021-06-01 21:07:48 -07:00
Nikolaj Bjorner
6a5cdd48e7 na
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2021-06-01 20:43:45 -07:00
Nikolaj Bjorner
ab3b387076 na
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2021-06-01 20:37:43 -07:00
Nikolaj Bjorner
45adfc6a66 na
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2021-06-01 20:31:05 -07:00
Nikolaj Bjorner
0e6d530518 std::cout
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2021-06-01 18:49:37 -07:00
Nikolaj Bjorner
2156c74d51 #4702
initial gcd test implementation for accumulated parity constraints
2021-06-01 15:26:36 -07:00
Nikolaj Bjorner
5127014f18 track cuts 2021-06-01 15:26:36 -07:00
Nuno Lopes
f1e0d5dc8a remove a hundred implicit constructors/destructors 2021-05-23 14:25:01 +01:00
Nikolaj Bjorner
8ba0fb5b58 rounding mode sort removed for incompatibility
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2021-05-21 16:18:43 -07:00
Nikolaj Bjorner
00deb12238 signed
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2021-05-21 15:51:27 -07:00
Nikolaj Bjorner
ec034679ce #5215
memory leaks
2021-05-19 12:42:38 -07:00
Lev Nachmanson
179988e161
support recursive terms (#5246)
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
2021-05-05 12:53:20 -07:00
Nikolaj Bjorner
0c6722f48b na
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2021-05-03 11:47:00 -07:00
Nikolaj Bjorner
60cf482cea fix #5239
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2021-05-03 11:44:44 -07:00
Nikolaj Bjorner
51a4db862a #5223 2021-05-02 10:40:22 -07:00
Nikolaj Bjorner
0810720267 #5223 2021-05-02 10:30:35 -07:00
Nikolaj Bjorner
d67919373e add bailout option for code review #5208
@levnach
Could you review and maybe make this much more streamlined?
The patch is to simply bail out the iterator if it fails to find canonical monics.
If m_ff could produce the existing canonical monics up front this kind of bail-out could maybe avoided.
2021-04-22 11:30:11 -07:00
Nikolaj Bjorner
4a6083836a call it data instead of c_ptr for approaching C++11 std::vector convention. 2021-04-13 18:17:35 -07:00
Lev Nachmanson
1a7c9fa54d rename a metod 2021-04-10 08:54:52 -07:00
Lev Nachmanson
6a1fd3b4d6 simplify the check for polarity, remove the struct with vertex and polarity
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
2021-04-10 08:54:52 -07:00