3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2026-03-07 13:54:53 +00:00
Commit graph

21906 commits

Author SHA1 Message Date
CEisenhofer
ee02c1c8f3 Changed specifications 2026-03-04 15:53:49 +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
13f9fec339
Merge pull request #8854 from Z3Prover/copilot/implement-zipt-string-solver
Implement ZIPT string solver as theory_nseq
2026-03-03 15:37:41 -08:00
copilot-swe-agent[bot]
f97d80a5e9 Add smt_seq to smt dependencies in mk_project.py
Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com>
2026-03-03 23:36:47 +00:00
copilot-swe-agent[bot]
927b03615c Fix dangling pointer in fresh variable name construction in generate_extensions()
Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com>
2026-03-03 21:53:55 +00:00
copilot-swe-agent[bot]
0bdec633d7 Implement ZIPT string solver skeleton (theory_nseq)
Add theory_nseq, a Nielsen-graph-based string solver plugin for Z3.

## New files
- src/smt/nseq_state.h/.cpp: constraint store bridging SMT context to
  Nielsen graph with manual push/pop backtracking
- src/smt/nseq_regex.h/.cpp: regex membership handling via Brzozowski
  derivatives (stub delegates to sgraph::brzozowski_deriv)
- src/smt/nseq_model.h/.cpp: model generation stub
- src/smt/theory_nseq.h/.cpp: main theory class implementing smt::theory
  with its own private egraph/sgraph, returns FC_GIVEUP as skeleton
- src/test/nseq_basic.cpp: unit tests covering instantiation, parameter
  validation, trivial-equality SAT, and node simplification

## Extensions to seq_nielsen.h/.cpp
- Add search_result enum and solve() iterative-deepening DFS entry point
- Add search_dfs() recursive DFS driver
- Add simplify_node(), generate_extensions(), collect_conflict_deps()
- Add nielsen_node::simplify_and_init(): trivial removal, empty
  propagation, prefix matching, symbol clash detection
- Add nielsen_node::is_satisfied(), is_subsumed_by()
- Implement Det, Const Nielsen, and Eq-split modifiers in
  generate_extensions()

## Integration
- smt_params.cpp: accept 'nseq' as valid string_solver value
- smt_params_helper.pyg: document 'nseq' option
- smt_setup.h/.cpp: add setup_nseq(), wire into setup_QF_S() and
  setup_seq_str()
- smt/CMakeLists.txt: add new sources and smt_seq dependency

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-03 21:50:21 +00:00
copilot-swe-agent[bot]
a7084de5a8 Initial plan 2026-03-03 21:18:59 +00:00
Nikolaj Bjorner
ce3ddd1718 added specs and research
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2026-03-03 13:17:29 -08:00
Nikolaj Bjorner
7438ae6975 Merge ranch 'c3' of https://github.com/z3prover/z3 into c3 2026-03-03 13:16:29 -08:00
Nikolaj Bjorner
f0e026104c added specs and research from running atomic
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2026-03-03 13:16:16 -08:00
Nikolaj Bjorner
a9d0559076
Merge pull request #8849 from Z3Prover/copilot/fix-reconcat-classification
sgraph: fix re.concat classification and s_loop nullability
2026-03-03 13:10:39 -08:00
Nikolaj Bjorner
a80652270d
Merge branch 'c3' into copilot/fix-reconcat-classification 2026-03-03 13:10:25 -08:00
Nikolaj Bjorner
bf8b860015
Merge pull request #8848 from Z3Prover/copilot/apply-zipt-code-improvements
ZIPT: fix loop nullable, drop bounds check, symmetric star merging
2026-03-03 13:08:38 -08:00
Nikolaj Bjorner
7febc19e4c
Merge pull request #8851 from Z3Prover/copilot/examine-nielsen-graphs-constraints
doc: Add ZIPT port comparison summary to seq_nielsen.h
2026-03-03 13:08:08 -08:00
copilot-swe-agent[bot]
dd1363f031 Add ZIPT port comparison summary to seq_nielsen.h
Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com>
2026-03-03 16:34:32 +00:00
copilot-swe-agent[bot]
e92f0be8c5 Initial plan 2026-03-03 16:29:34 +00: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]
d902ce166e Initial plan 2026-03-03 05:17:55 +00:00
copilot-swe-agent[bot]
593e22ba4e Initial plan 2026-03-03 05:17:21 +00:00
Nikolaj Bjorner
fb674ac5b2
Merge pull request #8828 from Z3Prover/copilot/port-nielsen-graph-generation
Port Nielsen graph constraint framework from ZIPT into smt/seq
2026-03-02 19:10:49 -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
Nikolaj Bjorner
fedb610da1 Merge remote-tracking branch 'origin/c3' into copilot/port-nielsen-graph-generation 2026-03-02 16:56:55 -08:00
Nikolaj Bjorner
585e2cc4ba
Merge pull request #8829 from Z3Prover/copilot/update-sgraph-seq-plugin
Refactor sgraph/seq_plugin ownership, add hash matrix and substitution caching
2026-03-02 16:45:51 -08:00
Nikolaj Bjorner
83315f4054 fix python build
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2026-03-03 00:42:07 +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
Nikolaj Bjorner
df7d5cc49b
Merge pull request #8839 from Z3Prover/copilot/examine-new-files-for-improvements
Add ZIPT code reviewer agentic workflow (4x daily)
2026-03-02 16:09:31 -08:00
copilot-swe-agent[bot]
7c8f2d93bb Change seq_plugin m_sg to sgraph& reference, enode_concat_hash takes sgraph& directly
Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com>
2026-03-03 00:07:53 +00:00
copilot-swe-agent[bot]
28d1c4a27f Add ZIPT code reviewer agentic workflow (runs 4x daily)
Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com>
2026-03-03 00:00:36 +00:00
copilot-swe-agent[bot]
67f4d30577 Initial plan 2026-03-02 23:55:15 +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]
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
copilot-swe-agent[bot]
1885753690 Initial plan 2026-03-02 20:39:17 +00:00
Nikolaj Bjorner
5ca200ba2c
Update ZIPT link in euf_sgraph.h documentation 2026-03-02 12:32:32 -08:00
copilot-swe-agent[bot]
2e9ca78396 Initial plan 2026-03-02 20:31:40 +00:00
Nikolaj Bjorner
8d05ab56a1
Merge pull request #8827 from Z3Prover/copilot/finish-pending-tasks-8820
Address review feedback from PR #8820 and implement snode/sgraph operations
2026-03-02 12:27:19 -08: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
copilot-swe-agent[bot]
40b99311e3 Fix enode_concat_eq leaf comparison, simplify is_str/re_concat, update sgraph summary
Address remaining review feedback from PR #8820:
- Use pointer comparison instead of ID comparison in enode_concat_eq
- Remove redundant num_args() == 2 check from is_str_concat/is_re_concat
- Update euf_sgraph.h abstract to detail seq_plugin features

Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com>
2026-03-02 18:58:21 +00:00
copilot-swe-agent[bot]
5bbeedaff0 Initial plan 2026-03-02 18:32:56 +00:00
Nikolaj Bjorner
5e39ee8911
Merge pull request #8820 from Z3Prover/copilot/encapsulate-strings-in-euf-sgraph
Add string graph encapsulation (euf_sgraph/snode), OP_SEQ_POWER, and euf_seq_plugin
2026-03-02 10:32:26 -08:00
copilot-swe-agent[bot]
8c0be6e614 Changes before error encountered
Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com>
2026-03-02 17:50:49 +00:00
copilot-swe-agent[bot]
a3baae5942 Changes before error encountered
Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com>
2026-03-02 17:01:49 +00:00
copilot-swe-agent[bot]
037d2da801 Distinguish is_re_concat/is_str_concat and mk_re_concat/mk_str_concat in euf_seq_plugin
Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com>
2026-03-02 16:34:29 +00:00
copilot-swe-agent[bot]
921260ae82 Fix propagate_assoc find/else logic for hash table
Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com>
2026-03-02 00:38:04 +00:00
copilot-swe-agent[bot]
82051ac4d8 Reuse seq_rewriter::is_nullable, add assoc hash table to seq_plugin propagate_assoc
Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com>
2026-03-02 00:36:52 +00:00
copilot-swe-agent[bot]
3150b41724 Add self-contained unit tests for sgraph (13 tests covering classification, metadata, push/pop, assoc hash, navigation)
Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com>
2026-03-02 00:12:43 +00:00
copilot-swe-agent[bot]
6ef3be4e5e Remove sgraph dependency from seq_plugin, let sgraph register nodes via on_make callback
Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com>
2026-03-01 23:50:48 +00:00