3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-12 12:08:18 +00:00
Commit graph

174 commits

Author SHA1 Message Date
Lev Nachmanson c1ece49694 track changed columns in dio\
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
2025-02-11 12:23:00 -10:00
Lev Nachmanson 008e9229a5 use std_vector more and getting NOT_IMPLEMENTING in C:\dev\z3\src\math\lp\dioph_eq.cpp
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
2025-02-11 12:23:00 -10:00
Lev Nachmanson 862dc91cb2 work on incremental dio
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
2025-02-11 12:23:00 -10:00
Lev Nachmanson 30f5599064 use fixed vars to explain tightening
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
2025-02-11 12:23:00 -10:00
Lev Nachmanson 36293ac773 test that pivoting is correct in dioph_eq.cpp 2025-02-11 12:23:00 -10:00
Lev Nachmanson 5db46c1d81 use u_dependency in eprime_pair
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
2025-02-11 12:23:00 -10:00
Lev Nachmanson 59e2dab69a create a conflict explanation
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
2025-02-11 12:23:00 -10:00
Lev Nachmanson 52653e6e43 a version with less pointers: got a conflict
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
2025-02-11 12:23:00 -10:00
Nikolaj Bjorner 270c127407 sketch fixed variable callback mechanism 2025-01-08 12:50:46 -08:00
Nikolaj Bjorner 87f7a20e14 Add (updated and general) solve_for functionality for arithmetic, add congruence_explain to API to retrieve explanation for why two terms are congruent Tweak handling of smt.qi.max_instantations
Add API solve_for(vars).
It takes a list of variables and returns a triangular solved form for the variables.
Currently for arithmetic. The solved form is a list with elements of the form (var, term, guard).
Variables solved in the tail of the list do not occur before in the list.
For example it can return a solution [(x, z, True), (y, x + z, True)] because first x was solved to be z,
then y was solved to be x + z which is the same as 2z.

Add congruent_explain that retuns an explanation for congruent terms.
Terms congruent in the final state after calling SimpleSolver().check() can be queried for
an explanation, i.e., a list of literals that collectively entail the equality under congruence closure.
The literals are asserted in the final state of search.

Adjust smt_context cancellation for the smt.qi.max_instantiations parameter.
It gets checked when qi-queue elements are consumed.
Prior it was checked on insertion time, which didn't allow for processing as many
instantations as there were in the queue. Moreover, it would not cancel the solver.
So it would keep adding instantations to the queue when it was full / depleted the
configuration limit.
2024-12-19 23:27:57 +01:00
Nikolaj Bjorner 05e053247d add facility to solve for a linear term over API 2024-11-30 09:34:27 -08:00
Nikolaj Bjorner 48712b4f60 Add initial value setting for variables in Z3 API, solver, and optimize modules 2024-09-18 16:13:15 +03:00
Nikolaj Bjorner 974ea7b68d maintain ownership of dependency 2024-04-10 17:57:14 -07:00
Nikolaj Bjorner 361e04a18e port fixes to intblast
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2024-03-09 10:27:12 -08:00
Nikolaj Bjorner bdb9106f99
Api (#7097)
* rename ul_pair to column

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

* t

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

* simple test passed

* remove an assert

* relax an assertion

* remove an obsolete function

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

* access a term by the term column

* remove the column index from colunm.h

* remove an unused method

* remove debug code

* fix the build of lp_tst

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

---------

Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
Co-authored-by: Lev Nachmanson <levnach@hotmail.com>
2024-01-24 16:05:18 -08:00
Lev Nachmanson d084a19630 take care of strategy undecided, Nikolaj's comments
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
2024-01-17 14:17:07 -10:00
Lev Nachmanson 2ac866a8d0 take the coefficient from cut_result, not lia
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
2024-01-11 12:10:37 -10:00
Lev Nachmanson fc23a498c4 a simple version of choosing a column for gomory cut 2023-12-04 15:06:50 -10:00
Nikolaj Bjorner 9f0b3cdc25 Add utility to expand sub-terms 2023-11-07 19:58:32 +01:00
Lev Nachmanson ca6cb0af95 add changes in lp with validate_bound and maximize_term
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
2023-11-02 09:59:03 -07:00
Nikolaj Bjorner 47f1c86f93 fix regression
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-10-14 02:38:49 -07:00
Nikolaj Bjorner 08af965b56 updates to monomial bounds 2023-10-14 01:33:05 -07:00
Nikolaj Bjorner 1bdf66b918 move initialization to header file 2023-10-09 10:55:43 +09:00
Lev Nachmanson f847d039bc use the simple version of move_non_basic_column_to_bounds 2023-10-05 20:57:54 -07:00
Lev Nachmanson 45c0ed126e remove unnecessery call
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
2023-10-04 17:39:22 -07:00
Lev Nachmanson edd1761ff3 restore the scheme of m_columns_with_changed_bounds
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
2023-10-04 11:06:24 -07:00
Lev Nachmanson a88aa7ffa5 debug new propagation scheme
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
2023-10-03 16:25:49 -07:00
Lev Nachmanson a297a2b25c fixes in lar_solver around nl unit propagation
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
2023-10-01 11:39:58 -07:00
Lev Nachmanson b64fdef41f better tracking changinc rows and monomials 2023-09-29 15:27:22 -07:00
Nikolaj Bjorner 615aad7779 get rid of int*, use lambda scoping
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-09-20 15:18:37 -07:00
Lev Nachmanson 77e56b0a69 debug 2023-09-16 13:54:14 -07:00
Lev Nachmanson b3673d491e fix the build for gcc 2023-09-14 19:20:47 -07:00
Lev Nachmanson cbad61ba2e propagate monics with lp_bound_propagator 2023-09-13 14:27:34 -07:00
Lev Nachmanson c309d52283 runs a simple test 2023-09-13 08:12:00 -07:00
Lev Nachmanson c050af922f fixing the bugs 2023-09-07 15:59:20 -07:00
Lev Nachmanson c43b99daae renaming
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
2023-09-07 11:57:20 -07:00
Lev Nachmanson 288e66de59 restore m_crossed* and create lemmas
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
2023-09-06 09:27:30 -07:00
Lev Nachmanson 41f59cb1ed propagate monomial is nla 2023-09-05 18:49:59 -07:00
Nikolaj Bjorner 38b131386d add stubs for monomial unit propagation 2023-08-30 17:21:48 -07:00
Nikolaj Bjorner 5e3df9ee77
Arith min max (#6864)
* prepare for dependencies

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>

* snapshot

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>

* more refactoring

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>

* more refactoring

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>

* build

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>

* pass in u_dependency_manager

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>

* address NYIs

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>

* more refactoring names

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>

* eq_explanation update

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>

* add outline of bounds improvement functionality

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>

* fix unit tests

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>

* remove unused structs

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>

* more bounds

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>

* more bounds

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>

* convert more internals to use u_dependency instead of constraint_index

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>

* convert more internals to use u_dependency instead of constraint_index

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>

* remember to push/pop scopes

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>

* use the main function for updating bounds

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>

* na

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>

* na

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>

* remove reset of shared dep manager

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>

* disable improve-bounds, add statistics

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>

---------

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-08-19 17:44:09 -07:00
Nikolaj Bjorner 6366f8f6b2 na
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-08-13 14:05:07 -07:00
Lev Nachmanson 858eebca82 more efficient column_is_fixed 2023-08-07 14:55:13 -10:00
Lev Nachmanson 0fbf8f92f5 delete remove_fixed_vars_from_base() from
int_solver
2023-08-07 14:55:13 -10:00
Lev Nachmanson 0c98c755ba new equality propagation scheme, etc 2023-08-07 14:55:13 -10:00
Lev Nachmanson f58b703ac5
u_set replaced by indexed_uint_set (#6841)
* replace u_set by indexed_uint_set

* replace u_set by indexed_uint_set

* create insert-fresh and insert for indexed_uint_set to make use cases with non-fresh inserts easier

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>

* update nightly to pull arm

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>

* update nightly to pull arm

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>

* fixing the build of lp_tst

* update nightly to pull arm

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>

* replace u_set by indexed_uint_set

* replace u_set by indexed_uint_set

* fixing the build of lp_tst

* remove unnecessery call to contains() before
insert to indexed_uint_set

* formatting, no check for contains()
 in indexed_uint_set, always init m_touched_rows to nullptr

---------

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
Co-authored-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-08-03 16:01:27 -07:00
Lev Nachmanson fd5902f76e relax an assertion in int_solver::patcher 2023-07-16 11:55:42 -10:00
Lev Nachmanson 401ec04ec3
code cleaning around m_touched_rows of lar_solver (#6814) 2023-07-14 20:19:13 -07:00
Lev Nachmanson e091a2e775 remove the line with clang-format off 2023-07-10 12:05:59 -07:00
Lev Nachmanson 0fceb80e0f edit tracing, add lar_solver::column_is_feasible() 2023-07-07 11:48:21 -07:00
Lev Nachmanson ff875c936f add TRACE stmts, more efficient remove from inf_heap
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
2023-07-06 16:45:22 -07:00