3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-12-26 14:06:36 +00:00
Commit graph

1832 commits

Author SHA1 Message Date
Lev Nachmanson
8e4557647f t
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
2025-11-24 06:41:06 -10:00
Nikolaj Bjorner
bd2ead977e add back statistics to smt-parallel
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2025-11-15 16:49:22 -08:00
Nikolaj Bjorner
aaaa32b4a0 build fixes
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2025-10-19 20:55:45 +02:00
Nikolaj Bjorner
d65c0fbcd6 add explicit constructors for nightly mac build failure
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2025-10-19 20:14:20 +02:00
Nikolaj Bjorner
542e015550
Remove unused variable 'first' in mpz.cpp
Removed unused variable 'first' from the function.
2025-10-06 13:39:27 -07:00
Copilot
cd1ceb6efe
[WIP] Add a mutex to warning.cpp to ensure that warning messages from different threads don't interfere (#7963)
* Initial plan

* Add mutex to warning.cpp for thread safety

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-10-06 13:38:18 -07:00
Nikolaj Bjorner
b7eb21efed fix #7948
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2025-09-28 12:52:19 +03:00
Nikolaj Bjorner
ce53e06e29
Par (#7945)
* port parallel

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

* updates

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

* update smt-parallel

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

* cleanup

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

* neat

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

* configuration parameter renaming

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

* config parameters

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

---------

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2025-09-21 10:11:04 +03:00
Nikolaj Bjorner
84bf34266b put back shortcut for square test. Remove assumption in unit test
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2025-09-14 05:00:47 -07:00
Nikolaj Bjorner
8158a500d4 remove shortcut as it breaks current contract
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2025-09-14 04:49:27 -07:00
Nikolaj Bjorner
573c2cb8f7 micro tuning perfect square test
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2025-09-13 20:10:43 -07:00
Nuno Lopes
c350ddf990 remove a few useless dynamic casts 2025-09-13 21:06:55 +01:00
Nuno Lopes
b1ab695eb6
fix #7603: race condition in Ctrl-C handling (#7755)
* fix #7603: race condition in Ctrl-C handling

* fix race in cancel_eh

* fix build
2025-08-06 14:27:28 -07:00
Nuno Lopes
f23b053fb9 remove a bunch of string copies 2025-08-03 10:41:38 +01:00
Nuno Lopes
97aa46add3 remove default constructor 2025-08-03 09:52:53 +01:00
Nikolaj Bjorner
dbcbc6c3ac revamp ac plugin and plugin propagation 2025-07-21 07:35:06 -07:00
LeeYoungJoon
e575919657
debug : Add support for selecting LLDB via invoke on macOS (#7726) 2025-07-12 09:02:09 +02:00
LeeYoungJoon
53c48f7226
trace : Sort and reorder trace tags by tag_class and tag_name (#7714) 2025-07-02 09:53:35 -07:00
LeeYoungJoon
0928a1fdf0
trace : Classify tag_names unique to smt_internalize.cpp (#7713) 2025-07-01 21:30:07 -07:00
Nikolaj Bjorner
725c0933ad use usize to work around mess with static_cast<unsigned> insertions when looping over small vectors 2025-06-30 09:04:47 -07:00
Nikolaj Bjorner
a73e244db4 nits 2025-06-30 08:37:39 -07:00
Nikolaj Bjorner
08c4f73e32 add dependencies to fix build 2025-06-06 13:02:48 +02:00
Nikolaj Bjorner
2fc3b0730d some cleanup and functionality for tracing 2025-05-30 14:46:55 +01:00
Nikolaj Bjorner
819c2079cb use array instead of hash-table to track trace 2025-05-29 17:40:45 +01:00
Nikolaj Bjorner
4b2e5adc11 enable tag classes 2025-05-28 17:57:58 +01:00
Nikolaj Bjorner
bbb3d5379b initialize tag class circular linked list 2025-05-28 17:10:23 +01:00
Nikolaj Bjorner
a3aee0247a remove commented out include directives to avoid confusing build scripts
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2025-05-28 16:07:45 +01:00
Nikolaj Bjorner
6d70b49563 add full path to util in include directives
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2025-05-28 14:57:00 +01:00
LeeYoungJoon
0a93ff515d
Centralize and document TRACE tags using X-macros (#7657)
* Introduce X-macro-based trace tag definition
- Created trace_tags.def to centralize TRACE tag definitions
- Each tag includes a symbolic name and description
- Set up enum class TraceTag for type-safe usage in TRACE macros

* Add script to generate Markdown documentation from trace_tags.def
- Python script parses trace_tags.def and outputs trace_tags.md

* Refactor TRACE_NEW to prepend TraceTag and pass enum to is_trace_enabled

* trace: improve trace tag handling system with hierarchical tagging

- Introduce hierarchical tag-class structure: enabling a tag class activates all child tags
- Unify TRACE, STRACE, SCTRACE, and CTRACE under enum TraceTag
- Implement initial version of trace_tag.def using X(tag, tag_class, description)
  (class names and descriptions to be refined in a future update)

* trace: replace all string-based TRACE tags with enum TraceTag
- Migrated all TRACE, STRACE, SCTRACE, and CTRACE macros to use enum TraceTag values instead of raw string literals

* trace : add cstring header

* trace : Add Markdown documentation generation from trace_tags.def via mk_api_doc.py

* trace : rename macro parameter 'class' to 'tag_class' and remove Unicode comment in trace_tags.h.

* trace : Add TODO comment for future implementation of tag_class activation

* trace : Disable code related to tag_class until implementation is ready (#7663).
2025-05-28 14:31:25 +01:00
Carson Radtke
2fe2735b5e
Replace _DEBUG with Z3DEBUG (#7628)
Fixes https://github.com/Z3Prover/z3/issues/7627
2025-04-22 13:39:01 -07:00
mikulas-patocka
e31e9819b1
Add an option "ctrl_c" that can be used to disable Ctrl-C signal handling (#7619)
Add this option, so that the z3 library can be used in programs that do
signal handling on their own.

Signed-off-by: Mikulas Patocka <mikulas@twibright.com>
2025-04-18 10:34:54 -07:00
Nikolaj Bjorner
f63c9e366f disable assignment for param_descrs 2025-04-17 17:29:09 -07:00
mikulas-patocka
6ecc7a2dd4
Fix a race condition in scoped_timer::finalize (#7618)
scoped_timer::finalize is called from fork. However, it may race with
other threads creating or freeing timer threads.

This patch removes the loop in scoped_timer::finalize (because it is not
needed and it may spin) and also removes two unlocked assignments.

The idle thread is added to "available_workers" in
scoped_timer::~scoped_timer destructor.

If we call the "finalize" method as a part of total memory cleanup, all
the scoped_timers' destructors were already executed and all the worker
threads are already on "available_workers" vector. So, we don't need to
loop; the first loop iteration will clean all the threads.

If the "finalize" method is called from single-threaded program's fork(),
then all the scoped timers' destructors are already called and the case
is analogous to the previous case.

If the "finalize" method is called from multi-threaded program's fork(),
then it breaks down - the "num_workers" variable is the total amount of
workers (both sleeping and busy), and we loop until we terminated
"num_workers" threads - that means that if the number of sleeping workers
is less than "num_workers", the function just spins.

Then, there is unlocked assignment to "num_workers = 0" and
"available_workers.clear()" that can race with other threads doing z3
work and corrupt memory. available_workers.clear() is not needed, because
it was already cleared by std::swap(available_workers, cleanup_workers)
(and that was correctly locked).

Signed-off-by: Mikulas Patocka <mikulas@twibright.com>
2025-04-11 08:08:27 +01:00
Nikolaj Bjorner
a5e5a35755 code simplification 2025-02-18 19:07:58 -08:00
Nikolaj Bjorner
c2b7b58c78 #7468 - add option (get-info :parameters) to display solver parameters that were updated globally and distinct from defaults
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2025-02-10 11:57:14 -08:00
Nikolaj Bjorner
ab43d2dcf1 fix semantics of check-int64 div operation to align with smtlib semantics 2025-01-29 04:29:38 -08:00
Nikolaj Bjorner
fb5834268e fix unit tests, add subsampling mode for false literals 2025-01-20 17:34:59 -08:00
Nikolaj Bjorner
648cf9602e fix uninitialized variable warnings 2025-01-14 13:54:05 -08:00
Nikolaj Bjorner
3c5b8bd03d Update parray.h
deal with compiler warnings by initializing m_elem
2025-01-13 18:19:12 -08:00
Nikolaj Bjorner
fa22b646aa address some build warnings. 2025-01-12 10:18:11 -08:00
Nikolaj Bjorner
847278fba8 adding global lookahead variant to sls arith solver 2025-01-09 16:47:33 -08:00
Nikolaj Bjorner
05f166f736 add py_value to selected classes in python bindings, add mode for input-assertion based lookahead solving 2025-01-04 13:40:49 -08:00
Nikolaj Bjorner
5a57636cd8 use native sdiv
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2025-01-03 10:56:15 -08:00
Nikolaj Bjorner
bcb61ee12c v0 of edit distance repair 2024-12-05 14:14:27 -08:00
Nikolaj Bjorner
b4e768cfb0 adding plugin for local search strings 2024-11-22 13:56:03 -08:00
Nikolaj Bjorner
71bad7159b #7418 - circumvent use of timer threads to make WASM integration of z3 easier
The scoped_timer uses a std::therad. Spawning this thread fails in cases of WASM.
Instead of adapting builds and using async features at the level of WASM and the client, we expose a specialized version of z3 that doesn't use threads at all, neither for solvers nor for timers.
The tradeoff is that the periodic poll that checks for timeout directly queries the global clock each time.
We characterize it as based on polling.
2024-11-21 11:20:05 -08:00
Nikolaj Bjorner
6a9d5910cb add method for resetting limit 2024-11-14 21:43:40 -08:00
Nikolaj Bjorner
407bad3693 add noexcept
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2024-11-04 11:21:55 -08:00
Nikolaj Bjorner
42894f729a add noexcept for signature compatibility
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2024-11-04 11:13:49 -08:00
Nikolaj Bjorner
92065462b4 use std::exception as base class to z3_exception
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2024-11-04 11:08:15 -08:00