from . import islhelper
from .islhelper import mainctx, libisl
-from .linexprs import Expression, Symbol, Rational
+from .linexprs import LinExpr, Symbol, Rational
from .geometry import GeometricObject, Point, Vector
elif isinstance(node, ast.Compare):
equalities = []
inequalities = []
- left = Expression._fromast(node.left)
+ left = LinExpr._fromast(node.left)
for i in range(len(node.ops)):
op = node.ops[i]
- right = Expression._fromast(node.comparators[i])
+ right = LinExpr._fromast(node.comparators[i])
if isinstance(op, ast.Lt):
inequalities.append(right - left - 1)
elif isinstance(op, ast.LtE):
_RE_AND = re.compile(r'\band\b|,|&&|/\\|∧|∩')
_RE_OR = re.compile(r'\bor\b|;|\|\||\\/|∨|∪')
_RE_NOT = re.compile(r'\bnot\b|!|¬')
- _RE_NUM_VAR = Expression._RE_NUM_VAR
+ _RE_NUM_VAR = LinExpr._RE_NUM_VAR
_RE_OPERATORS = re.compile(r'(&|\||~)')
@classmethod
args = [Domain.fromsympy(arg) for arg in expr.args]
return funcmap[expr.func](*args)
elif isinstance(expr, sympy.Expr):
- return Expression.fromsympy(expr)
+ return LinExpr.fromsympy(expr)
raise ValueError('non-domain expression: {!r}'.format(expr))
def tosympy(self):