3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-27 02:45:51 +00:00

Added conversion function for Goal to Expr conversion in .NET, Java, ML

This commit is contained in:
Christoph M. Wintersteiger 2015-06-10 13:17:34 +01:00
parent 98f2de3216
commit 004bf1471f
4 changed files with 43 additions and 0 deletions

View file

@ -221,6 +221,22 @@ public class Goal extends Z3Object
return "Z3Exception: " + e.getMessage();
}
}
/**
* Goal to BoolExpr conversion.
*
* Returns a string representation of the Goal.
**/
public BoolExpr AsBoolExpr() {
int n = size();
if (n == 0)
return getContext().mkTrue();
else if (n == 1)
return getFormulas()[0];
else {
return getContext().mkAnd(getFormulas());
}
}
Goal(Context ctx, long obj)
{