mirror of
https://github.com/Z3Prover/z3
synced 2025-04-23 17:15:31 +00:00
n/a
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
95ee4c94f1
commit
2751cbc270
10 changed files with 70 additions and 52 deletions
|
@ -200,6 +200,20 @@ void tst_ddnf(char ** argv, int argc, int& i) {
|
|||
dealloc(ddnf);
|
||||
}
|
||||
|
||||
|
||||
void tst_ddnf1() {
|
||||
enable_trace("ddnf");
|
||||
unsigned W = 2;
|
||||
datalog::ddnf_core ddnf(W);
|
||||
tbv_manager& tbvm = ddnf.get_tbv_manager();
|
||||
tbv* tXX = tbvm.allocate("xx");
|
||||
tbv* t1X = tbvm.allocate("1x");
|
||||
tbv* tX1 = tbvm.allocate("x1");
|
||||
tbv* t11 = tbvm.allocate("11");
|
||||
ddnf.insert(*tXX);
|
||||
ddnf.insert(*t11);
|
||||
ddnf.insert(*tX1);
|
||||
ddnf.insert(*t1X);
|
||||
ddnf.display(std::cout);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -237,6 +237,7 @@ int main(int argc, char ** argv) {
|
|||
TST(sat_user_scope);
|
||||
TST(pdr);
|
||||
TST_ARGV(ddnf);
|
||||
TST(ddnf1);
|
||||
TST(model_evaluator);
|
||||
TST_ARGV(lp);
|
||||
TST(get_consequences);
|
||||
|
|
|
@ -6,16 +6,14 @@ Copyright (c) 2015 Microsoft Corporation
|
|||
|
||||
#include "util/trace.h"
|
||||
#include "util/vector.h"
|
||||
#include "util/sorting_network.h"
|
||||
#include "ast/ast.h"
|
||||
#include "ast/ast_pp.h"
|
||||
#include "ast/reg_decl_plugins.h"
|
||||
#include "util/sorting_network.h"
|
||||
#include "smt/smt_kernel.h"
|
||||
#include "model/model_smt2_pp.h"
|
||||
#include "smt/params/smt_params.h"
|
||||
#include "ast/ast_util.h"
|
||||
|
||||
|
||||
#include "model/model_smt2_pp.h"
|
||||
#include "smt/smt_kernel.h"
|
||||
#include "smt/params/smt_params.h"
|
||||
|
||||
struct ast_ext {
|
||||
ast_manager& m;
|
||||
|
@ -388,7 +386,6 @@ void test_at_most_1(unsigned n, bool full) {
|
|||
std::cout << atom << "\n";
|
||||
if (is_true) ++k;
|
||||
}
|
||||
VERIFY(l_false == solver.check());
|
||||
if (k > 1) {
|
||||
solver.assert_expr(result1);
|
||||
}
|
||||
|
@ -427,6 +424,12 @@ void tst_sorting_network() {
|
|||
test_at_most_1(i, true);
|
||||
test_at_most_1(i, false);
|
||||
}
|
||||
|
||||
for (unsigned n = 2; n < 20; ++n) {
|
||||
std::cout << "verify eq-1 out of " << n << "\n";
|
||||
test_sorting_eq(n, 1);
|
||||
}
|
||||
|
||||
test_at_most1();
|
||||
|
||||
test_sorting_eq(11,7);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue