struct isl_mat *eq;
struct isl_mat *Q;
- n_eq = tab->n_var - tab->n_col + tab->n_dead;
+ tab->n_unbounded = 0;
+ tab->n_zero = n_eq = tab->n_var - tab->n_col + tab->n_dead;
if (tab->empty || n_eq == 0 || n_eq == tab->n_var)
return isl_mat_identity(tab->mat->ctx, 1 + tab->n_var);
if (cgbr->tab->basis->n_col != 1 + cgbr->tab->n_var) {
isl_mat_free(cgbr->tab->basis);
cgbr->tab->basis = NULL;
- } else {
- cgbr->tab->n_zero = 0;
- cgbr->tab->n_unbounded = 0;
}
+ cgbr->tab->n_zero = 0;
+ cgbr->tab->n_unbounded = 0;
}
snap = isl_tab_snap(cgbr->tab);
isl_map_free(map2);
}
+void test_lexmin(struct isl_ctx *ctx)
+{
+ const char *str;
+ isl_map *map;
+
+ str = "[p0, p1] -> { [] -> [] : "
+ "exists (e0 = [(2p1)/3], e1, e2, e3 = [(3 - p1 + 3e0)/3], "
+ "e4 = [(p1)/3], e5 = [(p1 + 3e4)/3]: "
+ "3e0 >= -2 + 2p1 and 3e0 >= p1 and 3e3 >= 1 - p1 + 3e0 and "
+ "3e0 <= 2p1 and 3e3 >= -2 + p1 and 3e3 <= -1 + p1 and p1 >= 3 and "
+ "3e5 >= -2 + 2p1 and 3e5 >= p1 and 3e5 <= -1 + p1 + 3e4 and "
+ "3e4 <= p1 and 3e4 >= -2 + p1 and e3 <= -1 + e0 and "
+ "3e4 >= 6 - p1 + 3e1 and 3e1 >= p1 and 3e5 >= -2 + p1 + 3e4 and "
+ "2e4 >= 3 - p1 + 2e1 and e4 <= e1 and 3e3 <= 2 - p1 + 3e0 and "
+ "e5 >= 1 + e1 and 3e4 >= 6 - 2p1 + 3e1 and "
+ "p0 >= 2 and p1 >= p0 and 3e2 >= p1 and 3e4 >= 6 - p1 + 3e2 and "
+ "e2 <= e1 and e3 >= 1 and e4 <= e2) }";
+ map = isl_map_read_from_str(ctx, str, -1);
+ map = isl_map_lexmin(map);
+ isl_map_free(map);
+}
+
int main()
{
struct isl_ctx *ctx;
test_gist(ctx);
test_coalesce(ctx);
test_closure(ctx);
+ test_lexmin(ctx);
isl_ctx_free(ctx);
return 0;
}