mirror of
https://github.com/Z3Prover/z3
synced 2025-04-22 00:26:38 +00:00
set up test for slicing
This commit is contained in:
parent
71ef78fb25
commit
136e819cb9
5 changed files with 24 additions and 4 deletions
|
@ -198,6 +198,7 @@ namespace polysat {
|
|||
xs.push_back(x);
|
||||
}
|
||||
}
|
||||
SASSERT(ys.empty());
|
||||
}
|
||||
|
||||
void slicing::find_base(slice src, slice_vector& out_base) const {
|
||||
|
|
|
@ -32,6 +32,8 @@ namespace polysat {
|
|||
|
||||
class slicing final {
|
||||
|
||||
friend class test_slicing;
|
||||
|
||||
// solver& m_solver;
|
||||
|
||||
#if 0
|
||||
|
@ -111,16 +113,16 @@ namespace polysat {
|
|||
// Retrieve (or create) base slices s_1,...,s_n such that src[hi:lo] == s_1 ++ ... ++ s_n
|
||||
void mk_slice(slice src, unsigned hi, unsigned lo, slice_vector& out_base);
|
||||
|
||||
// find representative
|
||||
// Find representative
|
||||
slice_idx find(slice_idx i) const;
|
||||
|
||||
// merge equivalence classes of two base slices
|
||||
// Merge equivalence classes of two base slices
|
||||
void merge(slice_idx s1, slice_idx s2);
|
||||
|
||||
// Equality x_1 ++ ... ++ x_n == y_1 ++ ... ++ y_k
|
||||
// Merge equality x_1 ++ ... ++ x_n == y_1 ++ ... ++ y_k
|
||||
//
|
||||
// Precondition:
|
||||
// - sequence of base slices without holes (TODO: condition on holes probably not necessary? total widths have to match of course)
|
||||
// - sequence of base slices (equal total width)
|
||||
// - ordered from msb to lsb
|
||||
// - slices have the same reference point
|
||||
void merge(slice_vector& xs, slice_vector& ys);
|
||||
|
|
|
@ -109,6 +109,7 @@ add_executable(test-z3
|
|||
simple_parser.cpp
|
||||
simplex.cpp
|
||||
simplifier.cpp
|
||||
slicing.cpp
|
||||
small_object_allocator.cpp
|
||||
smt2print_parse.cpp
|
||||
smt_context.cpp
|
||||
|
|
|
@ -267,6 +267,7 @@ int main(int argc, char ** argv) {
|
|||
TST(fixplex);
|
||||
TST(mod_interval);
|
||||
TST(viable);
|
||||
TST(slicing);
|
||||
TST(totalizer);
|
||||
TST(distribution);
|
||||
}
|
||||
|
|
15
src/test/slicing.cpp
Normal file
15
src/test/slicing.cpp
Normal file
|
@ -0,0 +1,15 @@
|
|||
#include "math/polysat/slicing.h"
|
||||
|
||||
namespace polysat {
|
||||
|
||||
class test_slicing {
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
|
||||
void tst_slicing() {
|
||||
using namespace polysat;
|
||||
std::cout << "ok\n";
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue