Copilot
3d7fbf9430
[WIP] Update code base to use std::span ( #8269 )
...
* Initial plan
* Add std::span to bit_util.h with backward compatibility
Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com>
* Add std::span to hash.h unsigned_ptr_hash function
Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com>
* Add std::span to ref_vector.h append and constructor
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:51 -08:00
Copilot
317dd92105
Standardize for-loop increments to prefix form (++i) ( #8199 )
...
* Initial plan
* Convert postfix to prefix increment in for loops
Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com>
* Fix member variable increment conversion bug
Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com>
* Update API generator to produce prefix increments
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:29 -08:00
Nikolaj Bjorner
43d40ac142
revise axiom instantiation scheme for finite-sets
...
Instead of asserting theory axioms lazily we create them on the fly and allow propagation eagerly.
The approach uses a waterfall model as follows:
- terms are created: they are inserted into an index for (set.in x S) axiom creation.
- two terms are merged by an equality.
Loop over all new opportunities for axiom instantiation
New axioms are added to a queue of recently created axioms.
- an atomic formula was asserted by the SAT solver.
Update the watch list to find new propagations.
During propagation recently created axioms are either inserted into a propagation queue, or inserted into a watch list.
They are inserted into a propagation queue all or all but one literal is assigned to false.
They are inserted into a watch list if at least two literals are unassigned
They are dropped if the axiom contains a literal that is assigned to true
The propagation queue is processed by by asserting the theory axiom to the core.
Also add some elementary statistics.
A breaking change is to change the datatype for undo-trail in smt_context to not use a custom data-structure.
This can likely cause regressions. For example, the region allocator now comes from the stack_trail instead of being
owned within smt_context with a different declaration order. smt_context could crash during destruction or maybe even pop.
We take the risk as the change is overdue.
Add swap method to ref_vector.
2025-10-18 12:08:39 +02:00
Bruce Mitchener
50e0fd3ba6
Use noexcept more. ( #7058 )
2023-12-16 12:14:53 +00:00
Jakob Rath
46f8b15c14
ref/ref_vector minor convenience changes ( #5322 )
...
* Add ref_vector_core::push_back(ref<T>&&)
* Make operator bool() explicit
2021-05-31 10:27:46 -07:00
Nikolaj Bjorner
770c79a939
prepare for std::vector
2021-04-20 09:24:24 -07:00
Nikolaj Bjorner
4a6083836a
call it data instead of c_ptr for approaching C++11 std::vector convention.
2021-04-13 18:17:35 -07:00
Nikolaj Bjorner
72d407a49f
mbp ( #4741 )
...
* adding dt-solver
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
* dt
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
* move mbp to self-contained module
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
* files
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
* Create CMakeLists.txt
* dt
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
* rename to bool_var2expr to indicate type class
* mbp
* na
* add projection
* na
* na
* na
* na
* na
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
* deps
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
* testing arith/q
* na
* newline for model printing
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-10-21 15:48:40 -07:00
Nuno Lopes
90fc8d854f
add rval methods to scoped_vector
2020-07-12 22:16:24 +01:00
Nuno Lopes
bb26f219fe
remove unneeded constructors (last round)
2020-07-12 17:41:57 +01:00
Nuno Lopes
ec1e733ef2
fix crash in qe_array ref counting due to wrong assignment operator of ptr_vector being called
...
thanks to Arie Gurfinkel for reporting this
2020-06-09 10:02:27 +01:00
Nuno Lopes
e844aef896
remove a few more copy constructors, though still not enough to enable the assertion in vector
...
I give up for now; there are too many copies left for little return..
2020-06-03 20:32:13 +01:00
Nuno Lopes
7ac2791482
remove a bunch of constructors to avoid copies
...
still not enough to guarantee that vector::expand doesnt copy (WIP)
2020-06-03 17:09:27 +01:00
Nikolaj Bjorner
cc8cd2cc2f
na
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-04-23 21:28:19 -07:00
Nikolaj Bjorner
78a1f53ac9
fix #2544
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2019-09-09 18:07:03 +02:00
Nuno Lopes
edf0df634d
simplifications to refs
2019-02-19 13:18:20 +00:00
Nikolaj Bjorner
8e83d04e02
this->size()
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2018-11-25 14:22:22 -08:00
Nikolaj Bjorner
16be5b0e7d
fix #1816 - m_parent_selects gets updated while accessing an interator, fix is to rely on the size of the vector for iteration
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2018-11-25 14:04:17 -08:00
Nikolaj Bjorner
7b2590c026
fix is-unit test in seq rewriter
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2018-11-21 17:08:33 -08:00
Nikolaj Bjorner
04d709dae1
build errors on shrink
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2018-11-19 09:42:10 -08:00
Nikolaj Bjorner
5eefa9c34b
fix combinator signatures
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2018-11-19 08:42:18 -08:00
Nikolaj Bjorner
529e62e01e
remove unsound rewrite
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2018-11-19 00:48:33 -08:00
Nuno Lopes
5de6628a5d
remove spurious copies and inc_refs around ref_vector
2018-06-28 10:31:38 +01:00
Nuno Lopes
6cefb700ac
add move constructor to ref_vector
2017-10-16 00:54:31 +01:00
Nuno Lopes
9b54b4e784
fix vector<> to support non-POD types
...
adjust code to std::move and avoid unnecessary/illegal
2017-10-16 00:54:29 +01:00
Nikolaj Bjorner
b19f94ae5b
make include paths uniformly use path relative to src. #534
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2017-07-31 13:24:11 -07:00
Nikolaj Bjorner
e2fab0a555
seq
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2015-12-28 18:15:48 -08:00
Nikolaj Bjorner
4bc044c982
update header guards to be C++ style. Fixes issue #9
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2015-07-08 23:18:40 -07:00
Leonardo de Moura
2c464d413d
Reorganizing source code. Created util dir
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2012-10-20 10:19:38 -07:00