3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-07-04 11:55:40 +00:00
Commit graph

19704 commits

Author SHA1 Message Date
Nikolaj Bjorner
b4c2b455bd #7667 - add API documentation
The scenario works as expected when disabling model compression:

```
from z3 import *
pre_processor = Tactic("bit-blast")
solver = Solver()

set_param("model.compact", False)

x = BitVec('x', 8)
pre_processed = pre_processor(x == 5)
print(pre_processed[0])
solver.add(pre_processed[0]) # add the sole assertion

if solver.check() == sat:
    print(solver.model())
    model = pre_processed[0].convert_model(solver.model())
    print(model)
    print(model[x].as_long())
```
2025-05-30 11:05:51 +01:00
Nikolaj Bjorner
2714dc2623 fix #7661 2025-05-29 17:46:51 +01:00
Nikolaj Bjorner
819c2079cb use array instead of hash-table to track trace 2025-05-29 17:40:45 +01:00
Brandon Stride
257b8e91e6
Fix out of bounds error in OCaml API (#7665) (#7666) 2025-05-29 17:06:48 +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
Nikolaj Bjorner
d766292dab add seed parameter, fix trail undo order from insertion to ensure lifetime 2025-05-27 18:03:00 +01:00
Can Cebeci
b44c897a59
Fix setup_relevancy for relevancy-dependent case split strategies (#7662) 2025-05-27 16:52:35 +01:00
Nikolaj Bjorner
80c553d24a missing file
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2025-05-24 00:20:30 +01:00
Nikolaj Bjorner
77fed8b97c v1 of a randomizer simplifier 2025-05-24 00:15:47 +01:00
Nikolaj Bjorner
84a5303def for future ignoring genai files 2025-05-21 14:22:20 -07:00
Nikolaj Bjorner
85e7243108 update add-term to avoid duplicating fresh aux-expr 2025-05-20 14:22:03 -07:00
Nikolaj Bjorner
c2098b41d6
Pr (#7654)
* add prd

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

* missing text

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

* fix

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

* fix #7647

* fix #7647 - with respect to scope level

* initial stab at randomizer

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

* Create prd.yml

* missing text

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

* fix

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

* Update prd.yml

* allows setting simplifier factory independently of whether solver has been allocated.

Instances, such as #7484 can be solved faster by either having authors rewrite benchmarks or by using incremental pre-processing. You can add incremental pre-processing to the SMT solver by using the command

```
(set-simplifier (then simplify propagate-values solve-eqs elim-unconstrained simplify))
```

This command can be invoked any time prior to push or adding assertions.

The effect of the command is that it adds an incremental pre-processing pass to check-sat invocations that is potentially more powerful than the default pre-processing. The default pre-processing functionality is not touched mainly to avoid instability against functionality that is already built around its behavior.

* remove experiment from pr

---------

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2025-05-19 03:24:45 -07:00
Nikolaj Bjorner
8d67feef9f
Update prd.yml 2025-05-17 17:39:37 -07:00
Nikolaj Bjorner
a4e7123437
Update prd.yml 2025-05-17 17:34:43 -07:00
Nikolaj Bjorner
a7fbddd049
Update prd.yml 2025-05-17 17:24:14 -07:00
Nikolaj Bjorner
ad02d18e63
add prd (#7649)
* add prd

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

* missing text

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

* fix

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

* fix #7647

* fix #7647 - with respect to scope level

---------

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2025-05-17 17:07:03 -07:00
Nikolaj Bjorner
33812201cb
Create prd.yml 2025-05-16 14:15:52 -07:00
Nikolaj Bjorner
47c12f9a18 refactoring to use for-range 2025-05-15 10:57:46 -07:00
Nikolaj Bjorner
7ebe7c46b9 remove stale API #7648 2025-05-15 10:57:46 -07:00
Steffen Smolka
0b26f7e0ee
Add support for building Z3 using Bazel. (#7646)
Signed-off-by: Steffen Smolka <smolkaj@google.com>
2025-05-15 08:47:29 -07:00
Lev Nachmanson
f680242620 adjust the frequency of dio calls
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
2025-05-14 08:17:39 -07:00
Lev Nachmanson
15a3818fce cleanup in dioph_eq.cpp
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
2025-05-13 14:57:21 -07:00
Nikolaj Bjorner
1109139359 move to readme-cmake 2025-05-13 14:36:20 -07:00
Nikolaj Bjorner
ce1535119d include some build cheat sheet 2025-05-13 14:34:47 -07:00
Nikolaj Bjorner
a5a2a13d34 update version number 2025-05-13 14:32:35 -07:00
Nikolaj Bjorner
0d3c29a250 handle larger buffers 2025-05-13 14:11:59 -07:00
Lev Nachmanson
6b32aaed10 remove slack heuristic
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
2025-05-12 14:02:17 -07:00
Lev Nachmanson
a5e5d4dbd3 testing
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
2025-05-12 14:02:17 -07:00
Lev Nachmanson
bbaec0bf95 trying randomly shuffle the indices in the slack utilization
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
2025-05-12 14:02:17 -07:00
Lev Nachmanson
52241b6474 some refactoring of lar_solver.h
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
2025-05-12 14:02:17 -07:00
Lev Nachmanson
fef954c028 shring lar_solver.h
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
2025-05-12 14:02:17 -07:00
Lev Nachmanson
4abd9843a0 fix the build
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
2025-05-12 14:02:17 -07:00
Lev Nachmanson
e3f5e8c8a6 restore lar_solver::add_named_var
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
2025-05-12 14:02:17 -07:00
Lev Nachmanson
b375faa77c continue PIMPL refactor in lar_solver
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
2025-05-12 14:02:17 -07:00
Lev Nachmanson
b7ffcb7e61 implement imp of lar_solver as lar_solver::imp
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
2025-05-12 14:02:17 -07:00
Lev Nachmanson
39955f1d04 remove a function from lar_solver
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
2025-05-12 14:02:17 -07:00
Lev Nachmanson
4e56834b76 test
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
2025-05-12 14:02:17 -07:00
Lev Nachmanson
a527667fc0 shuffle more functionality from lar_solver.h to lar_solver::imp
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
2025-05-12 14:02:17 -07:00
Lev Nachmanson
c81eb74c93 apply the slack idea in a loop
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
2025-05-12 14:02:17 -07:00
Lev Nachmanson
e041fe95bc slack
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
2025-05-12 14:02:17 -07:00
Nikolaj Bjorner
7ca94e8fef add E-matching to EUF completion 2025-05-10 16:15:04 -07:00
Nikolaj Bjorner
9232ef579c remove copy of LICENSE.txt - pypi doesn't take it 2025-05-09 16:53:45 -07:00
Nikolaj Bjorner
49dffaed39 enable pypi 2025-05-09 15:37:19 -07:00
Nikolaj Bjorner
b54ed38cea enable pypi 2025-05-09 13:15:42 -07:00
Nikolaj Bjorner
59a7e007a4 disable pypi
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2025-05-09 08:26:38 -07:00
Nikolaj Bjorner
d4b622e239 update version number
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2025-05-09 08:25:40 -07:00