CEisenhofer
cc42304f60
Different slices of the same variable have the same hash
2026-06-28 14:36:35 +02:00
CEisenhofer
63a668a71f
Give up with we have nasty replace_all or friends (otw. we would be unsound due to Nielsen saturation)
2026-06-26 15:14:44 +02:00
CEisenhofer
64fed10e86
Projection operator => view
2026-06-25 10:48:20 +02:00
CEisenhofer
b9d5f273ee
Removed logging
2026-06-11 16:14:07 +02:00
CEisenhofer
be627007e1
Use lookahead for regex decomposition
...
Make snode const
2026-06-11 15:34:25 +02:00
Copilot
03a76c0309
euf_sgraph: make drop_left/drop_right depth-linear and simplify string classification ( #9771 )
...
ZIPT review identified two hot-path inefficiencies in `euf_sgraph`:
`drop_left`/`drop_right` were implemented as repeated single-token drops
(`O(count × depth)`), and `classify` performed redundant string checks.
This change aligns behavior with the intended tree-navigation approach
while keeping semantics unchanged.
- **Algorithmic update: `drop_left` / `drop_right`**
- Replaced iterative `drop_first`/`drop_last` loops with direct
recursion over concat children.
- New logic drops across subtree boundaries using child lengths,
reducing work to tree depth (`O(depth)`).
- **Classification cleanup: `classify`**
- Collapsed double `is_string` probing into a single `is_string(e, s)`
call.
- Preserves existing kind mapping (`empty` vs non-empty string constant
handling).
- **Focused test coverage extension**
- Added boundary checks in `test_sgraph_drop` for `drop_left(..., 1)`
and `drop_right(..., 1)` on a 4-token concat tree.
```cpp
snode* sgraph::drop_left(snode* n, unsigned count) {
if (count == 0 || n->is_empty()) return n;
if (count >= n->length()) return mk_empty_seq(n->get_sort());
SASSERT(n->is_concat());
unsigned left_len = n->arg(0)->length();
if (count < left_len)
return mk_concat(drop_left(n->arg(0), count), n->arg(1));
return drop_left(n->arg(1), count - left_len);
}
```
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
2026-06-10 14:46:03 +02:00
CEisenhofer
3908016651
Potentially fixed termination problem with projection operators
2026-06-02 17:04:31 +02:00
CEisenhofer
5b41c6eb9f
Better tracking for debugging
2026-06-01 19:50:34 +02:00
CEisenhofer
70031b674c
Added real projection operator
2026-05-29 15:51:35 +02:00
CEisenhofer
4cd908345a
Prevent expressions in partial dfa being freed to early
2026-05-26 13:07:38 +02:00
CEisenhofer
7ede1b9c3d
re.plus is a regex as well
2026-05-22 14:03:22 +02:00
CEisenhofer
71d7d70080
Missing dependency bug. Still not fixed, but better now
2026-05-12 14:00:50 +02:00
CEisenhofer
82df1afeaf
tentative solution: use existing nullability check (we might want to check in the future which guards of the ITE are actually true)
2026-04-14 18:07:03 +02:00
Nikolaj Bjorner
725b13680e
na
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2026-04-14 08:39:22 -07:00
CEisenhofer
38d725dc5a
Deriving by allchar should not crash
2026-04-09 11:48:35 +02:00
CEisenhofer
c7e7b40d40
Fix
2026-04-08 09:27:46 +02:00
Nikolaj Bjorner
b60a44c66b
classical
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2026-04-03 10:33:28 -07:00
Nikolaj Bjorner
cdccd389e9
revert s_unknown
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2026-04-03 10:04:13 -07:00
CEisenhofer
a81ce477f5
Added classical regex factorization
2026-04-02 20:08:00 +02:00
CEisenhofer
34cb0a17fc
str.at wants a special treatment...
2026-04-02 18:33:44 +02:00
Nikolaj Bjorner
6d2321e6fe
edits to seq_nielsen
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2026-03-30 17:36:27 -07:00
CEisenhofer
dcc85cf9ef
Bug in power elimination
2026-03-26 17:18:38 +01:00
Nikolaj Bjorner
1863290b71
add deterministic solving for unit equations
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2026-03-22 15:34:16 -07:00
Copilot
6b5401ef68
Remove s_other from snode_kind; unify under s_var and is_var() ( #9087 )
...
* remove s_other, use s_var and is_var() instead
Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com>
Agent-Logs-Url: https://github.com/Z3Prover/z3/sessions/d56594ed-7f7e-436a-a4b2-e6dc986b18a8
* fix build: add reset() override to test dummy solver stubs
Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com>
Agent-Logs-Url: https://github.com/Z3Prover/z3/sessions/d437376d-55d8-4087-baf1-e89451d2d597
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com>
2026-03-22 12:05:24 -07:00
Nikolaj Bjorner
a39ff701c7
remove include of nielsen in sgraph
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2026-03-21 09:48:34 -07:00
Nikolaj Bjorner
ae12956545
updates based on discussion
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2026-03-20 11:20:29 -07:00
CEisenhofer
737c5d44ed
Simplify regex splits
2026-03-20 13:33:53 +01:00
CEisenhofer
9aaf103ca0
Fix union problem (might not solve all bugs)
2026-03-20 12:17:44 +01:00
CEisenhofer
4f884e7d9a
Bug
2026-03-20 12:11:18 +01:00
CEisenhofer
a873d5cdda
Fixed output error
2026-03-20 11:51:37 +01:00
Copilot
2ec305f206
port range regular expressions to snode from ZIPT ( #9048 )
...
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com>
2026-03-19 15:59:20 -07:00
CEisenhofer
9f4e823c8b
... and another one...
2026-03-19 15:44:15 +01:00
CEisenhofer
4271bdad55
Another minterm bug
2026-03-19 15:12:22 +01:00
Copilot
f837651434
seq_nielsen: replace mk_fresh_var() with mk_fresh_var(sort* s) ( #9037 )
...
* replace mk_fresh_var() with mk_fresh_var(sort* s) in seq_nielsen; fix snode_label_html linkage
Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com>
* remove mk_var(symbol const&) from sgraph; update all callers to pass sort explicitly
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>
2026-03-18 20:41:41 -07:00
CEisenhofer
e7431400b4
Regex bug fixes (still not there)
2026-03-18 18:01:44 +01:00
CEisenhofer
ab53889c10
Fixed couple of regex problems [there are still others]
2026-03-18 14:29:18 +01:00
CEisenhofer
e439504ec8
Delete cached substitutions completely (for now) to avoid dangling pointers after backtracking
2026-03-16 21:04:47 +01:00
Nikolaj Bjorner
a4c9a5b2b0
add review comments
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2026-03-15 12:23:17 -07:00
Nikolaj Bjorner
df9df50a71
update generation of empty sequence to take sort argument, fix mk_concat substitution
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2026-03-13 10:03:52 -07:00
copilot-swe-agent[bot]
2f8cc1536c
Swap author order: Clemens Eisenhofer before Nikolaj Bjorner in file headers
...
Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com>
2026-03-10 16:27:26 +00:00
CEisenhofer
7dcebcdb0a
A bit cleanup
2026-03-05 17:14:54 +01:00
Nikolaj Bjorner
5aa3713d19
first end-pass. Atomic
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2026-03-04 02:05:26 -08:00
Nikolaj Bjorner
a80652270d
Merge branch 'c3' into copilot/fix-reconcat-classification
2026-03-03 13:10:25 -08:00
copilot-swe-agent[bot]
c0ed79c93b
improve s_loop nullable extraction: clearer comments and sentinel values
...
Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com>
2026-03-03 05:40:16 +00:00
copilot-swe-agent[bot]
a0b359212e
Apply ZIPT improvements: fix loop nullable, drop bounds check, symmetric star merging
...
Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com>
2026-03-03 05:39:33 +00:00
copilot-swe-agent[bot]
69da8f02c2
fix re.concat classification and loop nullability in euf_sgraph.cpp
...
Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com>
2026-03-03 05:19:06 +00:00
copilot-swe-agent[bot]
fbd3d445e2
Add clarifying comments for hash matrix overflow safety and cache validity
...
Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com>
2026-03-02 21:16:46 +00:00
copilot-swe-agent[bot]
cfea2db8bf
Update sgraph and seq_plugin: egraph ref, hash matrix, subst cache, sgraph pointer
...
Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com>
2026-03-02 21:14:34 +00:00
copilot-swe-agent[bot]
1274a1e3c0
Add safety cap on minterm computation and assertion for invariant
...
Co-authored-by: NikolajBjorner <56730610+NikolajBjorner@users.noreply.github.com>
2026-03-02 19:29:41 +00:00
copilot-swe-agent[bot]
150f1fe2ea
Revert is_concat changes, add ZIPT URL, implement snode/sgraph operations and tests
...
- Revert is_str_concat/is_re_concat to original form (PR #8820 review)
- Add ZIPT URL (https://github.com/CEisenhofer/ZIPT ) to euf_sgraph.h
- Add snode::at() for token indexing and collect_tokens() for enumeration
- Add sgraph factory methods: mk_var, mk_char, mk_empty, mk_concat
- Add sgraph drop operations: drop_first, drop_last, drop_left, drop_right
- Add sgraph substitution: subst(snode*, snode*, snode*)
- Add Brzozowski derivative via seq_rewriter::mk_derivative
- Add minterm computation from regex predicates
- Add 7 new unit tests covering all new operations with complex concats
Co-authored-by: NikolajBjorner <56730610+NikolajBjorner@users.noreply.github.com>
2026-03-02 19:28:32 +00:00