+
+ def to_isl(self):
+ space = libisl.isl_space_set_alloc(_CONTEXT, 0, len(self.symbol_count()))
+ bset = libisl.isl_basic_set_universe(libisl.isl_space_copy(space))
+ copy = libisl.isl_basic_set_copy(bset)
+ ls = libisl.isl_local_space_from_space(libisl.isl_space_copy(space))
+ ceq = libisl.isl_equality_alloc(libisl.isl_local_space_copy(ls))
+ for value in self.equalities:
+ for value in self.equalities:
+ #need method to get expression value
+ if self._equalities:
+ value = self._equalities.method_get_value_from_expression()
+ ceq = libisl.isl_constraint_set_constant_val(ceq, value )
+ #ceq = libisl.isl_constraint_set_coefficient_si(ceq, libisl.isl_set_dim, self.symbols(), value)
+ '''
+ cin = libisl.isl_inequality_alloc(libisl.isl_local_space_copy(ls))
+ for item in self.inequalities:
+ for item in self.inequalities:
+ if isinstance(item, int):
+ cin = libisl.isl_constraint_set_constant_si(cin, item)
+ else:
+ cin = libisl.isl_constraint_set_coefficient_si(cin, libisl.isl_set_dim, self.symbols(), item)
+ '''
+ bsetfinal = libisl.isl_basic_set_add_contraint(copy, ceq)
+ #bsetfinal = libisl.isl_basic_set_add_contraint(copy, cin)
+ string = libisl.isl_printer_print_basic_set(bsetfinal)
+ print(string)
+ return self