mirror of
https://github.com/Z3Prover/z3
synced 2025-04-13 12:28:44 +00:00
.NET API: Added MkMul from IEnumerable.
This commit is contained in:
parent
03aa6914a3
commit
ff3c630207
|
@ -1055,6 +1055,19 @@ namespace Microsoft.Z3
|
|||
return (ArithExpr)Expr.Create(this, Native.Z3_mk_mul(nCtx, (uint)t.Length, AST.ArrayToNative(t)));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Create an expression representing <c>t[0] * t[1] * ...</c>.
|
||||
/// </summary>
|
||||
public ArithExpr MkMul(IEnumerable<ArithExpr> t)
|
||||
{
|
||||
Contract.Requires(t != null);
|
||||
Contract.Requires(Contract.ForAll(t, a => a != null));
|
||||
Contract.Ensures(Contract.Result<ArithExpr>() != null);
|
||||
|
||||
CheckContextMatch(t);
|
||||
return (ArithExpr)Expr.Create(this, Native.Z3_mk_mul(nCtx, (uint)t.Count(), AST.EnumToNative(t)));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Create an expression representing <c>t[0] - t[1] - ...</c>.
|
||||
/// </summary>
|
||||
|
|
Loading…
Reference in a new issue