Module remove_minus

Expand description

Remove unary negations and subtractions from integer expressions

This module defines a new type NonMinusIntegerExpr that represents a restricted integer expression which does not contain the sub operator nor unary negations. However, it does have support for negated constants.

Any IntegerExpression can be converted into a NonMinusIntegerExpr, by pushing the negation inwards until they can be applied to a constant or until a factor of -1 can be added to an atom.

Enumsยง

NonMinusIntegerExpr
Integer expression that does not contain a minus operator, i.e., no negations or subtractions, only negated constants are allowed.
NonMinusIntegerOp
Arithmetic operators without -