3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-08-21 02:30:23 +00:00
Commit graph

55 commits

Author SHA1 Message Date
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
87f7a20e14 Add (updated and general) solve_for functionality for arithmetic, add congruence_explain to API to retrieve explanation for why two terms are congruent Tweak handling of smt.qi.max_instantations
Add API solve_for(vars).
It takes a list of variables and returns a triangular solved form for the variables.
Currently for arithmetic. The solved form is a list with elements of the form (var, term, guard).
Variables solved in the tail of the list do not occur before in the list.
For example it can return a solution [(x, z, True), (y, x + z, True)] because first x was solved to be z,
then y was solved to be x + z which is the same as 2z.

Add congruent_explain that retuns an explanation for congruent terms.
Terms congruent in the final state after calling SimpleSolver().check() can be queried for
an explanation, i.e., a list of literals that collectively entail the equality under congruence closure.
The literals are asserted in the final state of search.

Adjust smt_context cancellation for the smt.qi.max_instantiations parameter.
It gets checked when qi-queue elements are consumed.
Prior it was checked on insertion time, which didn't allow for processing as many
instantations as there were in the queue. Moreover, it would not cancel the solver.
So it would keep adding instantations to the queue when it was full / depleted the
configuration limit.
2024-12-19 23:27:57 +01:00
Nikolaj Bjorner
05e053247d add facility to solve for a linear term over API 2024-11-30 09:34:27 -08:00
Nuno Lopes
3586b613f7 remove default destructors 2024-10-02 22:20:12 +01:00
Nikolaj Bjorner
48712b4f60 Add initial value setting for variables in Z3 API, solver, and optimize modules 2024-09-18 16:13:15 +03: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
8efa3c8ade introduce notion of beta redex to deal with lambdas in non-extensional positions
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-06-10 17:35:01 -07:00
Nikolaj Bjorner
c00591daaf finish is-fixed
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-01-19 16:28:34 +01:00
Nikolaj Bjorner
0f03ef4ab0 for Clemens: ensure fixed values are propagated after registration
Also allow to register expressions that the rewriter changes to ensure they get picked up.
2022-01-19 14:38:11 +01:00
Nikolaj Bjorner
87d4ce2659 working on #5614
there are some different sources for the performance regression illustrated by the example. The mitigations will be enabled separately:
- m_bv_to_propagate is too expensive
- lp_bound_propagator misses equalities in two different ways:
   - it resets row checks after backtracking even though they could still propagate
   - it misses equalities for fixed rows when the fixed constant value does not correspond to a fixed variable.

FYI @levnach
2021-11-02 14:55:39 -07:00
Nikolaj Bjorner
61eb8d1908 add ref for regression
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2021-10-26 11:39:13 +02:00
Nikolaj Bjorner
5fac396c2f simplify some verbose trace-stream 2021-07-11 06:15:27 +02:00
Nikolaj Bjorner
026065ff71 streamline pb solver interface and naming after removal of xor 2021-02-28 12:32:04 -08:00
Nikolaj Bjorner
b80ba24ba6 deal with regression break 2020-10-12 12:26:50 -07:00
Nikolaj Bjorner
e3d1849be2 more resilient equality adapter 2020-10-12 10:35:01 -07:00
Nikolaj Bjorner
9b5dc0ca26 fix misc issues around #4661 introduced when adding lazy push/pop to selected theories
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-08-30 10:57:05 -07:00
Nikolaj Bjorner
152c95f72a adding user-propagator ability
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-08-17 22:39:55 -07:00
Nikolaj Bjorner
558233dd8e build fixes, add lazy push/pop state to avoid overhead on unused theories
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-08-17 00:13:46 -07:00
Nikolaj Bjorner
ae502bc2c4 simplify a few of the several axiom trace commands 2020-07-26 18:02:34 -07:00
Nikolaj Bjorner
9bcda408ba towards closing small domain equality enforcement gap #4515
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-07-08 11:43:31 -07:00
Nikolaj Bjorner
d0e20e44ff booyah
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-07-04 15:56:30 -07:00
Nikolaj Bjorner
becf423c77
remove level of indirection for context and ast_manager in smt_theory (#4253)
* remove level of indirection for context and ast_manager in smt_theory

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

* add request by #4252

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

* move to def

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

* int

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-05-08 16:46:03 -07:00
Nikolaj Bjorner
785c9a18ca fix #4049
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-04-24 11:58:48 -07:00
Nikolaj Bjorner
95a78b2450
updates to seq and bug fixes (#4056)
* na

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

* fix #4037

* nicer output for skolem functions

* more overhaul of seq, some bug fixes

* na

* added offset_eq file

* na

* fix #4044

* fix #4040

* fix #4045

* updated ignore

* new rewrites for indexof based on #4036

* add shortcuts

* updated ne solver for seq, fix #4025

* use pair vectors for equalities that are reduced by seq_rewriter

* use erase_and_swap

* remove unit-walk

* na

* add check for #3200

* nits

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

* name a type

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

* remove fp check

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

* remove unsound axiom instantiation for non-contains

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

* fix rewrites

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

* fix #4053

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

* fix #4052

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-04-22 13:18:55 -07:00
Nikolaj Bjorner
3e9479d01a a lot of seq churn
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-04-17 18:21:40 -07:00
Nikolaj Bjorner
501aa7927d split into seq_axioms and seq_skolem
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-04-17 06:14:52 -07:00
Nikolaj Bjorner
387964f508 fix #3960 fix #3959
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-04-14 06:30:54 -07:00
Nikolaj Bjorner
0207878f5f fix #3183 - change relevancy propagation to ensure that div/mod axioms are picked up
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-03-25 19:43:55 -07:00
Nikolaj Bjorner
0d9cd7bc2b addressing misc. string bugs
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2019-08-24 15:40:15 +01:00
Nikolaj Bjorner
a337a51374 fixes for #2513
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2019-08-23 23:29:24 +03:00
Nikolaj Bjorner
9fa9aa09ff fix #2468, adding assignment phase heuristic
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2019-08-10 15:25:05 -07:00
Nikolaj Bjorner
ae982c5225 add tc and trc functionals for binary relations
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2019-04-10 04:12:45 +02:00
Nikolaj Bjorner
8da1b024b7 fix #2205
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2019-03-26 04:30:29 -07:00
Nikolaj Bjorner
9d2a106838 unused variable warning
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2019-03-07 00:07:48 -08:00
nilsbecker
28c03ed1de logging support for theory axioms 2019-02-21 19:29:35 +01:00
Nikolaj Bjorner
ccca063e54 Merge branch 'master' of https://github.com/Z3Prover/z3 into csp 2018-10-21 12:26:53 -07:00
Florian Pigorsch
326bf401b9 Fix some spelling errors (mostly in comments). 2018-10-20 17:07:41 +02:00
Nikolaj Bjorner
35eb6eccd1 iterative deepening
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2018-10-18 17:14:10 -07:00
Nikolaj Bjorner
8a9837a8b5 more refinements for recfun
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2018-10-17 10:02:56 -07:00
Murphy Berzish
7e419137b1 Z3str3: refactor regex automata to subroutine, use arith_value 2018-09-17 16:13:34 -04:00
Bruce Mitchener
76eb7b9ede Use nullptr. 2018-02-12 14:05:55 +07:00
Christoph M. Wintersteiger
00651f8f21 Tabs, formatting. 2017-09-17 14:54:09 +01:00
Nikolaj Bjorner
b19f94ae5b make include paths uniformly use path relative to src. #534
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2017-07-31 13:24:11 -07:00
Nikolaj Bjorner
911b24784a merge LRA
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2017-05-09 10:46:11 -07:00
Murphy Berzish
ab4fbe40b6 cleanup 2017-05-03 17:45:56 -04:00
Murphy Berzish
06cd07e3c2 Merge branch 'theory-assumptions' into develop
Conflicts:
	src/smt/smt_context.cpp
	src/smt/smt_context.h
	src/smt/smt_theory.h
2017-04-22 13:31:43 -04:00
Murphy Berzish
a1bb1f2a13 pre-init assumptions and unsat core validation for smt theories 2017-04-22 13:15:00 -04:00
Murphy Berzish
5cfe5e15ac unsat core validation for smt theories 2017-04-21 17:51:14 -04:00
Murphy Berzish
bef64961ae add pre-init assumptions for smt theories 2017-04-18 13:12:03 -04:00
Nikolaj Bjorner
d614fedde2 more merges with qsat
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2016-03-19 12:41:41 -07:00