3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-08-26 04:56:03 +00:00
z3/src/ast
Ilana Shapiro 6044389446
Parallel solving (#7771)
* very basic setup

* ensure solve_eqs is fully disabled when smt.solve_eqs=false, #7743

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

* respect smt configuration parameter in elim_unconstrained simplifier

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

* indentation

* add bash files for test runs

* add option to selectively disable variable solving for only ground expressions

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

* remove verbose output

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

* fix #7745

axioms for len(substr(...)) escaped due to nested rewriting

* ensure atomic constraints are processed by arithmetic solver

* #7739 optimization

add simplification rule for at(x, offset) = ""

Introducing j just postpones some rewrites that prevent useful simplifications. Z3 already uses common sub-expressions.
The example highlights some opportunities for simplification, noteworthy at(..) = "".
The example is solved in both versions after adding this simplification.

* fix unsound len(substr) axiom

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

* FreshConst is_sort (#7748)

* #7750

add pre-processing simplification

* Add parameter validation for selected API functions

* updates to ac-plugin

fix incrementality bugs by allowing destructive updates during saturation at the cost of redoing saturation after a pop.

* enable passive, add check for bloom up-to-date

* add top-k fixed-sized min-heap priority queue for top scoring literals

* set up worker thread batch manager for multithreaded batch cubes paradigm, need to debug as I am getting segfault still

* fix bug in parallel solving batch setup

* fix bug

* allow for internalize implies

* disable pre-processing during cubing

* debugging

* remove default constructor

* remove a bunch of string copies

* Update euf_ac_plugin.cpp

include reduction rules in forward simplification

* Update euf_completion.cpp

try out restricting scope of equalities added by instantation

* Update smt_parallel.cpp

Drop non-relevant units from shared structures.

* process cubes as lists of individual lits

* merge

* Add support for Algebraic Datatypes in JavaScript/TypeScript bindings (#7734)

* Initial plan

* Add datatype type definitions to types.ts (work in progress)

Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com>

* Complete datatype type definitions with working TypeScript compilation

Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com>

* Implement core datatype functionality with TypeScript compilation success

Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com>

* Complete datatype implementation with full Context integration and tests

Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com>

* chipping away at the new code structure

* comments

* debug infinite recursion and split cubes on existing split atoms that aren't in the cube

* share lemmas, learn from unsat core, try to debug a couple of things, there was a subtle bug that i have a hard time repro'ing

* merge

* fix #7603: race condition in Ctrl-C handling (#7755)

* fix #7603: race condition in Ctrl-C handling

* fix race in cancel_eh

* fix build

* add arithemtic saturation

* add an option to register callback on quantifier instantiation

Suppose a user propagator encodes axioms using quantifiers and uses E-matching for instantiation. If it wants to implement a custom priority scheme or drop some instances based on internal checks it can register a callback with quantifier instantiation

* missing new closure

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

* add Z3_solver_propagate_on_binding to ml callback declarations

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

* add python file

Signed-off-by: Lev Nachmanson <levnach@Levs-MacBook-Pro.local>

* debug under defined calls

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

* more untangle params

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

* precalc parameters to define the eval order

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

* remove a printout

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

* rename a Python file

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

* add on_binding callbacks across APIs

update release notes,
add to Java, .Net, C++

* use jboolean in Native interface

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

* register on_binding attribute

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

* fix java build for java bindings

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

* avoid interferring side-effects in function calls

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

* remove theory_str and classes that are only used by it

* remove automata from python build

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

* remove ref to theory_str

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

* get the finest factorizations before project

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

* rename add_lcs to add_lc

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

* resolve bad bug about l2g and g2l translators using wrong global context. add some debug prints

* initial attempt at dynamically switching from greedy to frugal splitting strategy in return_cubes. need to test. also there is some bug where the threads take forever to cancel?

* Update RELEASE_NOTES.md

* resolve bug about not translating managers correctly for the second phase of the greedy cubing, and the frugal fallback

---------

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
Signed-off-by: Lev Nachmanson <levnach@Levs-MacBook-Pro.local>
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
Co-authored-by: Nikolaj Bjorner <nbjorner@microsoft.com>
Co-authored-by: humnrdble <83878671+humnrdble@users.noreply.github.com>
Co-authored-by: Nuno Lopes <nuno.lopes@tecnico.ulisboa.pt>
Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com>
Co-authored-by: Lev Nachmanson <levnach@hotmail.com>
2025-08-11 09:14:20 -07:00
..
converters Centralize and document TRACE tags using X-macros (#7657) 2025-05-28 14:31:25 +01:00
euf Parallel solving (#7758) 2025-08-05 09:06:36 -07:00
fpa fix #7661 2025-05-29 17:46:51 +01:00
macros Centralize and document TRACE tags using X-macros (#7657) 2025-05-28 14:31:25 +01:00
normal_forms Centralize and document TRACE tags using X-macros (#7657) 2025-05-28 14:31:25 +01:00
pattern Centralize and document TRACE tags using X-macros (#7657) 2025-05-28 14:31:25 +01:00
proofs Centralize and document TRACE tags using X-macros (#7657) 2025-05-28 14:31:25 +01:00
rewriter Parallel solving (#7771) 2025-08-11 09:14:20 -07:00
simplifiers Parallel solving (#7771) 2025-08-11 09:14:20 -07:00
sls move smt params to params directory, update release.yml 2025-06-09 10:47:22 -07:00
substitution nits 2025-06-30 08:37:39 -07:00
act_cache.cpp re-enabling model evaluation of as-array after tuning normalization 2019-02-10 18:11:01 -08:00
act_cache.h booyah 2020-07-04 15:56:30 -07:00
arith_decl_plugin.cpp Centralize and document TRACE tags using X-macros (#7657) 2025-05-28 14:31:25 +01:00
arith_decl_plugin.h Sls (#7439) 2024-11-02 12:32:48 -07:00
array_decl_plugin.cpp add -> as another array sort constructor 2025-06-22 21:35:23 -07:00
array_decl_plugin.h fixes to ho-matcher 2025-07-05 16:24:45 -07:00
array_peq.cpp code simplification 2025-02-18 19:07:58 -08:00
array_peq.h code simplification 2025-02-18 19:07:58 -08:00
ast.cpp turn on ho-matcher for completion 2025-07-07 14:08:51 +02:00
ast.h turn on ho-matcher for completion 2025-07-07 14:08:51 +02:00
ast_ll_pp.cpp added API to monitor clause inferences 2022-10-19 08:34:55 -07:00
ast_ll_pp.h remove '#include <iostream>' from headers and from unneeded places 2022-06-17 14:10:19 +01:00
ast_lt.cpp remove unnecessary parameter copies 2023-12-22 16:11:06 +00:00
ast_lt.h booyah 2020-07-04 15:56:30 -07:00
ast_pp.h remove a few string copies 2023-12-20 16:55:09 +00:00
ast_pp_dot.cpp Centralize and document TRACE tags using X-macros (#7657) 2025-05-28 14:31:25 +01:00
ast_pp_dot.h remove '#include <iostream>' from headers and from unneeded places 2022-06-17 14:10:19 +01:00
ast_pp_util.cpp fixes to mbqi in the new core based on #6575 2023-02-10 16:56:06 -08:00
ast_pp_util.h wip - proof hints 2022-10-08 20:12:57 +02:00
ast_printer.cpp Remove empty leaf destructors. (#6211) 2022-07-30 10:07:03 +01:00
ast_printer.h Use = default for virtual constructors. 2022-08-05 18:11:46 +03:00
ast_smt2_pp.cpp Centralize and document TRACE tags using X-macros (#7657) 2025-05-28 14:31:25 +01:00
ast_smt2_pp.h #6555 2023-01-26 21:39:52 -08:00
ast_smt_pp.cpp fix #7331 2024-08-06 03:54:25 -07:00
ast_smt_pp.h Add and fix a few general compiler warnings. (#5628) 2021-10-29 15:42:32 +02:00
ast_trail.h remove default destructors 2024-10-02 22:20:12 +01:00
ast_translation.cpp Centralize and document TRACE tags using X-macros (#7657) 2025-05-28 14:31:25 +01:00
ast_translation.h revert my mess with the ast hashtable 2021-02-17 14:29:07 +00:00
ast_util.cpp bug in flatten/and/or introduced when skipping sub-expressions 2021-12-22 07:43:37 -08:00
ast_util.h convert reduce-args to a simplifier 2023-01-28 20:12:14 -08:00
bv_decl_plugin.cpp Centralize and document TRACE tags using X-macros (#7657) 2025-05-28 14:31:25 +01:00
bv_decl_plugin.h fix #7572 and fix #7574 2025-03-07 10:46:29 -08:00
char_decl_plugin.cpp Typo Fixes (#6803) 2023-07-09 11:56:10 -07:00
char_decl_plugin.h Typo Fixes (#6803) 2023-07-09 11:56:10 -07:00
CMakeLists.txt QEL: Fast Approximated Quantifier Elimination (#6820) 2023-08-02 09:34:06 -07:00
cost_evaluator.cpp add priority queue to instantiation 2021-01-31 16:17:52 -08:00
cost_evaluator.h add priority queue to instantiation 2021-01-31 16:17:52 -08:00
datatype_decl_plugin.cpp c is non-null 2025-07-02 10:57:54 -07:00
datatype_decl_plugin.h Fix O(n²) performance issue in CLI datatype declaration processing (#7712) 2025-07-02 09:54:36 -07:00
decl_collector.cpp fixes to mbqi in the new core based on #6575 2023-02-10 16:56:06 -08:00
decl_collector.h fixes to mbqi in the new core based on #6575 2023-02-10 16:56:06 -08:00
display_dimacs.cpp fixes for #6577 2023-02-11 09:33:42 -08:00
display_dimacs.h enable wcnf output for weighted maxsat problems 2021-02-28 09:59:36 -08:00
dl_decl_plugin.cpp Centralize and document TRACE tags using X-macros (#7657) 2025-05-28 14:31:25 +01:00
dl_decl_plugin.h Remove empty leaf destructors. (#6211) 2022-07-30 10:07:03 +01:00
expr2polynomial.cpp Centralize and document TRACE tags using X-macros (#7657) 2025-05-28 14:31:25 +01:00
expr2polynomial.h remove default destructors 2024-10-02 22:20:12 +01:00
expr2var.cpp Centralize and document TRACE tags using X-macros (#7657) 2025-05-28 14:31:25 +01:00
expr2var.h booyah 2020-07-04 15:56:30 -07:00
expr_abstract.cpp Centralize and document TRACE tags using X-macros (#7657) 2025-05-28 14:31:25 +01:00
expr_abstract.h wip - throttle AC completion, enable congruences over bound bodies 2025-07-11 12:48:27 +02:00
expr_delta_pair.h booyah 2020-07-04 15:56:30 -07:00
expr_functors.cpp call it data instead of c_ptr for approaching C++11 std::vector convention. 2021-04-13 18:17:35 -07:00
expr_functors.h Use = default for virtual constructors. 2022-08-05 18:11:46 +03:00
expr_map.cpp merge with Z3Prover/master 2018-06-25 19:44:46 +08:00
expr_map.h booyah 2020-07-04 15:56:30 -07:00
expr_stat.cpp
expr_stat.h booyah 2020-07-04 15:56:30 -07:00
expr_substitution.cpp bugfix to elim_uncnstr to ensure nodes are created. Prepare smt_internalizer to replay unit literals 2024-12-04 15:32:15 -08:00
expr_substitution.h wip - testing solve-eqs2, added as tactic 2022-11-05 22:42:59 -07:00
for_each_ast.cpp
for_each_ast.h Centralize and document TRACE tags using X-macros (#7657) 2025-05-28 14:31:25 +01:00
for_each_expr.cpp remove unneeded iterator functions 2024-09-23 12:59:04 +01:00
for_each_expr.h remove unneeded iterator functions 2024-09-23 12:59:04 +01:00
format.cpp fix #6530 2023-01-10 13:43:17 -08:00
format.h call it data instead of c_ptr for approaching C++11 std::vector convention. 2021-04-13 18:17:35 -07:00
fpa_decl_plugin.cpp Centralize and document TRACE tags using X-macros (#7657) 2025-05-28 14:31:25 +01:00
fpa_decl_plugin.h remove default destructors 2024-10-02 22:20:12 +01:00
func_decl_dependencies.cpp merge with Z3Prover/master 2018-06-25 19:44:46 +08:00
func_decl_dependencies.h booyah 2020-07-04 15:56:30 -07:00
has_free_vars.cpp fixup std-order / inv-order 2024-10-03 19:35:16 -07:00
has_free_vars.h tune q-eval and q-ematch 2021-09-28 13:41:37 -07:00
is_variable_test.h Add and fix a few general compiler warnings. (#5628) 2021-10-29 15:42:32 +02:00
justified_expr.h move from justified_expr to dependent_expr by aligning datatypes 2025-01-22 11:46:10 -08:00
macro_substitution.cpp remove using insert_if_not_there2 2020-04-25 15:08:51 -07:00
macro_substitution.h booyah 2020-07-04 15:56:30 -07:00
num_occurs.cpp build warning 2020-05-02 15:51:12 -07:00
num_occurs.h Add and fix a few general compiler warnings. (#5628) 2021-10-29 15:42:32 +02:00
occurs.cpp wip - alpha support for polymorphism 2023-07-12 18:09:02 -07:00
occurs.h #6805 2023-07-11 09:41:29 -07:00
pb_decl_plugin.cpp working on python make for arm 2022-04-07 13:36:23 +02:00
pb_decl_plugin.h Remove empty leaf destructors. (#6211) 2022-07-30 10:07:03 +01:00
polymorphism_inst.cpp fix #7049 2023-12-08 13:05:21 -08:00
polymorphism_inst.h wip - alpha support for polymorphism 2023-07-12 18:09:02 -07:00
polymorphism_util.cpp remove unnecessary parameter copies 2023-12-22 16:11:06 +00:00
polymorphism_util.h wip - alpha support for polymorphism 2023-07-12 18:09:02 -07:00
pp.cpp Centralize and document TRACE tags using X-macros (#7657) 2025-05-28 14:31:25 +01:00
pp.h booyah 2020-07-04 15:56:30 -07:00
pp_params.pyg print lemmas2console faster 2023-03-20 17:07:04 +01:00
quantifier_stat.cpp move common routines for quantifiers 2021-01-28 13:23:40 -08:00
quantifier_stat.h move common routines for quantifiers 2021-01-28 13:23:40 -08:00
recfun_decl_plugin.cpp Centralize and document TRACE tags using X-macros (#7657) 2025-05-28 14:31:25 +01:00
recfun_decl_plugin.h remove default destructors 2024-10-02 22:20:12 +01:00
recurse_expr.h booyah 2020-07-04 15:56:30 -07:00
recurse_expr_def.h call it data instead of c_ptr for approaching C++11 std::vector convention. 2021-04-13 18:17:35 -07:00
reg_decl_plugins.cpp move to unicode as stand-alone theory 2021-01-27 05:46:45 -08:00
reg_decl_plugins.h booyah 2020-07-04 15:56:30 -07:00
scoped_proof.h overhaul of proof format for new solver 2022-08-28 17:44:33 -07:00
seq_decl_plugin.cpp Centralize and document TRACE tags using X-macros (#7657) 2025-05-28 14:31:25 +01:00
seq_decl_plugin.h Performance improvements for seq-sls (#7519) 2025-01-21 08:01:59 -08:00
shared_occs.cpp fix #4112 2020-04-26 21:04:28 -07:00
shared_occs.h cleanup 2022-11-24 22:46:35 +07:00
special_relations_decl_plugin.cpp add EUF plugin framework. 2023-11-30 13:58:30 -08:00
special_relations_decl_plugin.h add EUF plugin framework. 2023-11-30 13:58:30 -08:00
static_features.cpp Centralize and document TRACE tags using X-macros (#7657) 2025-05-28 14:31:25 +01:00
static_features.h disable new code until pre-condition gets fixed 2022-11-30 22:29:59 -08:00
used_symbols.h booyah 2020-07-04 15:56:30 -07:00
used_vars.cpp #5259 - the Ranjit 2s shave 2021-05-12 10:43:16 -07:00
used_vars.h #5259 - the Ranjit 2s shave 2021-05-12 10:43:16 -07:00
value_generator.cpp Mark override methods appropriately. (#6207) 2022-07-29 23:29:15 +02:00
value_generator.h Use = default for virtual constructors. 2022-08-05 18:11:46 +03:00
well_sorted.cpp Centralize and document TRACE tags using X-macros (#7657) 2025-05-28 14:31:25 +01:00
well_sorted.h booyah 2020-07-04 15:56:30 -07:00