mirror of
https://github.com/Z3Prover/z3
synced 2025-04-23 17:15:31 +00:00
merge
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
commit
f525f43e43
155 changed files with 3188 additions and 1043 deletions
|
@ -920,6 +920,19 @@ void enum_sort_example() {
|
|||
std::cout << "2: " << result_goal.as_expr() << std::endl;
|
||||
}
|
||||
|
||||
void tuple_example() {
|
||||
std::cout << "tuple example\n";
|
||||
context ctx;
|
||||
const char * names[] = { "first", "second" };
|
||||
sort sorts[2] = { ctx.int_sort(), ctx.bool_sort() };
|
||||
func_decl_vector projs(ctx);
|
||||
func_decl pair = ctx.tuple_sort("pair", 2, names, sorts, projs);
|
||||
sorts[1] = pair.range();
|
||||
func_decl pair2 = ctx.tuple_sort("pair2", 2, names, sorts, projs);
|
||||
|
||||
std::cout << pair2 << "\n";
|
||||
}
|
||||
|
||||
void expr_vector_example() {
|
||||
std::cout << "expr_vector example\n";
|
||||
context c;
|
||||
|
@ -1179,6 +1192,7 @@ int main() {
|
|||
incremental_example2(); std::cout << "\n";
|
||||
incremental_example3(); std::cout << "\n";
|
||||
enum_sort_example(); std::cout << "\n";
|
||||
tuple_example(); std::cout << "\n";
|
||||
expr_vector_example(); std::cout << "\n";
|
||||
exists_expr_vector_example(); std::cout << "\n";
|
||||
substitute_example(); std::cout << "\n";
|
||||
|
|
|
@ -2452,7 +2452,6 @@ Z3_lbool ext_check(Z3_ext_context ctx) {
|
|||
}
|
||||
printf("\n");
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
@ -2464,7 +2463,7 @@ void incremental_example1() {
|
|||
Z3_context ctx = ext_ctx->m_context;
|
||||
Z3_ast x, y, z, two, one;
|
||||
unsigned c1, c2, c3, c4;
|
||||
Z3_bool result;
|
||||
Z3_lbool result;
|
||||
|
||||
printf("\nincremental_example1\n");
|
||||
LOG_MSG("incremental_example1");
|
||||
|
@ -2485,7 +2484,7 @@ void incremental_example1() {
|
|||
c4 = assert_retractable_cnstr(ext_ctx, Z3_mk_lt(ctx, y, one));
|
||||
|
||||
result = ext_check(ext_ctx);
|
||||
if (result != Z3_L_FALSE)
|
||||
if (result != Z3_L_FALSE)
|
||||
exitf("bug in Z3");
|
||||
printf("unsat\n");
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue