25 #include "ppl-config.h"
27 #include "assertions.hh"
81 throw_dimension_incompatible(
"widening_assign(y)",
"y", y);
85 PPL_EXPECT_HEAVY(copy_contains(x, y));
131 if (cgs.
num_rows() == con_sys.num_rows()) {
143 if (tp != 0 && *tp > 0) {
156 PPL_ASSERT(x.
OK(
true));
167 throw_dimension_incompatible(
"limited_extrapolation_assign(y, cgs)",
173 throw_dimension_incompatible(
"limited_extrapolation_assign(y, cgs)",
179 if (cgs_num_rows == 0) {
185 PPL_EXPECT_HEAVY(copy_contains(x, y));
208 if (tp == NULL || *tp == 0) {
237 PPL_ASSERT(!marked_empty());
239 PPL_ASSERT(generators_are_minimized());
245 dim <= gen_sys.space_dimension(); ++dim) {
246 PPL_ASSERT(dim_kinds[dim] == LINE
249 switch (dim_kinds[dim]) {
268 widened_ggs.
insert(gen_sys[x_row]);
287 throw_dimension_incompatible(
"generator_widening_assign(y)",
"y", y);
291 PPL_EXPECT_HEAVY(copy_contains(x, y));
352 if (tp != 0 && *tp > 0) {
365 PPL_ASSERT(x.
OK(
true));
376 throw_dimension_incompatible(
"limited_extrapolation_assign(y, cgs)",
382 throw_dimension_incompatible(
"limited_extrapolation_assign(y, cgs)",
388 if (cgs_num_rows == 0) {
394 PPL_EXPECT_HEAVY(copy_contains(x, y));
417 if (tp == NULL || *tp == 0) {
446 throw_dimension_incompatible(
"widening_assign(y)",
"y", y);
450 PPL_EXPECT_HEAVY(copy_contains(x, y));
477 throw_dimension_incompatible(
"limited_extrapolation_assign(y, cgs)",
484 throw_dimension_incompatible(
"limited_extrapolation_assign(y, cgs)",
490 if (cgs_num_rows == 0) {
496 PPL_EXPECT_HEAVY(copy_contains(x, y));
519 if (tp == NULL || *tp == 0) {
Grid_Generator_System gen_sys
The system of generators.
void congruence_widening_assign(const Grid &y, unsigned *tp=NULL)
Assigns to *this the result of computing the Grid widening between *this and y using congruence syste...
The empty element, i.e., the empty set.
void limited_extrapolation_assign(const Grid &y, const Congruence_System &cgs, unsigned *tp=NULL)
Improves the result of the Grid widening computation by also enforcing those congruences in cgs that ...
void limited_generator_extrapolation_assign(const Grid &y, const Congruence_System &cgs, unsigned *tp=NULL)
Improves the result of the generator variant of the Grid widening computation by also enforcing those...
void generator_widening_assign(const Grid &y, unsigned *tp=NULL)
Assigns to *this the result of computing the Grid widening between *this and y using generator system...
void set_empty()
Sets status to express that the grid is empty, clearing all corresponding matrices.
size_t dimension_type
An unsigned integral type for representing space dimensions.
void insert(const Congruence &cg)
Inserts in *this a copy of the congruence cg, increasing the number of space dimensions if needed...
Congruence_System con_sys
The system of congruences.
bool is_equal_at_dimension(Variable v, const Congruence &cg) const
Returns true if *this is equal to cg in dimension v.
bool is_equal_at_dimension(dimension_type dim, const Grid_Generator &gg) const
Returns true if *this is equal to gg in dimension dim.
dimension_type num_lines() const
Returns the number of lines in the system.
void widening_assign(const Grid &y, unsigned *tp=NULL)
Assigns to *this the result of computing the Grid widening between *this and y.
static Poly_Con_Relation is_included()
The polyhedron is included in the set of points satisfying the constraint.
dimension_type num_equalities() const
Returns the number of equalities.
Poly_Con_Relation relation_with(const Congruence &cg) const
Returns the relations holding between *this and cg.
bool congruences_are_up_to_date() const
Returns true if the system of congruences is up-to-date.
expr_type expression() const
Partial read access to the (adapted) internal expression.
void set_generators_minimized()
Sets status to express that generators are minimized.
A dimension of the vector space.
void add_recycled_grid_generators(Grid_Generator_System &gs)
Adds the generators in gs to the system of generators of this.
bool OK(bool check_not_empty=false) const
Checks if all the invariants are satisfied.
dimension_type space_dimension() const
Returns the dimension of the vector space enclosing *this.
void limited_congruence_extrapolation_assign(const Grid &y, const Congruence_System &cgs, unsigned *tp=NULL)
Improves the result of the congruence variant of Grid widening computation by also enforcing those co...
bool contains(const Grid &y) const
Returns true if and only if *this contains y.
void select_wider_generators(const Grid &y, Grid_Generator_System &widened_ggs) const
Copies widened generators from y to widened_ggs.
bool generators_are_up_to_date() const
Returns true if the system of generators is up-to-date.
dimension_type space_dim
The number of dimensions of the enclosing vector space.
The entire library is confined to this namespace.
dimension_type num_rows() const
Returns the number of rows in the system.
bool marked_empty() const
Returns true if the grid is known to be empty.
dimension_type num_rows() const
Returns the number of rows (generators) in the system.
bool congruences_are_minimized() const
Returns true if the system of congruences is minimized.
Dimension_Kinds dim_kinds
void update_congruences() const
Updates and minimizes the congruences from the generators.
dimension_type num_parameters() const
Returns the number of parameters in the system.
void m_swap(Grid &y)
Swaps *this with grid y. (*this and y can be dimension-incompatible.)
bool generators_are_minimized() const
Returns true if the system of generators is minimized.
void select_wider_congruences(const Grid &y, Congruence_System &selected_cgs) const
Copies a widened selection of congruences from y to selected_cgs.
void add_recycled_congruences(Congruence_System &cgs)
Adds the congruences in cgs to *this.
void insert(const Grid_Generator &g)
Inserts into *this a copy of the generator g, increasing the number of space dimensions if needed...
bool update_generators() const
Updates and minimizes the generators from the congruences.
A grid line, parameter or grid point.
void set_congruences_minimized()
Sets status to express that congruences are minimized.
A system of grid generators.