+"""
+note: for islpy
+isl format: basic set: ("{[x, y] : x >= 0 and x < 5 and y >= 0 and y < x+4 }")
+"""
import ctypes, ctypes.util
+import functools
import math
import numbers
import operator
import re
-import functools
from decimal import Decimal
from fractions import Fraction
libisl.isl_printer_get_str.restype = ctypes.c_char_p
+
def _polymorphic_method(func):
@functools.wraps(func)
def wrapper(self, other):
raise TypeError('operand should be a Value or a Rational')
return wrapper
+
class Context:
__slots__ = ('_ic')
def _as_parameter_(self):
return self._ic
- def __del__(self):
- libisl.isl_ctx_free(self)
+ #comment out so does not delete itself after being created
+ #def __del__(self):
+ # libisl.isl_ctx_free(self)
def __eq__(self, other):
if not isinstance(other, Context):