3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-08 10:25:18 +00:00
This commit is contained in:
Nikolaj Bjorner 2022-01-03 08:54:54 -08:00
parent da154b2f7e
commit cf08cdff9c
2 changed files with 5 additions and 0 deletions

View file

@ -8789,6 +8789,10 @@ def Product(*args):
_args, sz = _to_ast_array(args)
return ArithRef(Z3_mk_mul(ctx.ref(), sz, _args), ctx)
def Abs(arg):
"""Create the absolute value of an arithmetic expression"""
return If(arg > 0, arg, -arg)
def AtMost(*args):
"""Create an at-most Pseudo-Boolean k constraint.

View file

@ -1489,6 +1489,7 @@ namespace arith {
case OP_MOD:
case OP_REM:
case OP_DIV:
case OP_IDIV:
case OP_POWER:
case OP_IS_INT:
case OP_TO_INT: