PIPS
|
#include <stdio.h>
#include <stdlib.h>
#include "boolean.h"
#include "arithmetique.h"
#include "vecteur.h"
#include "contrainte.h"
#include "sc.h"
Go to the source code of this file.
Functions | |
Psysteme | sc_restricted_to_variables_transitive_closure (Psysteme sc, Pbase variables) |
for an improved dependence test (Beatrice Creusillet) More... | |
bool | sc_constrains_variable_p (Psysteme sc, Variable var, bool is_equations_p) |
Does "var" appears with a non-zero coefficient in any equation or inequality of constraint system "sc? More... | |
bool | sc_equations_constrain_variable_p (Psysteme sc, Variable var) |
bool | sc_inequalities_constrain_variable_p (Psysteme sc, Variable var) |
Does "var" appears with a non-zero coefficient in any equation or inequality of constraint system "sc?
Definition at line 177 of file sc_misc.c.
References CONTRAINTE_UNDEFINED_P, contrainte_vecteur, Scontrainte::succ, VALUE_ZERO, and vect_coeff().
Referenced by sc_equations_constrain_variable_p(), and sc_inequalities_constrain_variable_p().
Definition at line 190 of file sc_misc.c.
References sc_constrains_variable_p().
Referenced by transformer_equations_constrain_variable_p().
Definition at line 195 of file sc_misc.c.
References sc_constrains_variable_p().
Referenced by transformer_inequalities_constrain_variable_p().
for an improved dependence test (Beatrice Creusillet)
The routine name says it all. Only constraints transitively connected to a constraint referencing a variable of interest with a non-zero coefficient are copied from sc to sc_res.
Input: sc: unchanged variables: list of variables of interest (e.g. phi variables of regions) Output: sc_res: a newly allocated restricted version of sc Temporary: sc: the pointer is modified to make debugging more interesting:-( (no impact on the value pointed to by sc on procedure entry)
FI: I'm sceptical... OK for speed, quid of accuracy? Nonfeasibility due to existencial variables is lost if these variables are not transitively related to the so-called variables of interest, isn'it? Well, I do not manage to build a counter example because existential problems are caught by the precondition normalization. Although it is not as strong as one could wish, it gets lots of stuff...
if a constraint is found in sc, that contains a variable that already belongs to the base of sc_res, then this constraint is removed from sc, added to sc_res and its variables are added to the base of sc_res
if a constraint is found in sc, that contains a variable that already belongs to the base of sc_res, then this constraint is removed from sc, added to sc_res and its variables are added to the base of sc_res
Definition at line 64 of file sc_misc.c.
References Ssysteme::base, BASE_NULLE, base_rm, Ssysteme::dimension, sc_add_egalite(), sc_add_inegalite(), sc_base_add_variable(), sc_creer_base(), sc_dup(), sc_empty(), sc_empty_p(), sc_new(), sc_rm(), sc_rn(), sc_rn_p(), Scontrainte::succ, Svecteur::succ, TCST, variables, vect_common_variables_p(), vect_size(), Scontrainte::vecteur, VECTEUR_NUL_P, and vecteur_var.
Referenced by build_and_test_dependence_context(), efficient_sc_check_inequality_feasibility(), filter_transformer(), and restrict_to_phi_constraints().