mirror of
https://github.com/Z3Prover/z3
synced 2025-04-25 01:55:32 +00:00
have parser produce ast-vector instead of single ast
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
538411c67f
commit
0ac80fc042
9 changed files with 75 additions and 52 deletions
|
@ -2632,13 +2632,16 @@ void reference_counter_example() {
|
|||
*/
|
||||
void smt2parser_example() {
|
||||
Z3_context ctx;
|
||||
Z3_ast fs;
|
||||
Z3_ast_vector fs;
|
||||
printf("\nsmt2parser_example\n");
|
||||
LOG_MSG("smt2parser_example");
|
||||
|
||||
ctx = mk_context();
|
||||
fs = Z3_parse_smtlib2_string(ctx, "(declare-fun a () (_ BitVec 8)) (assert (bvuge a #x10)) (assert (bvule a #xf0))", 0, 0, 0, 0, 0, 0);
|
||||
printf("formulas: %s\n", Z3_ast_to_string(ctx, fs));
|
||||
Z3_ast_vector_inc_ref(ctx, fs);
|
||||
printf("formulas: %s\n", Z3_ast_vector_to_string(ctx, fs));
|
||||
Z3_ast_vector_dec_ref(ctx, fs);
|
||||
|
||||
Z3_del_context(ctx);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue