Copilot
a3c10c68a7
Remove redundant overridden default destructors ( #8191 )
...
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com>
2026-02-18 20:57:13 -08:00
Nikolaj Bjorner
1a37a73172
coerce bool
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2026-02-18 20:57:13 -08:00
Nikolaj Bjorner
b3c1de6643
update iterator pattern
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2026-02-18 20:57:12 -08:00
Simon Jeanteur
9ca6580e38
Subterms Theory ( #8115 )
...
* somewhaat failed attempt at declaring subterm predicate
I can't really figure out how to link the smt parser to the rest of the
machinenery, so I will stop here and try from the other side. I'll start
implmenting the logic and see if it brings me back to the parser.
* initial logic implmentation
Very primitive, but I don't like have that much work uncommitted.
* parser implementation
* more theory
* Working base
* subterm reflexivity
* a few optimization
Skip adding obvious equalities or disequality
* removed some optimisations
* better handling of backtracking
* stupid segfault
Add m_subterm to the trail
* Update src/smt/theory_datatype.h
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Update src/ast/rewriter/datatype_rewriter.cpp
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Update src/smt/theory_datatype.cpp
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Update src/smt/theory_datatype.cpp
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Update src/smt/theory_datatype.cpp
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* review
* forgot to update `iterate_subterm`'s signature
* fix iterator segfault
* Remove duplicate include statement
Removed duplicate include of 'theory_datatype.h'.
* Replace 'optional' with 'std::option' in datatype_decl_plugin.h
* Add is_subterm_predicate matcher to datatype_decl_plugin
* Change std::option to std::optional for m_subterm
* Update pdecl.h
* Change has_subterm to use has_value method
* Update pdecl.cpp
---------
Co-authored-by: Nikolaj Bjorner <nbjorner@microsoft.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-02-18 20:57:12 -08:00
Copilot
a6c1d32074
Replace empty destructors with = default for compiler optimization ( #8189 )
...
* Initial plan
* Replace empty destructors with = default
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-02-18 20:57:12 -08:00
Copilot
0cc16b63c2
Replace custom util/optional with std::optional ( #8162 )
...
* Initial plan
* Replace optional with std::optional in source files
Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com>
* Fix array_map contains() and remove optional_benchmark test
Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com>
* Address code review feedback - simplify array_map and test
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-02-18 20:57:09 -08:00
Copilot
d68837693c
Adopt C++17 structured bindings for map/pair iteration ( #8159 )
...
* Initial plan
* Adopt structured bindings for map iteration
Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com>
* Fix DEBUG_CODE macro issue with structured bindings
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-02-18 20:57:09 -08:00
Nikolaj Bjorner
767f7eeace
fix #8116
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2026-02-18 20:57:07 -08:00
Simon Sobisch
b2db2c8b23
AIX compat ( #8113 )
...
* fix name conflict for struct proc
* aix compat
2026-02-18 20:57:04 -08:00
Nikolaj Bjorner
d0add7e3d8
fix #8045
2026-02-18 20:57:03 -08:00
Nikolaj Bjorner
7151c5ac6e
fixes to finite domain arrays
...
- relevancy could be off and array solver doesn't compensate, #7544
- enforce equalities across store for small domain axioms #8065
2026-02-18 20:57:03 -08:00
Ilana Shapiro
6d61efa6b8
Some changes to improve LIA performance ( #8101 )
...
* add user params
* inprocessing flag
* playing around with clause sharing with some arith constraints (complicated version commented out)
* collect shared clauses inside share units after pop to base level (might help NIA)
* dont collect clauses twice
* dont pop to base level when sharing units, manual filter
* clean up code
---------
Co-authored-by: Ilana Shapiro <ilanashapiro@Mac.localdomain>
2026-02-18 20:57:03 -08:00
Nikolaj Bjorner
5be3c6b4e8
fix indentation
2026-02-18 20:57:01 -08:00
Nikolaj Bjorner
d533260445
use new arithmetic solver for AUFLIA, fixes #8090
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2026-02-18 20:57:00 -08:00
Ilana Shapiro
34a40c7747
Search tree core resolution optimization ( #8066 )
...
* Add cube tree optimization about resolving cores recursively up the path, to prune. Also integrate asms into the tree so they're not tracked separately (#7960 )
* draft attempt at optimizing cube tree with resolvents. have not tested/ran yet
* adding comments
* fix bug about needing to bubble resolvent upwards to highest ancestor
* fix bug where we need to cover the whole resolvent in the path when bubbling up
* clean up comments
* close entire tree when sibling resolvent is empty
* integrate asms directly into cube tree, remove separate tracking
* try to fix bug about redundant resolutions, merging close and try_resolve_upwards into once function
* separate the logic again to avoid mutual recursion
* Refactor search tree closure and resolution logic
Refactor close_with_core to simplify logic and remove unnecessary parameters. Update sibling resolvent computation and try_resolve_upwards for clarity.
* apply formatting
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
* Refactor close_with_core to use current node in lambda
* Fix formatting issues in search_tree.h
* fix build issues
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
* Update smt_parallel.cpp
* Change loop variable type in unsat core processing
* Change method to retrieve unsat core from root
---------
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
Co-authored-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2026-02-18 20:56:58 -08:00
Nikolaj Bjorner
b6e8f2b033
disable preprocessing only after formulas are internalized
2026-02-18 20:56:57 -08:00
Nikolaj Bjorner
e76d477ab0
refine givup conditions
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2026-02-18 20:56:56 -08:00
Nikolaj Bjorner
b8b6d96fba
insert theory only once
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2026-02-18 20:56:56 -08:00
Nikolaj Bjorner
e4697fe18e
remove set cardinality operators from array theory. Make final-check use priority levels
...
Issue #7502 shows that running nlsat eagerly during final check can block quantifier instantiation.
To give space for quantifier instances we introduce two levels for final check such that nlsat is only applied in the second and final level.
2026-02-18 20:56:51 -08:00
Nikolaj Bjorner
08babfff60
fix build warnings
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2026-02-18 20:56:02 -08:00
Nikolaj Bjorner
f26b408cec
strengthen filter for unknown by checking relevancy of parents #8022
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2026-02-18 20:55:57 -08:00
Nikolaj Bjorner
b443e90e24
add back statistics to smt-parallel
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2026-02-18 20:55:57 -08:00
Nikolaj Bjorner
cff06b528f
fix #8563 - align indices for flat quantifiers with sks vector layout, and also guard creating instantiation equalities with sort checks
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2026-02-16 20:57:38 -08:00
copilot-swe-agent[bot]
e627e60fe7
Restore defensive SASSERT in smt_conflict_resolution
...
Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com>
2026-02-16 01:50:51 +00:00
copilot-swe-agent[bot]
9efb0e0794
Add initializer_list overloads and update all call sites
...
Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com>
2026-02-16 01:27:08 +00:00
Copilot
cc7e6cd92d
Eliminate unnecessary copies with std::move for ref-counted types ( #8591 )
2026-02-13 12:16:47 +00:00
Nikolaj Bjorner
fb172b67ac
small update to testing on p.m_sls_worker instead of should_run_sls
2026-02-11 17:38:45 -08:00
Nuno Lopes
836a76c78a
Remove copies ( #8583 )
2026-02-11 18:14:36 +00:00
Nuno Lopes
de26d8f6f7
revert swap changes to fix CI
2026-02-10 19:30:49 +00:00
Nuno Lopes
bcca975d2d
fix crash
2026-02-10 10:33:36 +00:00
Nuno Lopes
915ad35012
remove a few copies
2026-02-10 09:52:03 +00:00
Nikolaj Bjorner
73844f9a7f
set random seed directly on m_smt_params before context initialization
...
updates to random seed on ctx does not get propagated to arithmetic solver, preventing diversity within arithmetic solver.
2026-02-09 14:44:08 -08:00
Copilot
921006f628
Replace user-defined swap with C++11 move semantics for covert move patterns ( #8543 )
2026-02-09 17:52:30 +00:00
Nikolaj Bjorner
8978f1549b
Merge pull request #8509 from Z3Prover/copilot/fix-build-warnings
...
Fix compiler warnings: unused variables, uninitialized variable, and false positive array bounds
2026-02-07 05:10:02 -08:00
Copilot
bb35267e46
Modern C++: Add std::span overload for mk_or, adopt std::clamp, optimize stream output ( #8507 )
...
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com>
2026-02-06 11:54:06 +00:00
copilot-swe-agent[bot]
72b4c2258c
Fix all build warnings with surgical changes
...
Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com>
2026-02-05 19:02:39 +00:00
Copilot
4b7e02ebdd
Refactor mk_concat call sites to use std::initializer_list ( #8494 )
...
* Initial plan
* Refactor mk_concat call sites to use std::initializer_list
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-02-04 13:45:20 -08:00
Copilot
23c531a4c1
Remove redundant default constructors when they're the only constructor ( #8461 )
...
* Initial plan
* Modernize C++ constructors to use C++11 default member initialization - Phase 1
Co-authored-by: nunoplopes <2998477+nunoplopes@users.noreply.github.com>
* Fix theory_pb.h struct definition - move reset() back inside struct
Co-authored-by: nunoplopes <2998477+nunoplopes@users.noreply.github.com>
* Modernize C++ constructors to use C++11 default member initialization - Phase 2
Co-authored-by: nunoplopes <2998477+nunoplopes@users.noreply.github.com>
* Fix opt_solver.h - revert rational initialization (complex type)
Co-authored-by: nunoplopes <2998477+nunoplopes@users.noreply.github.com>
* Modernize C++ constructors to use C++11 default member initialization - Phase 3
Co-authored-by: nunoplopes <2998477+nunoplopes@users.noreply.github.com>
* Fix sparse_matrix.h - explicitly initialize union member in default constructor
Co-authored-by: nunoplopes <2998477+nunoplopes@users.noreply.github.com>
* Remove unnecessary default constructors when they're the only constructor
Co-authored-by: nunoplopes <2998477+nunoplopes@users.noreply.github.com>
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: nunoplopes <2998477+nunoplopes@users.noreply.github.com>
2026-02-01 16:51:26 -08:00
Copilot
97bf2a5145
Remove redundant non-virtual destructors with = default ( #8462 )
...
* Initial plan
* Remove 6 non-virtual destructors with no code (= default)
Co-authored-by: nunoplopes <2998477+nunoplopes@users.noreply.github.com>
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: nunoplopes <2998477+nunoplopes@users.noreply.github.com>
2026-02-01 15:22:58 -08:00
Copilot
89e2ceffd0
Use structured bindings for stack entries in theory_datatype ( #8442 )
...
* Initial plan
* Refactor theory_datatype to use C++17 structured bindings
Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com>
* Fix structured binding syntax error in smt_justification.cpp
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>
Co-authored-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2026-01-31 17:14:47 -08:00
Nuno Lopes
10043c37fd
fix build
2026-01-30 16:38:23 +00:00
Nuno Lopes
7edc4e088a
fix build
2026-01-30 14:21:57 +00:00
Copilot
477e4d695d
Refactor SMT core: use structured bindings for enode_pair access ( #8427 )
...
* Initial plan
* Refactor SMT core to use C++17 structured bindings for enode pairs
Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com>
* Use const& in structured bindings to avoid copying
Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com>
* Refactor variable unpacking in DEBUG_CODE
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com>
Co-authored-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2026-01-29 19:01:49 -08:00
Copilot
ebed679287
Refactor dyn_ack.cpp to use structured bindings for app_pair/app_triple ( #8359 )
...
* Initial plan
* Refactor dyn_ack.cpp to use C++17 structured bindings
Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com>
* Rename structured binding variables from app1/app2/app3 to a1/a2/a3
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-01-28 19:39:25 -08:00
Copilot
7747a17bb7
Refactor theory_array_base to use structured bindings for enode pairs ( #8405 )
...
* Initial plan
* Refactor theory_array_base to use structured bindings for enode pairs
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-01-27 20:03:18 -08:00
Copilot
8cb403384e
Refactor theory_lra: Use structured bindings for pair patterns ( #8387 )
...
* Initial plan
* Refactor theory_lra.cpp with structured bindings for pair patterns
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-01-27 13:57:43 -08:00
Copilot
e4ba45925e
Refactor theory_seq to use structured bindings for pair patterns ( #8390 )
...
* Initial plan
* Refactor theory_seq.cpp to use C++17 structured bindings
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-01-27 12:01:29 -08:00
Copilot
ea1ebdeae0
Refactor smt_context to use structured bindings for pair decomposition ( #8385 )
...
* Initial plan
* Refactor smt_context.cpp to use C++17 structured bindings for pair patterns
- Replace .first/.second access with structured bindings in reset_tmp_clauses()
- Replace .first/.second access with structured bindings in decide_clause()
- Replace .first/.second access with structured bindings in init_assumptions()
- Eliminate 3 intermediate variable assignments
- 4 refactoring sites across 3 functions
- Verified successful compilation and all tests pass
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-01-27 11:47:31 -08:00
Copilot
c88c781f3b
Refactor SMT equality handlers to use C++17 structured bindings ( #8321 )
...
* Initial plan
* Refactor SMT equality handlers to use C++17 structured bindings
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-01-24 12:07:38 -08:00
Copilot
1cf9ba152b
Refactor dyn_ack propagate_eh to use structured bindings ( #8317 )
...
* Initial plan
* Refactor dyn_ack propagate_eh to use C++17 structured bindings
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-01-24 10:17:27 -08:00