PIPS
constraint.c
Go to the documentation of this file.
1 /*
2 
3  $Id$
4 
5  Copyright 1989-2016 MINES ParisTech
6 
7  This file is part of PIPS.
8 
9  PIPS is free software: you can redistribute it and/or modify it
10  under the terms of the GNU General Public License as published by
11  the Free Software Foundation, either version 3 of the License, or
12  any later version.
13 
14  PIPS is distributed in the hope that it will be useful, but WITHOUT ANY
15  WARRANTY; without even the implied warranty of MERCHANTABILITY or
16  FITNESS FOR A PARTICULAR PURPOSE.
17 
18  See the GNU General Public License for more details.
19 
20  You should have received a copy of the GNU General Public License
21  along with PIPS. If not, see <http://www.gnu.org/licenses/>.
22 
23 */
24 #ifdef HAVE_CONFIG_H
25  #include "pips_config.h"
26 #endif
27 
28 #include <stdio.h>
29 #include <string.h>
30 #include <stdlib.h>
31 
32 #include "linear.h"
33 
34 #include "genC.h"
35 
36 #include "properties.h"
37 #include "misc.h"
38 #include "ri.h"
39 #include "ri-util.h"
40 
41 /************************************************************* VECTEUR STUFF */
42 
44 {
46 }
47 
48 /* comparison function for Pvecteur in pips, to be used by qsort.
49  */
51 {
52  return compare_entities((const entity*)&var_of(*pv1),
53  (const entity*)&var_of(*pv2));
54 }
55 
57 {
58  return VECTEUR_NUL_P(v) ||
59  // is this possible?
60  (!v->succ && var_of(v)==TCST && val_of(v)==0);
61 }
void vect_debug(Pvecteur v)
constraint.c
Definition: constraint.c:43
bool vecteur_nul_p(Pvecteur v)
Definition: constraint.c:56
int compare_Pvecteur(Pvecteur *pv1, Pvecteur *pv2)
comparison function for Pvecteur in pips, to be used by qsort.
Definition: constraint.c:50
void vect_fprint(FILE *f, Pvecteur v, get_variable_name_t variable_name)
void vect_fprint(FILE * f, Pvecteur v, char * (*variable_name)()): impression d'un vecteur creux v su...
Definition: io.c:124
const char * entity_local_name(entity e)
entity_local_name modified so that it does not core when used in vect_fprint, since someone thought t...
Definition: entity.c:453
int compare_entities(const entity *pe1, const entity *pe2)
Comparison function for qsort.
Definition: entity.c:1328
le type des coefficients dans les vecteurs: Value est defini dans le package arithmetique
Definition: vecteur-local.h:89
struct Svecteur * succ
Definition: vecteur-local.h:92
#define TCST
VARIABLE REPRESENTANT LE TERME CONSTANT.
#define val_of(varval)
char *(* get_variable_name_t)(Variable)
Definition: vecteur-local.h:62
#define VECTEUR_NUL_P(v)
#define var_of(varval)