mirror of
https://github.com/Z3Prover/z3
synced 2025-04-23 00:55:31 +00:00
Update Ubuntu job name in Azure pipeline and add string variable creation in C API example
This commit is contained in:
parent
95d2e009ef
commit
ec14ef765e
2 changed files with 11 additions and 2 deletions
|
@ -165,6 +165,15 @@ Z3_ast mk_int_var(Z3_context ctx, const char * name)
|
|||
return mk_var(ctx, name, ty);
|
||||
}
|
||||
|
||||
/**
|
||||
\brief Create a string variable using the given name.
|
||||
*/
|
||||
Z3_ast mk_string_var(Z3_context ctx, const char * name)
|
||||
{
|
||||
Z3_sort ty = Z3_mk_string_sort(ctx);
|
||||
return mk_var(ctx, name, ty);
|
||||
}
|
||||
|
||||
/**
|
||||
\brief Create a Z3 integer node using a C int.
|
||||
*/
|
||||
|
@ -1615,7 +1624,7 @@ void error_code_example2() {
|
|||
Z3_del_config(cfg);
|
||||
|
||||
x = mk_int_var(ctx, "x");
|
||||
y = mk_bool_var(ctx, "y");
|
||||
y = mk_string_var(ctx, "y");
|
||||
printf("before Z3_mk_iff\n");
|
||||
/* the next call will produce an error */
|
||||
app = Z3_mk_iff(ctx, x, y);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue