3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-10-29 02:39:24 +00:00
Commit graph

378 commits

Author SHA1 Message Date
Lev Nachmanson
25014d3257 param order
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
2025-10-10 15:36:52 -07:00
Nikolaj Bjorner
6df8b39718 Update seq_rewriter.cpp 2025-08-14 14:40:26 -07:00
Nikolaj Bjorner
fcd3a70c92 remove theory_str and classes that are only used by it 2025-08-07 21:05:12 -07:00
Nikolaj Bjorner
1f8b08108c #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.
2025-07-26 14:02:34 -07: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
99ec42c0d7 additional simplifications to seq 2025-03-19 08:57:31 -10:00
Nikolaj Bjorner
80f00f191a fix #7572 and fix #7574
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2025-03-07 10:46:29 -08:00
Nikolaj Bjorner
fb0eb029a8 use lifted bool 2025-01-21 09:13:38 -08:00
Clemens Eisenhofer
1553bae20c
Performance improvements for seq-sls (#7519)
* Improve length repair

* Fixed arguments

* Special case regex membership with constant string

* Trying hybrid eq-repair strategy

* Different heuristic

* Fixed stoi
2025-01-21 08:01:59 -08:00
Nikolaj Bjorner
c6f58c8bf7 updates to some_string_in_re per code review comments
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2025-01-11 17:47:27 -08:00
Clemens Eisenhofer
c572fc2e4f
Regex membership (#7506)
* Make finding a word in the regex iterative

* Fixed gc problem
2025-01-11 17:41:37 -08:00
Nikolaj Bjorner
c1a62d346c add missing return 2025-01-07 21:02:02 -08:00
Nikolaj Bjorner
1cb126f3dd remove assertion that doesn't build 2025-01-07 17:16:33 -08:00
Nikolaj Bjorner
2dd4faf598 sketch expr_inverter approach for eliminating unconstrained regex containment. 2025-01-07 16:53:57 -08:00
Nikolaj Bjorner
c9cae77304 update regex membership to be slightly better tuned 2024-12-25 10:56:16 -08:00
Nikolaj Bjorner
62db7642ec refine rewriting depth for lt constraints 2024-11-14 21:43:40 -08:00
Nikolaj Bjorner
c0e748a51a fix #7446, by adding rewrite simplification
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2024-11-11 19:16:11 -08:00
Nikolaj Bjorner
1cc808c58d fix #7446, by adding rewrite simplification
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2024-11-11 19:08:11 -08:00
Nikolaj Bjorner
5993735b34 simplify string patterns into prefix/suffix constraints
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2024-10-14 14:32:39 -07:00
Nikolaj Bjorner
96c1375786 #7391
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2024-09-22 19:35:03 +01:00
Nikolaj Bjorner
a6b502779b fix #7252
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2024-06-13 17:52:17 -07:00
Bruce Mitchener
53f89a81c1
Fix some typos. (#7115) 2024-02-07 23:06:43 -08:00
Nikolaj Bjorner
f97dd34028 tests
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-10-30 14:54:04 -07:00
Nikolaj Bjorner
93427f1175 regression test 2447
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-10-26 08:48:58 -07:00
Nikolaj Bjorner
0b8d7b755d useful string rewrites
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-10-26 03:48:50 -07:00
Nikolaj Bjorner
7b490543ca add missing simplification; handle nit #6952
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-10-25 10:00:15 -07:00
Nikolaj Bjorner
643512613a simplify last_index function 2023-09-18 12:52:59 -07:00
Nikolaj Bjorner
a68f91f0a6 fix #6729
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-05-22 14:07:12 +01:00
Nikolaj Bjorner
53ca65a62e fix unsound rewrite 2023-03-20 18:55:40 +01:00
Nikolaj Bjorner
d1c7ff1a36 add unconstrained elimination for sequences 2023-03-20 17:07:04 +01:00
Nikolaj Bjorner
6df711254b fix type error when mapping over the empty sequence 2022-09-10 16:03:52 -07:00
Nikolaj Bjorner
de892ed9f2 fix #6054
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-05-26 15:51:57 -04:00
Nikolaj Bjorner
4d8e4b5bd3 fix #6052
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-05-25 17:21:01 -04:00
Nikolaj Bjorner
c850259f89 rw 2022-05-22 07:54:27 -04:00
Nikolaj Bjorner
87d2a3b4e5 map/mapi/foldl/foldli
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-05-04 01:10:18 -07:00
Nikolaj Bjorner
f1806d32d6 remove buggy code, close, fix #5825
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-03-20 13:25:44 -07:00
Nikolaj Bjorner
081c62d006 allow range comparison for bit-vectors and int/real 2022-03-10 17:08:49 -08:00
Nikolaj Bjorner
11030fc81d disable unsound mk_seq_butlast
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-02-21 18:56:49 -08:00
Nikolaj Bjorner
773e829c58 #5804 2022-01-31 10:16:09 -08:00
Nikolaj Bjorner
007af9cb8a fix #5784
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-01-21 03:08:03 +01:00
Margus Veanes
5afb95b34a
improved subset checking for regexes with counters (#5731) 2021-12-22 17:53:34 -08:00
Margus Veanes
1d9aad6ea9
improved regex merging avoiding unsat nontermination (#5728) 2021-12-20 17:44:06 -08:00
Margus Veanes
be38b256c8
fixed bug in is_char_const_range (#5724) 2021-12-19 17:46:42 -08:00
Margus Veanes
25d54ebb40
fixing regression of issue 1224 (#5723) 2021-12-19 14:07:53 -08:00
Margus Veanes
a7b1db611c
State graph dgml update and fixes in condition simplifier (#5721)
* improved generated dgml graph

* fixed simplification of negated ranges and did some code cleanup

* do not make loops with lower=upper=0, this is epsilon

* do not add loops with lower=upper=1

* bug fix in normalization: forgotten eps case
2021-12-19 11:09:55 -08:00
Nikolaj Bjorner
e1ffaa7faf na
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2021-12-17 11:34:57 -08:00
Nikolaj Bjorner
6963451704 na 2021-12-16 20:13:29 -08:00
Nikolaj Bjorner
5974200444 fixes to previous push and streamlining 2021-12-16 20:06:49 -08:00
Nikolaj Bjorner
4e82a9af5f pin expressions 2021-12-16 19:41:32 -08:00
Margus Veanes
a288f9048a
Update regex union and intersection to maintain ANF (#5717)
* added merge for unions and intersections

* added normalization rules to ensure ANF

* fixing PR comments related to merge
2021-12-16 19:19:36 -08:00