PIPS
normalize.c
Go to the documentation of this file.
1 /*
2 
3  $Id: normalize.c 23065 2016-03-02 09:05:50Z coelho $
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 /*
25  * Expression normalization
26  *
27  * Expressions are stored in two different ways: a standard expression
28  * tree (syntax) and, when possible, an affine expression
29  * (normalized_linear). The purpose of normalize.c is to derive the affine
30  * expression from the expression tree, when an affine form exists.
31  *
32  * Expressions are declared as Newgen objects by these two lines:
33  *
34  * expression = syntax x normalized ;
35  * normalized = linear:Pvecteur + complex:unit ;
36  *
37  * The expression tree, often generated by the parsers, is stored in
38  * "syntax". The affine equivalent expression is stored in the linear
39  * field of "normalized". If no equivalent affine expression exists,
40  * "normalized" is of kind "complex".
41  *
42  * The data structure "Pvecteur" is imported from the Linear
43  * library. See the Section "Expressions" in ri.tex.
44  *
45  * Motivation: many analysis and parallelization algorithms are based
46  * on affine expressions. Rather than recomputing the affine forms
47  * each time they are needed, they are store once and for all.
48  *
49  * Consistency: when an expression is modified, its normalized field
50  * must be invalidated.
51  *
52  * Most of the functions here must be changed to static
53  */
54 #ifdef HAVE_CONFIG_H
55  #include "pips_config.h"
56 #endif
57 #include <stdio.h>
58 #include <string.h>
59 #include <limits.h>
60 
61 #include "linear.h"
62 
63 #include "genC.h"
64 #include "ri.h"
65 #include "misc.h"
66 
67 #include "ri-util.h"
68 #include "properties.h"
69 
70 #include "operator.h"
71 
72 /* this function shouldn't be called.
73  * Use macro NORMALIZE_EXPRESSION(e) instead.
74  */
75 
77 {
79 }
80 
82 {
83  normalized n;
84 
86  user_warning("NormalizeExpression",
87  "expression is already normalized\n");
88 
89  n = _NormalizeExpression(e);
90  // expression_normalized(e) = n;
91  return(n);
92 }
93 
95 {
97 
98  switch (syntax_tag(s)) {
101  break;
102  case is_syntax_range:
104  break;
105  case is_syntax_call:
106  n = NormalizeCall((syntax_call(s)));
107  break;
108  case is_syntax_cast:
109  n = NormalizeCast(syntax_cast(s));
110  break;
113  break;
114  case is_syntax_subscript:
116  break;
119  break;
120  case is_syntax_va_arg:
122  break;
123  default:
124  pips_internal_error("cas default");
125  }
126 
127  return(n);
128 }
129 
131 {
133  type ct = cast_type(c);
134  expression cexp = cast_expression(c);
135  type cexpt = expression_to_type(cexp);
136 
137  if (type_equal_p(ct, cexpt))
138  n = NormalizeExpression(cexp);
139  else
141  free_type(cexpt);
142  return(n);
143 }
144 
146 {
148  entity f = call_function(c);
149  value v = entity_initial(f);
150 
151  switch (value_tag(v)) {
152  case is_value_intrinsic:
154  break;
155  case is_value_constant:
157  break;
158  case is_value_symbolic:
159  if(get_bool_property("EVAL_SYMBOLIC_CONSTANT"))
161  else
163  break;
164  case is_value_unknown:
165  case is_value_code:
167  break;
168  default:
169  pips_internal_error("case default");
170  }
171 
172  return(n);
173 }
174 
176 {
177  return((constant_int_p(c)) ?
180 }
181 
183 {
185  entity e = reference_variable(r);
186  type t = entity_type(e);
187 
188  pips_assert("constant term ore is an entity",
190 
191  if (!type_variable_p(t)) {
192  if(type_functional_p(t)) {
193  // FI: we might not want to keep the warning for C code...
194  pips_user_warning("Reference to function \"%s\" cannot be normalized.\n"
195  "Is it an undeclared variable?\n",
196  entity_user_name(e));
198  }
199  else {
200  pips_user_warning("Reference to entity \"%s\" cannot be normalized because of its type tag %d\n",
201  entity_name(e), type_tag(t));
202  pips_user_error("Referenced entity should be a variable!\n");
203  }
204  }
205  else {
206  Variable v = (Variable) e;
207  Value val = VALUE_ONE;
208 
209  /* SG is there any good reason to exclude pointer arithmetic ?*/
210  n = (entity_integer_scalar_p(e) ||
212  ( entity_pointer_p(e) && ENDP(reference_indices(r))) ) ?
214  vect_new(v, val)) :
216  }
217 
218  return n;
219 }
220 
222 {
223  normalized n;
224 
225  if (! top_level_entity_p(e))
227 
228  if (ENTITY_UNARY_MINUS_P(e)) {
230 
231  if (normalized_complex_p(n))
232  return(n);
233 
235  }
236  else if (ENTITY_MINUS_P(e) || ENTITY_MINUS_C_P(e) || ENTITY_PLUS_P(e) || ENTITY_PLUS_C_P(e)) {
237  normalized ng, nd;
238 
240  if (normalized_complex_p(ng))
241  return(ng);
242 
244  if (normalized_complex_p(nd)) {
245  FreeNormalized(ng);
246  return(nd);
247  }
248 
249  n = (ENTITY_PLUS_P(e) || ENTITY_PLUS_C_P(e)) ?
252  normalized_linear(nd))) :
255  normalized_linear(nd)));
256 
257  FreeNormalized(ng);
258  FreeNormalized(nd);
259  }
260  else if (ENTITY_MINUS_UPDATE_P(e) || ENTITY_PLUS_UPDATE_P(e)) {
261  /* There is no point in normalizing ng since this cannot be
262  expressed by a normalized expression */
263  //normalized nd;
264 
265  (void) _NormalizeExpression(EXPRESSION(CAR(CDR(la))));
266  return make_normalized_complex();
267  }
268  else if (ENTITY_MULTIPLY_P(e)) {
269  normalized ng, nd;
270  int val;
271 
273  if (normalized_complex_p(ng))
274  return(ng);
275 
277  if (normalized_complex_p(nd)) {
278  FreeNormalized(ng);
279  return(nd);
280  }
281 
282  if (EvalNormalized(nd, &val)) {
283  FreeNormalized(nd);
284  normalized_linear(n = ng) =
286  }
287  else if (EvalNormalized(ng, &val)) {
288  FreeNormalized(ng);
289  normalized_linear(n = nd) =
291  }
292  else {
293  FreeNormalized(ng);
294  FreeNormalized(nd);
296  }
297  }
298  else if((ENTITY_MIN_P(e) || ENTITY_MIN0_P(e)) && gen_length(la) == 2) {
299  n = binary_to_normalized(la, MINIMUM);
300  }
301  else if((ENTITY_MAX_P(e) || ENTITY_MAX0_P(e)) && gen_length(la) == 2) {
302  n = binary_to_normalized(la, MAXIMUM);
303  }
304  else if(ENTITY_MODULO_P(e)) {
305  n = binary_to_normalized(la, MOD);
306  }
307  else if(ENTITY_DIVIDE_P(e)) {
308  n = binary_to_normalized(la, SLASH);
309  }
310  else if(ENTITY_POWER_P(e)) {
311  n = binary_to_normalized(la, POWER);
312  }
313  else {
315  }
316 
317  return(n);
318 }
319 
321 {
322  normalized ng;
323  normalized nd;
324  normalized n;
325  int val1;
326  int val2;
327  int val = 0; /* initialized to please gcc */
328 
329  pips_assert("binary_to_normalize", gen_length(la) == 2);
330 
332  if (normalized_complex_p(ng))
333  return(ng);
334 
336  if (normalized_complex_p(nd)) {
337  FreeNormalized(ng);
338  return(nd);
339  }
340 
341  if (EvalNormalized(nd, &val2) && EvalNormalized(ng, &val1)) {
342  bool succeed = true;
343 
344  FreeNormalized(nd);
345  FreeNormalized(ng);
346  switch(op) {
347  case MINIMUM:
348  val = MIN(val1, val2);
349  break;
350  case MAXIMUM:
351  val = MAX(val1, val2);
352  break;
353  case MOD:
354  /* FI: the C operator is different from the Fortran operator
355  * for non-positive arguments.
356  */
357  if(val2==0) {
358  user_error("binary_to_normalize",
359  "0 divide in modulo evaluation\n");
360  }
361  else {
362  val = val1%val2;
363  }
364  break;
365  case SLASH:
366  /* FI: the C operator is different from the Fortran operator
367  * for non-positive arguments.
368  */
369  if(val2==0) {
370  user_error("binary_to_normalize",
371  "0 divide\n");
372  }
373  else {
374  val = val1/val2;
375  }
376  break;
377  case POWER:
378  if(val2<0) {
379  succeed = false;
380  }
381  else {
382  val = ipow(val1,val2);
383  }
384  break;
385  default:
386  pips_internal_error("Unknown binary operator %d", op);
387  }
388  if(succeed) {
390  vect_new(TCST, val));
391  }
392  else {
394  }
395  }
396  else {
397  FreeNormalized(ng);
398  FreeNormalized(nd);
400  }
401  return n;
402 }
403 
404 bool EvalNormalized(n, pv)
405 normalized n;
406 int *pv;
407 {
408  if (normalized_linear_p(n)) {
410  if (vect_size(v) == 1 && var_of(v) == TCST) {
411  *pv = VALUE_TO_INT(val_of(v));
412  return(true);
413  }
414  }
415 
416  return(false);
417 }
418 
420 normalized n;
421 {
422  /* FI: theoretically, free_normalized() performs the next three lines... */
423  if (normalized_linear_p(n)) {
425  normalized_linear_(n) = NULL;
426  }
427 
428  free_normalized(n);
429  /* gen_free(n); */
430 }
431 
433 expression e;
434 {
436 
438  FreeNormalized(n);
440  }
441 }
442 
443 /* void unnormalize_expression(expression exp): puts all the normalized
444  * field of expressions in "st" to undefined and does the unnormalization recursively
445  *
446  * This is very useful when you combine expressions. It prohibits
447  * unnormalized expressions with normalized sub-expressions.
448  *
449  * FI: any chunk* can be passed;
450  * this function could be applied to an expression
451  */
452 void unnormalize_expression(void * st)
453 {
456  gen_true,
458  NULL);
459 }
460 
462 {
463  normalized n;
464  Pvecteur v;
465 
466  /* As long as VECTEUR_UNDEFINED is not different from VECTEUR_NUL
467  this routine cannot be used safely; either 0 will be considered
468  not linear or every non linear expression will be equal to 0 */
469 
470  /* should it also perform the conversion from variable entities
471  to new value entities? */
472 
474  n = _NormalizeExpression(e);
475  else
476  n = expression_normalized(e);
477 
478  if(normalized_linear_p(n))
480  else
481  v = VECTEUR_UNDEFINED;
482 
483  return v;
484 }
485 
486 
487 /* -----------------------------------------------------------
488  *
489  * New Stuff to normalize all expressions - bottom-up
490  *
491  * FC 09/06/94
492  */
493 
494 static bool normalized_constant_p(normalized n, int *pv)
495 {
496  if (normalized_linear_p(n))
497  {
499  int length = vect_size(v);
500 
501  if (length==0)
502  {
503  *pv=0;
504  return true;
505  }
506  else if (length==1 && var_of(v)==TCST)
507  {
508  *pv=VALUE_TO_INT(val_of(v));
509  return true;
510  }
511  }
512 
513  return false;
514 }
515 
516 static normalized
518  entity f,
519  list la)
520 {
521  bool minus;
522 
523  if (! top_level_entity_p(f))
525 
526  if (ENTITY_UNARY_MINUS_P(f))
527  {
528  Pvecteur tmp = VECTEUR_NUL;
530 
531  return(normalized_complex_p(n) ?
534  (vect_chg_sgn(tmp=vect_dup(normalized_linear(n))), tmp)));
535  }
536  /* else */
537  if ((minus=ENTITY_MINUS_P(f)) || (ENTITY_PLUS_P(f)))
538  {
539  normalized
542  Pvecteur (*operation)() = minus ? vect_substract : vect_add;
543 
545 
548  /* else */
550  operation(normalized_linear(n1),
551  normalized_linear(n2))));
552  }
553  /* else */
554  if (ENTITY_MULTIPLY_P(f))
555  {
556  normalized
559  bool b1, b2;
560  int i1, i2;
561  Pvecteur v;
562 
565  /* else */
566  b1 = normalized_constant_p(n1, &i1),
567  b2 = normalized_constant_p(n2, &i2);
568 
569  if (! (b1 || b2)) return(make_normalized(is_normalized_complex, UU));
570 
571  /* else multiply (caution: vect_multiply does not allocate...)
572  */
574 
576  vect_multiply(v, b1 ? i1 : i2)));
577  }
578  /* else */
580 }
581 
582 static normalized
584 {
585  return((constant_int_p(c)) ?
587  vect_new(TCST, constant_int(c))) :
589 }
590 
593 {
594  entity var = reference_variable(r);
595 
596  pips_assert("The entity var is a variable", entity_variable_p(var));
597 
598  return(entity_integer_scalar_p(var) ?
601 }
602 
603 static normalized
605 {
607  entity f = call_function(c);
608  value v = entity_initial(f);
609  tag t = value_tag(v);
610 
611  switch (t)
612  {
613  case is_value_intrinsic:
615  break;
616  case is_value_constant:
618  break;
619  case is_value_symbolic:
621  break;
622  case is_value_unknown:
623  case is_value_code:
625  break;
626  default:
627  pips_internal_error("unexpected value tag (%d)", t);
628  }
629 
630  return(n);
631 }
632 
633 /* Look for affine expressions and encode them as vectors when
634  possible */
636 {
637  syntax s = expression_syntax(e);
638  tag t = syntax_tag(s);
639 
642 
643  switch(t) {
644  case is_syntax_range:
646  break;
647  case is_syntax_reference:
649  break;
650  case is_syntax_call:
651  n = normalize_call(syntax_call(s));
652  break;
653  case is_syntax_cast:
655  case is_syntax_subscript:
657  case is_syntax_va_arg:
659  break;
660  default:
662  pips_internal_error("undefined syntax tag (%d)", t);
663  }
664  expression_normalized(e) = n;
665  }
666 }
667 
669 {
671  NULL);
672 }
673 
674 /* ---------------------------------------------------------------------
675  *
676  * the first expressions encountered are normalized
677  */
678 
680 {
682  {
683  // FI: to avoid cycles betwen librairies ri-util and prettyprint
684  /* normalized */
685  /* n = NORMALIZE_EXPRESSION(e); */
686  /* ifdebug(8) */
687  /* fprintf(stderr, "[NormExpr] result (%p)\n", n), */
688  /* print_expression(e); */
689  }
690 
691  return false;
692 }
693 
695 {
696  gen_multi_recurse(obj,
699  gen_null,
700  NULL);
701 }
702 
703 /* that is all
704  */
void free_normalized(normalized p)
Definition: ri.c:1407
normalized make_normalized(enum normalized_utype tag, void *val)
Definition: ri.c:1447
normalized make_normalized_linear(Pvecteur _field_)
Definition: ri.c:1450
void free_type(type p)
Definition: ri.c:2658
normalized make_normalized_complex(void)
Definition: ri.c:1453
#define VALUE_TO_INT(val)
#define MIN(x, y)
minimum and maximum if they are defined somewhere else, they are very likely to be defined the same w...
int Value
#define VALUE_ONE
bool get_bool_property(const string)
FC 2015-07-20: yuk, moved out to prevent an include cycle dependency include "properties....
void gen_multi_recurse(void *o,...)
Multi recursion visitor function.
Definition: genClib.c:3428
void gen_null(__attribute__((unused)) void *unused)
Ignore the argument.
Definition: genClib.c:2752
bool gen_true(__attribute__((unused)) gen_chunk *unused)
Return true and ignore the argument.
Definition: genClib.c:2780
#define ENDP(l)
Test if a list is empty.
Definition: newgen_list.h:66
size_t gen_length(const list l)
Definition: list.c:150
#define CAR(pcons)
Get the value of the first element of a list.
Definition: newgen_list.h:92
#define CDR(pcons)
Get the list less its first element.
Definition: newgen_list.h:111
int vect_size(Pvecteur v)
package vecteur - reductions
Definition: reductions.c:47
#define pips_user_warning
Definition: misc-local.h:146
#define pips_assert(what, predicate)
common macros, two flavors depending on NDEBUG
Definition: misc-local.h:172
#define pips_internal_error
Definition: misc-local.h:149
#define user_error(fn,...)
Definition: misc-local.h:265
#define user_warning(fn,...)
Definition: misc-local.h:262
#define pips_user_error
Definition: misc-local.h:147
#define assert(ex)
Definition: newgen_assert.h:41
int tag
TAG.
Definition: newgen_types.h:92
#define UU
Definition: newgen_types.h:98
int f(int off1, int off2, int n, float r[n], float a[n], float b[n])
Definition: offsets.c:15
#define POWER
Definition: operator.h:46
#define MAXIMUM
Definition: operator.h:50
#define MINIMUM
Definition: operator.h:49
#define MOD
Definition: operator.h:47
static void norm_all_rewrite(expression e)
Look for affine expressions and encode them as vectors when possible.
Definition: normalize.c:635
Pvecteur expression_to_affine(expression e)
Definition: normalize.c:461
normalized NormalizeCall(call c)
Definition: normalize.c:145
normalized NormalizeReference(reference r)
Definition: normalize.c:182
void normalize_all_expressions_of(void *obj)
Definition: normalize.c:668
static normalized normalize_intrinsic(entity f, list la)
Definition: normalize.c:517
static normalized normalize_call(call c)
Definition: normalize.c:604
normalized NormalizeIntrinsic(entity e, list la)
Definition: normalize.c:221
normalized binary_to_normalized(list la, int op)
Definition: normalize.c:320
normalized normalize_reference(reference r)
Definition: normalize.c:592
normalized NormalizeCast(cast c)
Definition: normalize.c:130
void normalize_first_expressions_of(void *obj)
Definition: normalize.c:694
bool EvalNormalized(normalized n, int *pv)
Definition: normalize.c:404
normalized NormalizeSyntax(syntax s)
Definition: normalize.c:94
static normalized normalize_constant(constant c)
Definition: normalize.c:583
static bool normalized_constant_p(normalized n, int *pv)
Definition: normalize.c:494
normalized NormalizeExpression(expression e)
normalize.c
Definition: normalize.c:81
static bool normalize_first_expressions_filter(expression e)
Definition: normalize.c:679
void free_expression_normalized(expression e)
Definition: normalize.c:432
normalized NormalizeConstant(constant c)
Definition: normalize.c:175
static normalized _NormalizeExpression(expression e)
this function shouldn't be called.
Definition: normalize.c:76
void unnormalize_expression(void *st)
void unnormalize_expression(expression exp): puts all the normalized field of expressions in "st" to ...
Definition: normalize.c:452
void FreeNormalized(normalized n)
Definition: normalize.c:419
#define ENTITY_PLUS_UPDATE_P(e)
#define ENTITY_DIVIDE_P(e)
#define ENTITY_POWER_P(e)
#define ENTITY_MAX0_P(e)
#define ENTITY_MINUS_P(e)
#define ENTITY_UNARY_MINUS_P(e)
#define ENTITY_PLUS_P(e)
#define ENTITY_MULTIPLY_P(e)
#define ENTITY_PLUS_C_P(e)
#define ENTITY_MAX_P(e)
#define entity_variable_p(e)
An entity_variable_p(e) may hide a typedef and hence a functional type.
#define ENTITY_MINUS_C_P(e)
#define ENTITY_MIN0_P(e)
#define ENTITY_MIN_P(e)
#define ENTITY_MINUS_UPDATE_P(e)
#define ENTITY_MODULO_P(e)
const char * entity_user_name(entity e)
Since entity_local_name may contain PIPS special characters such as prefixes (label,...
Definition: entity.c:487
bool entity_enum_variable_p(entity e)
Definition: entity.c:992
bool top_level_entity_p(entity e)
Check if the scope of entity e is global.
Definition: entity.c:1130
bool entity_pointer_p(entity e)
Definition: entity.c:745
int ipow(int vg, int vd)
FI: such a function should exist in Linear/arithmetique.
Definition: eval.c:769
type expression_to_type(expression)
For an array declared as int a[10][20], the type returned for a[i] is int [20].
Definition: type.c:2486
bool type_equal_p(type, type)
Definition: type.c:547
bool entity_integer_scalar_p(entity)
for variables (like I), not constants (like 1)! use integer_constant_p() for constants
Definition: variable.c:1130
#define type_functional_p(x)
Definition: ri.h:2950
#define value_tag(x)
Definition: ri.h:3064
#define normalized_linear_(x)
Definition: ri.h:1780
#define normalized_undefined
Definition: ri.h:1745
#define expression_domain
newgen_execution_domain_defined
Definition: ri.h:154
#define value_constant(x)
Definition: ri.h:3073
#define syntax_reference(x)
Definition: ri.h:2730
#define syntax_tag(x)
Definition: ri.h:2727
#define normalized_complex_p(x)
Definition: ri.h:1782
#define normalized_linear_p(x)
Definition: ri.h:1779
#define call_function(x)
Definition: ri.h:709
#define reference_variable(x)
Definition: ri.h:2326
#define type_tag(x)
Definition: ri.h:2940
#define symbolic_constant(x)
Definition: ri.h:2599
#define constant_int(x)
Definition: ri.h:850
#define syntax_cast(x)
Definition: ri.h:2739
@ is_value_intrinsic
Definition: ri.h:3034
@ is_value_unknown
Definition: ri.h:3035
@ is_value_constant
Definition: ri.h:3033
@ is_value_code
Definition: ri.h:3031
@ is_value_symbolic
Definition: ri.h:3032
@ is_syntax_range
Definition: ri.h:2692
@ is_syntax_application
Definition: ri.h:2697
@ is_syntax_cast
Definition: ri.h:2694
@ is_syntax_call
Definition: ri.h:2693
@ is_syntax_va_arg
Definition: ri.h:2698
@ is_syntax_reference
Definition: ri.h:2691
@ is_syntax_sizeofexpression
Definition: ri.h:2695
@ is_syntax_subscript
Definition: ri.h:2696
#define value_symbolic(x)
Definition: ri.h:3070
#define EXPRESSION(x)
EXPRESSION.
Definition: ri.h:1217
#define cast_expression(x)
Definition: ri.h:747
#define constant_int_p(x)
Definition: ri.h:848
#define entity_name(x)
Definition: ri.h:2790
#define expression_normalized(x)
Definition: ri.h:1249
#define reference_indices(x)
Definition: ri.h:2328
#define syntax_call(x)
Definition: ri.h:2736
#define cast_type(x)
Definition: ri.h:745
#define call_arguments(x)
Definition: ri.h:711
#define normalized_undefined_p(x)
Definition: ri.h:1746
#define entity_type(x)
Definition: ri.h:2792
#define normalized_linear(x)
Definition: ri.h:1781
#define expression_syntax(x)
Definition: ri.h:1247
#define entity_domain_number(x)
Definition: ri.h:2788
#define type_variable_p(x)
Definition: ri.h:2947
#define entity_domain
newgen_syntax_domain_defined
Definition: ri.h:410
@ is_normalized_linear
Definition: ri.h:1760
@ is_normalized_complex
Definition: ri.h:1761
#define entity_initial(x)
Definition: ri.h:2796
Value b2
Definition: sc_gram.c:105
Value b1
booleen indiquant quel membre est en cours d'analyse
Definition: sc_gram.c:105
void vect_chg_sgn(Pvecteur v)
void vect_chg_sgn(Pvecteur v): multiplie v par -1
Definition: scalaires.c:151
Pvecteur vect_multiply(Pvecteur v, Value x)
Pvecteur vect_multiply(Pvecteur v, Value x): multiplication du vecteur v par le scalaire x,...
Definition: scalaires.c:123
#define MAX(x, y)
Definition: string.c:110
le type des coefficients dans les vecteurs: Value est defini dans le package arithmetique
Definition: vecteur-local.h:89
The structure used to build lists in NewGen.
Definition: newgen_list.h:41
#define TCST
VARIABLE REPRESENTANT LE TERME CONSTANT.
#define val_of(varval)
#define VECTEUR_NUL
DEFINITION DU VECTEUR NUL.
#define VECTEUR_UNDEFINED
struct Svecteur * Pvecteur
void * Variable
arithmetique is a requirement for vecteur, but I do not want to inforce it in all pips files....
Definition: vecteur-local.h:60
#define var_of(varval)
Pvecteur vect_dup(Pvecteur v_in)
Pvecteur vect_dup(Pvecteur v_in): duplication du vecteur v_in; allocation de et copie dans v_out;.
Definition: alloc.c:51
Pvecteur vect_new(Variable var, Value coeff)
Pvecteur vect_new(Variable var,Value coeff): allocation d'un vecteur colineaire au vecteur de base va...
Definition: alloc.c:110
void vect_rm(Pvecteur v)
void vect_rm(Pvecteur v): desallocation des couples de v;
Definition: alloc.c:78
Pvecteur vect_add(Pvecteur v1, Pvecteur v2)
package vecteur - operations binaires
Definition: binaires.c:53
Pvecteur vect_substract(Pvecteur v1, Pvecteur v2)
Pvecteur vect_substract(Pvecteur v1, Pvecteur v2): allocation d'un vecteur v dont la valeur est la di...
Definition: binaires.c:75
#define SLASH