3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-06-21 21:33:39 +00:00

Merge branch 'develop' into upstream-master

Conflicts:
	.gitignore
	README
	src/ast/ast_smt2_pp.h
	src/ast/ast_smt_pp.cpp
	src/ast/reg_decl_plugins.cpp
	src/cmd_context/cmd_context.cpp
	src/parsers/smt2/smt2parser.cpp
This commit is contained in:
Murphy Berzish 2016-06-01 17:30:25 -04:00
commit d79837eed0
17 changed files with 5647 additions and 8 deletions

View file

@ -13,8 +13,9 @@ Copyright (c) 2015 Microsoft Corporation
void test_print(Z3_context ctx, Z3_ast a) {
Z3_set_ast_print_mode(ctx, Z3_PRINT_SMTLIB2_COMPLIANT);
char const* spec1 = Z3_benchmark_to_smtlib_string(ctx, "test", 0, 0, 0, 0, 0, a);
std::cout << spec1 << "\n";
std::cout << "spec1: benchmark->string\n" << spec1 << "\n";
std::cout << "attempting to parse spec1...\n";
Z3_ast b =
Z3_parse_smtlib2_string(ctx,
spec1,
@ -24,14 +25,14 @@ void test_print(Z3_context ctx, Z3_ast a) {
0,
0,
0);
std::cout << "parse successful, converting ast->string\n";
char const* spec2 = Z3_ast_to_string(ctx, b);
std::cout << spec2 << "\n";
std::cout << "spec2: string->ast->string\n" << spec2 << "\n";
}
void test_parseprint(char const* spec) {
Z3_context ctx = Z3_mk_context(0);
std::cout << spec << "\n";
std::cout << "spec:\n" << spec << "\n";
Z3_ast a =
Z3_parse_smtlib2_string(ctx,
@ -43,8 +44,12 @@ void test_parseprint(char const* spec) {
0,
0);
std::cout << "done parsing\n";
test_print(ctx, a);
std::cout << "done printing\n";
Z3_del_context(ctx);
}
@ -104,6 +109,12 @@ void tst_smt2print_parse() {
test_parseprint(spec5);
// Test strings
char const* spec6 =
"(assert (= \"abc\" \"abc\"))";
test_parseprint(spec6);
// Test ?
}