3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2026-04-02 18:08:57 +00:00
Commit graph

20 commits

Author SHA1 Message Date
Copilot
8db175447b
Handle unit-unit prefix/suffix splits in simplify_and_init (#9097)
When both leading (or trailing) tokens of a string equality are
is_char_or_unit(), split the equality:
  unit(a) ++ rest1 == unit(b) ++ rest2  ->  unit(a)==unit(b), rest1==rest2
  unit(a) ++ rest1 == unit(b)           ->  unit(a)==unit(b), rest1==empty
  unit(a) == unit(b) ++ rest2           ->  unit(a)==unit(b), empty==rest2
(symmetric suffix case handled too)

Add three unit tests covering prefix split, prefix split with empty
rest, and suffix split.


Agent-Logs-Url: https://github.com/Z3Prover/z3/sessions/565287e9-a121-4bae-8aa4-6c2ec93e660f

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 19:39:33 -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
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
Nikolaj Bjorner
c43df60182 fix build of unit tests
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2026-03-18 10:29:41 -07:00
Copilot
ef22ae8871
Replace dep_tracker uint_set with scoped_dependency_manager<dep_source> in seq_nielsen (#9014)
* Initial plan

* replace dep_tracker uint_set with scoped_dependency_manager<dep_source>

Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com>

* fix test build: update dep_tracker usages in test files and seq_state.h

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-16 15:52:18 -07:00
Copilot
1a8570ed3f
Refactor seq_nielsen: address NSB review comments (#8993)
* Initial plan

* Refactor seq_nielsen: m_graph reference, accessor methods, seq_util.is_power, m.are_equal/are_distinct

- Add ast_manager& m_m and seq_util& m_seq members to nielsen_graph with accessors
- Change m_graph from pointer to reference in nielsen_node
- Remove redundant g parameter from simplify_and_init (use m_graph instead)
- Use seq.str.is_power() matcher in get_power_base/exp_expr and handle_empty_side
- Use m.are_equal/are_distinct for E-graph-aware token comparison
- Fix seq.is_const_char unchecked return value
- Simplify has_char/all_eliminable loop with std::any_of/all_of
- Fix rebuilt=nullptr pattern in merge_adjacent_powers and simplify_const_powers
- Add formal Spec: comments for DirectionalInconsistency and CommPower cancellation
- Remove addressed NSB review comments

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Fix CI: update test files for simplified simplify_and_init signature

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: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com>
2026-03-15 10:35:45 -07:00
Nikolaj Bjorner
27f5541b0b updates
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2026-03-13 18:19:25 -07:00
CEisenhofer
e384e8f3d4 Added right-to-left rules 2026-03-13 17:25:14 +01:00
copilot-swe-agent[bot]
57ede4cdcd Address code review: clarify add_lower/upper_int_bound return semantics; fix test assertion
Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com>
2026-03-10 23:29:15 +00:00
copilot-swe-agent[bot]
47f9be0270 Implement IntBounds/VarBoundWatcher + Constraint.Shared; fix pre-existing build errors
Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com>
2026-03-10 23:26:55 +00:00
Nikolaj Bjorner
d2739d9816 use reference to solver
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2026-03-10 15:22:50 -07:00
copilot-swe-agent[bot]
5330bd20bc Replace dep_tracker class in seq_nielsen with uint_set
Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com>
2026-03-10 16:58:50 +00:00
CEisenhofer
32a09859e3 Fixing power introduction 2026-03-09 15:03:26 +01:00
CEisenhofer
756673f104 Trying to port integer constraints 2026-03-06 14:01:21 +01:00
copilot-swe-agent[bot]
477ae7c86c Remove is_subsumed_by method from nielsen_node and its tests
Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com>
2026-03-04 20:59:00 +00:00
CEisenhofer
e4787e57f6 Use correct parameters for iterative deepening
Updated spec
2026-03-04 17:37:04 +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
copilot-swe-agent[bot]
361f57976b Fix build: update seq_nielsen tests to use new sgraph(m, eg) constructor after c3 merge
Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com>
2026-03-03 01:46:26 +00:00
copilot-swe-agent[bot]
7c328647de Move seq_nielsen from src/ast/rewriter to src/smt/seq with new smt_seq component
Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com>
2026-03-03 00:17:10 +00:00
copilot-swe-agent[bot]
425d3aec25 Port Nielsen graph framework from ZIPT: constraint types, node/edge/graph structures with tests
Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com>
2026-03-02 21:00:40 +00:00