Lev Nachmanson
b621c9fa1c
remove an extrac check in bound_is_interesting
2023-09-15 17:42:18 -07:00
Lev Nachmanson
4cfba9787b
debug lp_bound_propagator
2023-09-15 17:41:10 -07:00
Lev Nachmanson
762ade2a79
check m_unassigned_bounds in bound_is_interesting
2023-09-15 06:15:22 -07:00
Lev Nachmanson
a55aa1a648
add a comment
2023-09-14 19:29:48 -07:00
Lev Nachmanson
b3673d491e
fix the build for gcc
2023-09-14 19:20:47 -07:00
Nikolaj Bjorner
b87a91379c
fix #6894
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-09-14 17:14:14 -07:00
Nikolaj Bjorner
50d76a2fe3
fix #6894
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-09-14 17:14:14 -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
47b64e689c
restore the lemma scheme
...
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
2023-09-07 11:33:14 -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
4d9af7848d
add parameter to disable pattern inference #6884
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-09-03 15:27:37 -07:00
Nikolaj Bjorner
99239068ba
some template instantiations #6869
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-09-03 15:21:49 -07:00
Nikolaj Bjorner
c2e73a6aae
logging pre-processing
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-09-03 15:19:31 -07:00
Lev Nachmanson
318d7d7564
fixes a bug
2023-09-01 11:32:26 -07:00
Lev Nachmanson
d3258e7084
propagate lineal monomial
2023-09-01 11:18:03 -07:00
Lev Nachmanson
5509b468e9
handle monomial_bounds::unit_propagate()
2023-08-31 17:35:41 -07:00
Nikolaj Bjorner
ff3268e636
move unit propagation into monomial_bounds
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-08-31 14:32:05 -07:00
Nikolaj Bjorner
c2cbe72b64
sketch linear monomial propagation
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-08-31 11:49:05 -07:00
Nikolaj Bjorner
38b131386d
add stubs for monomial unit propagation
2023-08-30 17:21:48 -07:00
Nuno Lopes
00593609c5
minor code simplification
2023-08-30 12:50:29 +01:00
Nikolaj Bjorner
09f911d8a8
include rewriter for recursive functions in model-evaluator
...
fixes bug reported by Tahina and Nick, @tahina-pro
2023-08-28 11:31:40 -07:00
Hari Govind V K
5ba06f4e28
print deq in lits2pure. fix #6877 ( #6878 )
2023-08-26 20:53:15 -07:00
Nikolaj Bjorner
63467f9dfa
fix #6876
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-08-25 17:14:35 -07:00
Nikolaj Bjorner
e8929041b8
fixing calls, signs
2023-08-22 09:29:12 -07:00
Nikolaj Bjorner
818b1129a5
fix regression in sign of literals from new solver
2023-08-22 09:04:08 -07:00
Lev Nachmanson
61a7c6b28d
init m_literal_vec
...
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
2023-08-21 17:11:55 -07:00
Lev Nachmanson
9aeaed8f53
Merge branch 'master' into nl_branches
2023-08-21 16:15:20 -07:00
Nikolaj Bjorner
1d9e0feb84
Merge branch 'master' of https://github.com/z3prover/z3
2023-08-21 09:19:16 -07:00
Nikolaj Bjorner
79aa317af4
remove if-def inside cpp file that should not be there #6869
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-08-21 09:19:06 -07:00
Hari Govind V K
b8d8553c41
support or, and, implies, distinct in mbp_basic ( #6867 )
2023-08-20 15:36:22 -07:00
Nikolaj Bjorner
37ddaaef69
make destructors virtual
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-08-20 15:30:57 -07:00
Nuno Lopes
dda0c8ff42
array theory: use expr_ref for mk_default() so it doesnt leak if internalize throws
...
like on timeout/memout
2023-08-20 22:28:57 +01:00
Lev Nachmanson
9b672bc5cc
remove tracking of bounds
2023-08-20 10:10:48 -07:00
Nuno Lopes
57c667e355
remove unused code
2023-08-20 15:16:47 +01:00
Nuno Lopes
a694d27557
revert removal of virtual destructor of relevancy_eh since clang doesnt play along
2023-08-20 14:20:20 +01:00
Nuno Lopes
8210aafb69
ast compare_nodes: fail faster when comparing quantifier expressions
2023-08-20 14:09:04 +01:00
Nuno Lopes
c469c6e1d5
attempt to fix clang buildbots
2023-08-20 13:39:15 +01:00
Nuno Lopes
28884b398c
remove unneeded virtual destructor (optimization)
2023-08-20 12:57:47 +01:00
Nuno Lopes
3b546b2348
smt_context: we can't assert that the resource limits were exceeded on cancel_exception
...
It happens sometimes that e.g. the internalizer goes above the soft memory limit
But since it's only by a small amount, when the exception propagates back to the context, some stuff
has been freed already and we are not longer above the memory threshold
Just delete these asserts
2023-08-20 10:34:28 +01:00
Nuno Lopes
5d33805c8b
optimize ~relevancy_propagator_imp() so it just dec refs the exprs in the trail
...
It avoid doing all the funky watch stuff
One extreme Alive2 test case goes from 40s to 28s :)
2023-08-20 10:07:56 +01: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
c3b344ec47
fix #6865
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-08-18 16:51:58 -07:00
Lev Nachmanson
610313946d
split free vars in nla
2023-08-18 12:36:14 -07:00
Nikolaj Bjorner
59b56f2ce7
update unit test to be compatible with C++ vs C exception semantics #6537
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-08-17 19:13:50 -07:00
Nikolaj Bjorner
73724f9cab
lines that go away
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-08-17 18:45:49 -07:00
Lev Nachmanson
252a30e727
use param_ref in nla_solver ( #6862 )
...
* use param_ref in nla_solver
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
* add parameters
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
* add parameters
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
* replace nla_setting by command line parameters
* delete nla_setting.h
---------
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
Co-authored-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-08-17 18:44:27 -07:00
Nikolaj Bjorner
63ea8efcfb
remove output
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-08-17 15:20:12 -07:00
Nikolaj Bjorner
2dbf9bcab2
Merge branch 'master' of https://github.com/z3prover/z3
2023-08-17 15:18:36 -07:00
Nikolaj Bjorner
51df7b75ce
fix 6800
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-08-17 15:18:22 -07:00
Hari Govind V K
1be692002d
split on all ite terms. fix #6852 ( #6859 )
2023-08-16 10:07:30 -07:00
Nikolaj Bjorner
b04e48f374
fix #6850
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-08-13 15:06:39 -07:00
Nikolaj Bjorner
33c35b0c31
fix #6851
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-08-13 14:49:25 -07:00
Nikolaj Bjorner
6366f8f6b2
na
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-08-13 14:05:07 -07:00
Nikolaj Bjorner
9804ba9fd2
Merge branch 'master' of https://github.com/z3prover/z3
2023-08-12 20:34:21 -07:00
Nikolaj Bjorner
41cac5f69e
remove output
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-08-12 20:34:15 -07:00
Lev Nachmanson
eb817f779d
small change in factor to support TRACE
2023-08-11 12:04:08 -10:00
Lev Nachmanson
a932e596eb
add a constructor from a variable to factor
2023-08-10 08:34:53 -10:00
Nikolaj Bjorner
a6ab0a7d49
formatting hygiene
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-08-08 13:50:49 -07:00
Lev Nachmanson
a7966dc436
remove an assert
2023-08-07 14:55:13 -10: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
Nikolaj Bjorner
c3a373e225
format
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-08-07 14:55:13 -10:00
Lev Nachmanson
0c98c755ba
new equality propagation scheme, etc
2023-08-07 14:55:13 -10:00
Nikolaj Bjorner
125787c458
remove dead code
2023-08-07 11:22:34 -07:00
Hari Govind V K
dd0b0b47b8
fix #5925 ( #6846 )
2023-08-04 15:18:16 -07:00
Nikolaj Bjorner
84520d53ea
remove out
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-08-04 11:33:39 -07:00
Nikolaj Bjorner
b0055df4ab
revert arithmetic final check to original order
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-08-04 10:48:44 -07: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
Nikolaj Bjorner
4637339091
update model validate to include arithmetic
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-08-03 15:51:29 -07:00
Nikolaj Bjorner
7b36563196
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>
2023-08-03 09:48:07 -07:00
Nikolaj Bjorner
5b287bff09
nits
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-08-02 16:59:59 -07:00
Nikolaj Bjorner
09dd7688ce
fix build
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-08-02 11:19:41 -07:00
Nikolaj Bjorner
9b5727adde
enable arm for non-osx
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-08-02 10:51:52 -07:00
Nikolaj Bjorner
606940e60c
nits
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-08-02 10:29:48 -07:00
Arie Gurfinkel
51d3c279d0
QEL: Fast Approximated Quantifier Elimination ( #6820 )
...
* qe_lite: cleanup and comment
no change to code
* mbp_arrays: refactor out partial equality (peq)
Partial array equality, PEQ, is used as an intermediate
expression during MBP for arrays. We need to factor it out
so that it can be shared between MBP-QEL and existing MBP.
Partial array equality (peq) is used in MBP for arrays.
Factoring this out to be used by multiple MBP implementations.
* rewriter: new rewrite rules
These rules are specializes for terms that are created in QEL.
QEL commit is comming later
* datatype_rw: new rewrite rule for ADTs
The rule handles this special case:
(cons (head x) (tail x)) --> x
* array_rewriter rules for rewriting PEQs
Special rules to simplify PEQs
* th_rewriter: wire PEQ simplifications
* spacer_iuc: avoid terms with default in IUC
Spacer prfers to not have a term representing default value of an array.
This guides IUC from picking such terms in interpolation
* mbp_term_graph: replace root with repr
* mbp_term_graph: formatting
* mbp_term_graph: class_props, getters, setters
Class properties allow to keep information for an equivalence class.
Getters and setters for terms allow accessing information
* mbp_term_graph: auxiliary methods for qel
QEL commit is comming later in the history
* mbp_term_graph: bug fix
* mbp_term_graph: pick, refine repr, compute cgrnd
* mbp_term_graph: internalize deq
* mbp_term_graph: constructor
* mbp_term_graph: optionally internalize equalities
Reperesent equalities explicitly by nodes in the term_graph
* qel
* formatting
* comments on term_lt
* get terms and other api for mbp_qel
* plugins for mbp_qel
* mbp_qel_util: utilities for mbp_qel
* qe_mbp: QEL-based mbp
* qel: expose QEL API
* spacer: replace qe_lite in qe_project_spacer by qel
This changes the default projection engine that spacer uses.
* cmd_context: debug commands for qel and mbp_qel
New commands are
mbp-qel -- MBP with term graphs
qel -- QEL with term graphs
qe-lite -- older qelite
* qe_mbp: model-based rewriters for arrays
* qe_mbp: QEL-based projection functions
* qsat: wire in QEL-based mbp
* qsat: debug code
* qsat: maybe a bug fix
Changed the code to follow the paper by adding all predicates above a given
level, not just predicates of immediately preceding level.
* chore: use new api to create solver in qsat
* mbp_term_graph use all_of idiom
* feat: solver for integer multiplication
* array_peq: formatting, no change to code
* mbp_qel_util: block comment + format
* mbt_term_graph: clang-format
* bug fix. Move dt rewrite to qe_mbp
* array_peq: add header
* run clang format on mbp plugins
* clang format on mul solver
* format do-while
* format
* format do-while
* update release notes
---------
Co-authored-by: hgvk94 <hgvk94@gmail.com>
Co-authored-by: Isabel Garcia <igarciac@uwaterloo.ca>
2023-08-02 09:34:06 -07:00
Nikolaj Bjorner
5b2519d7a3
#6523
...
attach original variable to pb expression.
2023-08-01 08:41:26 -07:00
Nikolaj Bjorner
adad468cd7
allow copy within a user scope #6827
...
this will allow copying the solver state within a scope.
The new solver state has its state at level 0. It is not possible to pop scopes from the new solver (you can still pop scopes from the original solver). The reason for this semantics is the relative difficulty of implementing (getting it right) of a state copy that preserves scopes.
2023-07-31 19:46:08 -07:00
Nikolaj Bjorner
403340498c
format
2023-07-31 19:41:11 -07:00
Nikolaj Bjorner
0606ca15d9
track lia conflicts as cuts
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-07-28 17:40:56 -07:00
Nikolaj Bjorner
de1cf30ea8
strengthen Tseitin checker to take true/false constants into account
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-07-28 16:54:33 -07:00
Nikolaj Bjorner
7135283135
update format and checker for implied-eq
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-07-27 13:23:17 -07:00
Nikolaj Bjorner
f0184c3fde
update format and checker for implied-eq
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-07-27 13:21:45 -07:00
Nikolaj Bjorner
249f0de80b
fix order for inequalities in arithmetic justifications such that implied bound literal is last. The self-checker uses this property to identify the implied bound
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-07-26 10:06:41 -07:00
Nikolaj Bjorner
c6aab89662
add rewrite for partially interpreted arithmetic functions
2023-07-25 14:57:27 -07:00
Nikolaj Bjorner
0f2fe6031a
patching up trim
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-07-25 11:32:20 -07:00
Nikolaj Bjorner
6da4f6815e
Merge branch 'master' of https://github.com/z3prover/z3
2023-07-25 09:47:09 -07:00
Nikolaj Bjorner
423a7b6888
also add separate cut rule
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-07-25 09:46:59 -07:00
Nikolaj Bjorner
68a437e615
revert to logging conflict to get EUF trim to work
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-07-25 09:45:35 -07:00
Bruce Mitchener
8cc6969510
Remove Z3_literals
remnants. ( #6829 )
...
The bulk of the functionality using these was removed between
Z3 4.4.1 and 4.5.0, back in 2015.
Co-authored-by: Bruce Mitchener <bruce.mitchener@configura.com>
2023-07-23 19:38:57 -07:00
Nikolaj Bjorner
6c8b8609ee
tweak control flow for empty clauses
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-07-23 18:16:00 -07:00
Nikolaj Bjorner
48deb4d3e0
fix proof generation for euf-solver
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-07-23 14:31:44 -07:00
Nikolaj Bjorner
e64bab4bb8
simplify code
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-07-22 13:19:03 -07:00
Nikolaj Bjorner
d0f2b00f96
fix build warnings
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-07-22 12:24:30 -07:00
Nikolaj Bjorner
a0892c6669
rename antecedent utilities for clarity
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-07-22 11:30:34 -07:00
Nikolaj Bjorner
4d31ff7a38
remove unused variable
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-07-21 08:35:09 -07:00
Nikolaj Bjorner
3479cdc10b
separate hint literals
2023-07-20 10:52:58 -07:00