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

19846 commits

Author SHA1 Message Date
Nikolaj Bjorner
4bb139435a simplify output
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2025-08-06 10:51:45 -07:00
Nikolaj Bjorner
9dd8221f2c updates
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2025-08-06 10:05:38 -07:00
Ilana Shapiro
5700e3dfe4
Parallel solving (#7759)
* 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

---------

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.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>
2025-08-06 01:27:54 -07:00
Nikolaj Bjorner
9b060cace3 updates
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2025-08-05 10:05:22 -07:00
Ilana Shapiro
aa5d833b38
Parallel solving (#7758)
* 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

---------

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.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>
2025-08-05 09:06:36 -07:00
Nikolaj Bjorner
0ac6abf3a8 pair programming
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2025-08-04 11:46:28 -07:00
Nikolaj Bjorner
03f2e6775c pair programming
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2025-08-04 11:45:56 -07:00
Nikolaj Bjorner
d190c83984 snapshot
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2025-08-04 09:50:53 -07:00
Ilana Shapiro
d593bb89f3
Parallel solving (#7756)
* 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

* process cubes as lists of individual lits

---------

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
Co-authored-by: Nikolaj Bjorner <nbjorner@microsoft.com>
Co-authored-by: humnrdble <83878671+humnrdble@users.noreply.github.com>
2025-08-04 09:48:10 -07:00
Ilana Shapiro
435ea6ea99
fixed-size min-heap for tracking top-k literals (#7752)
* 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

---------

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
Co-authored-by: Nikolaj Bjorner <nbjorner@microsoft.com>
Co-authored-by: humnrdble <83878671+humnrdble@users.noreply.github.com>
2025-07-28 19:54:01 -07:00
Nikolaj Bjorner
a9b4e35938
Update PARALLEL_PROJECT_NOTES.md 2025-07-26 17:44:29 -07:00
Nikolaj Bjorner
9d0a2ae355
Update PARALLEL_PROJECT_NOTES.md 2025-07-26 17:40:43 -07:00
Nikolaj Bjorner
27c1ffc7fb
Update PARALLEL_PROJECT_NOTES.md 2025-07-25 20:17:19 -07:00
Nikolaj Bjorner
4c229d057d
Update PARALLEL_PROJECT_NOTES.md 2025-07-25 20:16:12 -07:00
Nikolaj Bjorner
c3da87ca12
Update PARALLEL_PROJECT_NOTES.md 2025-07-25 20:15:29 -07:00
Nikolaj Bjorner
964363504c
Update PARALLEL_PROJECT_NOTES.md 2025-07-25 20:13:06 -07:00
Nikolaj Bjorner
f6ec7f5381
Update PARALLEL_PROJECT_NOTES.md 2025-07-25 20:03:52 -07:00
Nikolaj Bjorner
82b4c3ea23
Update PARALLEL_PROJECT_NOTES.md 2025-07-25 20:02:37 -07:00
Nikolaj Bjorner
e1eb3ace3c
Update PARALLEL_PROJECT_NOTES.md 2025-07-25 19:35:51 -07:00
Nikolaj Bjorner
f2ff0adc79 more notes
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2025-07-25 15:52:46 -07:00
Nikolaj Bjorner
9bba708f9b fix compilation
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2025-07-25 15:36:46 -07:00
Nikolaj Bjorner
f6fc5045d2
Update PARALLEL_PROJECT_NOTES.md 2025-07-25 15:12:13 -07:00
Nikolaj Bjorner
202807b317
Update PARALLEL_PROJECT_NOTES.md 2025-07-25 15:09:03 -07:00
Nikolaj Bjorner
e732354259
Update PARALLEL_PROJECT_NOTES.md 2025-07-25 15:00:32 -07:00
Nikolaj Bjorner
138ac63dd0 added notes
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2025-07-25 11:23:05 -07:00
Nikolaj Bjorner
ac857aaf72 add score access and reset
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2025-07-23 15:32:49 -07:00
Ilana Shapiro
20b9690b01
very basic setup (#7741) 2025-07-23 15:26:02 -07:00
Nikolaj Bjorner
a2f17420ff moving to active/passive division
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2025-07-23 15:22:16 -07:00
Nikolaj Bjorner
44cd38c9ff
Update msvc-static-build.yml 2025-07-23 10:32:56 -07:00
Nikolaj Bjorner
fc51067207 compile warnings
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2025-07-21 16:20:08 -07:00
Nikolaj Bjorner
1d1a01c6cc update logging 2025-07-21 16:14:14 -07:00
Nikolaj Bjorner
dbcbc6c3ac revamp ac plugin and plugin propagation 2025-07-21 07:35:06 -07:00
Nikolaj Bjorner
b983524afc add diagnostics instrumentation to mam 2025-07-12 17:52:06 -07:00
Nikolaj Bjorner
383f4db14c update pretty printer to show lambdas 2025-07-12 17:51:37 -07:00
Nikolaj Bjorner
47a2376172 bugfix to ac-plugin
use list for "shared" should be indices into an array of shared expressions, not the monomial index.
2025-07-12 17:51:19 -07:00
Nikolaj Bjorner
fd5455422e fix #7725 - proofs are only possible if context was created with proofs enabled
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2025-07-12 09:14:23 +02:00
LeeYoungJoon
e575919657
debug : Add support for selecting LLDB via invoke on macOS (#7726) 2025-07-12 09:02:09 +02:00
Nikolaj Bjorner
0995928f6e wip - throttle AC completion, enable congruences over bound bodies
- AC completion which is exposed as an option to the new congruence closure core used roots of E-Graph which gets ordering of monomials out of sync.
- Added injective function handling to AC completion
- Move to model where all equations, also unit to unit are in completion
- throw in first level bound bodies into the E-graph to enable canonization on them.
2025-07-11 12:48:27 +02:00
Nikolaj Bjorner
35b1d09425 working on ho-matcher 2025-07-08 04:50:43 +02:00
Nikolaj Bjorner
195f3c9110 update build dependencies 2025-07-07 16:50:35 +02:00
Nikolaj Bjorner
0c5b0c3724 turn on ho-matcher for completion 2025-07-07 14:08:51 +02:00
Nikolaj Bjorner
1b3c3c2716 initial pattern abstraction and move matching to src 2025-07-06 00:53:46 -07:00
Nikolaj Bjorner
2d1a42d53f fixes to ho-matcher 2025-07-05 16:24:45 -07:00
Nikolaj Bjorner
3ccf7a695b make concurrent collect_statistics in a timeout thread safe 2025-07-04 18:58:29 -07:00
Nikolaj Bjorner
951554e883 ho matcher draft
Draft implementation of higher-order matcher.
No specific tuning at this point.
2025-07-04 18:01:47 -07:00
Nikolaj Bjorner
0ee1ee54bd Update azure-pipelines.yml for Azure Pipelines
remove build steps for python packaging
2025-07-04 14:25:53 -07:00
Lev Nachmanson
d2990e2f68 use usize to suppress the data loss warnings
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
2025-07-02 14:42:55 -07:00
Nikolaj Bjorner
f544dd4ab2 deal with warnings
@levnach - there are some additional warnings.
You could revert the change to std_vector or use usize() that I added to vector.h. Look at build logs from the pipelines or actions or figure out how to add a continuous AI script to fixup build warnings (I tried a few times earlier on but the features available to do this were not for laymen).
2025-07-02 10:59:56 -07:00
Nikolaj Bjorner
bb100a40d5 c is non-null 2025-07-02 10:57:54 -07:00
Copilot
75678fc2c2
Fix O(n²) performance issue in CLI datatype declaration processing (#7712)
* Initial plan

* Implement batch initialization fix for O(n²) datatype performance issue

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

* Fix the real O(n²) bottleneck with lazy hash table for constructor name lookups

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

* Optimize get_constructor_by_name: use func_decl* parameter, add linear search optimization for small datatypes, and ensure non-null postcondition

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>
2025-07-02 09:54:36 -07:00