mirror of
https://github.com/Z3Prover/z3
synced 2025-05-08 16:25:48 +00:00
checkpoint
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
This commit is contained in:
parent
142bf71b35
commit
9359ab7ce5
124 changed files with 2 additions and 0 deletions
35
src/test/theory_dl.cpp
Normal file
35
src/test/theory_dl.cpp
Normal file
|
@ -0,0 +1,35 @@
|
|||
#include "smt_context.h"
|
||||
#include "dl_decl_plugin.h"
|
||||
#include "ast_pp.h"
|
||||
#include "model_v2_pp.h"
|
||||
|
||||
void tst_theory_dl() {
|
||||
ast_manager m;
|
||||
front_end_params params;
|
||||
params.m_model = true;
|
||||
datalog::dl_decl_util u(m);
|
||||
smt::context ctx(m, params);
|
||||
m.register_decl_plugins();
|
||||
expr_ref a(m), b(m), c(m);
|
||||
sort_ref s(m);
|
||||
s = u.mk_sort(symbol("S"),111);
|
||||
a = m.mk_const(symbol("a"),s);
|
||||
b = m.mk_const(symbol("b"),s);
|
||||
ctx.assert_expr(u.mk_lt(a, b));
|
||||
ctx.check();
|
||||
ref<model> md;
|
||||
ctx.get_model(md);
|
||||
model_v2_pp(std::cout, *md.get());
|
||||
|
||||
|
||||
c = m.mk_const(symbol("c"),s);
|
||||
ctx.assert_expr(u.mk_lt(b, c));
|
||||
ctx.check();
|
||||
ctx.get_model(md);
|
||||
model_v2_pp(std::cout, *md.get());
|
||||
|
||||
ctx.assert_expr(u.mk_lt(c, a));
|
||||
std::cout << ctx.check() << "\n";
|
||||
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue