unsigned is_redundant : 1;
unsigned marked : 1;
unsigned frozen : 1;
+ unsigned negated : 1;
};
enum isl_tab_undo_type {
isl_tab_undo_bset_eq,
isl_tab_undo_bset_div,
isl_tab_undo_saved_basis,
+ isl_tab_undo_drop_sample,
};
union isl_tab_undo_val {
* The big parameter represents an arbitrarily big (and divisible)
* positive number. If present, then the sign of a row is determined
* lexicographically, with the sign of the big parameter coefficient
- * considered first. The big parameter will only be used while
+ * considered first. The big parameter is only used while
* solving PILP problems.
*
* The first n_dead column variables have their values fixed to zero.
* There are "n_var" variables in total. The first "n_param" of these
* are called parameters and the last "n_div" of these are called divs.
* The basic tableau operations makes no distinction between different
- * kinds of variables.
+ * kinds of variables. These special variables are only used while
+ * solving PILP problems.
*
* Dead columns and redundant rows are detected on the fly.
* However, the basic operations do not ensure that all dead columns
* or all redundant rows are detected.
* isl_tab_detect_equalities and isl_tab_detect_redundant can be used
* to perform and exhaustive search for dead columns and redundant rows.
+ *
+ * The samples matrix contains "n_sample" integer points that have at some
+ * point been elements satisfying the tableau. The first "n_outside"
+ * of them no longer satisfy the tableau. They are kept because they
+ * can be reinstated during rollback when the constraint that cut them
+ * out is removed. These samples are only maintained for the context
+ * tableau while solving PILP problems.
*/
enum isl_tab_row_sign {
isl_tab_row_unknown = 0,
struct isl_vec *dual;
struct isl_basic_set *bset;
+ unsigned n_sample;
+ unsigned n_outside;
+ struct isl_mat *samples;
+
unsigned need_undo : 1;
unsigned rational : 1;
unsigned empty : 1;
void isl_tab_dump(struct isl_tab *tab, FILE *out, int indent);
+struct isl_map *isl_tab_basic_map_partial_lexopt(
+ struct isl_basic_map *bmap, struct isl_basic_set *dom,
+ struct isl_set **empty, int max);
+
/* private */
struct isl_tab_var *isl_tab_var_from_row(struct isl_tab *tab, int i);
int isl_tab_add_row(struct isl_tab *tab, isl_int *line);
int isl_tab_row_is_redundant(struct isl_tab *tab, int row);
int isl_tab_min_at_most_neg_one(struct isl_tab *tab, struct isl_tab_var *var);
+int isl_tab_kill_col(struct isl_tab *tab, int col);
void isl_tab_push(struct isl_tab *tab, enum isl_tab_undo_type type);
void isl_tab_push_var(struct isl_tab *tab,