I am using Z3 with c api. Is it possible to find out if a given Z3_ast
variable corresponds to a clause like or_b1_b2
bellow?
Z3_ast or_b1_b2 = mk_binary_or(c,mk_bool_var(c,"b1"),mk_bool_var(c,"b2"));
Thank you
I am using Z3 with c api. Is it possible to find out if a given Z3_ast
variable corresponds to a clause like or_b1_b2
bellow?
Z3_ast or_b1_b2 = mk_binary_or(c,mk_bool_var(c,"b1"),mk_bool_var(c,"b2"));
Thank you
Yes, The Z3 API provides several functions for inspecting/traversing ASTs. The Z3 API is minimalist, but it has all necessary ingredients for writing function such as:
is_propositional_variable
,is_literal
, andis_clause
. Here is an example: