assert(isl_pw_qpolynomial_is_zero(pwqp1));
isl_pw_qpolynomial_free(pwqp1);
+
+ str = "{ [i] -> ([([i/2] + [i/2])/5]) }";
+ pwqp1 = isl_pw_qpolynomial_read_from_str(ctx, str);
+ str = "{ [i] -> ([(2 * [i/2])/5]) }";
+ pwqp2 = isl_pw_qpolynomial_read_from_str(ctx, str);
+
+ pwqp1 = isl_pw_qpolynomial_sub(pwqp1, pwqp2);
+
+ assert(isl_pw_qpolynomial_is_zero(pwqp1));
+
+ isl_pw_qpolynomial_free(pwqp1);
+
+ str = "{ [x] -> ([x/2] + [(x+1)/2]) }";
+ pwqp1 = isl_pw_qpolynomial_read_from_str(ctx, str);
+ str = "{ [x] -> x }";
+ pwqp2 = isl_pw_qpolynomial_read_from_str(ctx, str);
+
+ pwqp1 = isl_pw_qpolynomial_sub(pwqp1, pwqp2);
+
+ assert(isl_pw_qpolynomial_is_zero(pwqp1));
+
+ isl_pw_qpolynomial_free(pwqp1);
}
void test_split_periods(isl_ctx *ctx)
isl_pw_qpolynomial_fold_free(pwf);
}
+void test_lift(isl_ctx *ctx)
+{
+ const char *str;
+ isl_basic_map *bmap;
+ isl_basic_set *bset;
+
+ str = "{ [i0] : exists e0 : i0 = 4e0 }";
+ bset = isl_basic_set_read_from_str(ctx, str, 0);
+ bset = isl_basic_set_lift(bset);
+ bmap = isl_basic_map_from_range(bset);
+ bset = isl_basic_map_domain(bmap);
+ isl_basic_set_free(bset);
+}
+
int main()
{
struct isl_ctx *ctx;
assert(srcdir);
ctx = isl_ctx_alloc();
+ test_lift(ctx);
test_bound(ctx);
test_union(ctx);
test_split_periods(ctx);