3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-24 17:45:32 +00:00
Commit graph

1241 commits

Author SHA1 Message Date
Nikolaj Bjorner
ff265235c1 adjust trace output 2022-06-29 08:20:01 -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
35986f3979 fix #6084
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-06-07 11:29:57 -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
35db0ae58b workaround manylinux build failure (it is advertized as a compiler bug)
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-05-28 14:34:58 -07:00
Nikolaj Bjorner
186a3c58e5 merge
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-05-15 12:00:25 -07:00
Arie Gurfinkel
7f62fa2b66
Sparse matrix kernel (#6035)
* Subtle bug in kernel computation

Coefficient was being passed by reference and, therefore, was
being changed indirectly.

In the process, updated the code to be more generic to avoid rational
computation in the middle of matrix manipulation.

* sparse_matrix: fixed handling of 0 in add_var() and add()

particularly in add_var(), without the fix the user is responsible for checking
coefficients for 0.
2022-05-13 17:30:35 -07:00
Nikolaj Bjorner
6deb4dee37 disable normalize
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-05-11 13:30:50 -07:00
Nikolaj Bjorner
5aec9b32bd check zero
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-05-11 10:13:07 -07:00
Nikolaj Bjorner
860d904699 check zero
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-05-11 10:11:17 -07:00
Nikolaj Bjorner
361155685c ensure abs
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-05-11 09:09:00 -07:00
Nikolaj Bjorner
cbaa16df57 lcm normalization
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-05-11 09:03:57 -07:00
Nikolaj Bjorner
5ca3bc3212 kernel
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-05-10 15:48:06 -07:00
Nikolaj Bjorner
2928cc261c fix
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-05-10 13:17:25 -07:00
Nikolaj Bjorner
805443c8ab wip
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-05-10 11:17:34 -07:00
Nikolaj Bjorner
0557d72d1c na
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-05-10 07:42:32 -07:00
Nikolaj Bjorner
6a8ac5f9b1 adding K
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-05-09 16:47:26 -07:00
Nikolaj Bjorner
ad2445e423 gauss jordan
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-05-09 16:33:15 -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
Jan Vraný
bdf7de1703
Care for root index being undefine while calling Z3_algebraic_get_i() (#5888)
In some cases, Z3_algebraic_get_i() returned 0. For example, in the following
Python snippet, the last assert would fail:

    import z3
    x = z3.Real('x')
    s = z3.Solver()
    s.add( (x * x) - 2 == 0, x <= 0)
    s.check()
    val_x = s.model().get_interp(x)
    assert val_x.index() == 1

The problem was that `algebraic_numbers::manager:👿:get_i()` did not
check whether the root index was properly initialized.

This commit fixes this issue by checking whether root index is initialized
the same way various other routines do.

Fixes issue #5807.

Signed-off-by: Jan Vrany <jan.vrany@labware.com>
2022-03-16 19:28:03 -07:00
Nikolaj Bjorner
b1ff4bc24a no normalize
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-01-20 19:21:19 +01:00
Nikolaj Bjorner
75a81af426 fix #5786
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-01-20 19:18:23 +01:00
Nikolaj Bjorner
fc77345bec breaking change. Enforce append semantics everywhere for parameter updates #5744
Replace semantics doesn't work with assumptions made elsewhere in code.
The remedy is to apply append (override) semantics for parameter changes.
2021-12-30 19:11:14 -08: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
Nikolaj Bjorner
9f2b18cac5 add tactic name
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2021-12-07 13:37:57 -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
3036b88f09 support threading for TRACE mode 2021-10-25 13:35:32 +02:00
Nikolaj Bjorner
d174f87c5e #5532 2021-09-21 20:21:23 -07: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
da60abd84b #5445 2021-08-03 11:19:42 -07:00
Nikolaj Bjorner
202ed79a24 #5445 2021-08-03 11:17:23 -07:00
Nikolaj Bjorner
a4cc9e7895 #5429 #5445 2021-08-01 12:49:36 -07:00
Nikolaj Bjorner
16413b4f9a #5429 2021-07-27 17:18:22 -07:00
Nikolaj Bjorner
005d35f9c9 #5422 2021-07-21 07:39:39 -07:00
Nikolaj Bjorner
ca8f914dd8 #5422 2021-07-21 07:22:05 -07:00
Nikolaj Bjorner
b0a22105d6 na 2021-07-19 13:28:20 -07:00
Nikolaj Bjorner
188a478214 #5417
strict inequality (over reals) require solving for least-upper/greatest-lower bounds that may coincide with non-strict inequalities (be epsilon stronger). Instead of using the coefficient 'a' to turn the inequality into an equality, add the slack value as a constant.
2021-07-19 13:19:03 -07:00
Nikolaj Bjorner
cab1076514 #5336 2021-07-11 21:00:58 +02:00