PIPS
prettyprint.c
Go to the documentation of this file.
1 /*
2 
3  $Id: prettyprint.c 22777 2015-08-23 20:56:50Z irigoin $
4 
5  Copyright 1989-2009 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  * (prettyg)print of POINTS TO.
26  *
27  * AM, August 2009.
28  */
29 #ifdef HAVE_CONFIG_H
30  #include "pips_config.h"
31 #endif
32 #include <stdlib.h>
33 #include <stdio.h>
34 #include <string.h>
35 
36 #include "genC.h"
37 
38 #include "text.h"
39 #include "text-util.h"
40 
41 #include "top-level.h"
42 
43 #include "linear.h"
44 #include "ri.h"
45 #include "effects.h"
46 #include "points_to_private.h"
47 
48 #include "ri-util.h"
49 #include "prettyprint.h"
50 #include "pipsdbm.h"
51 #include "workspace-util.h"
52 #include "effects-util.h"
53 
54 #include "database.h"
55 #include "resources.h"
56 #include "properties.h"
57 //#include "preprocessor.h"
58 #include "misc.h"
59 
60 
61 
62 /************* EFFECT REFERENCES */
63 
64 /* made from words_reference
65  * this function can print entity_name instead of entity_local_name,
66  * when the entity is not called in the current program.
67  */
69 {
70  list pc = NIL;
71  string begin_attachment;
72  entity e = reference_variable(obj);
73 
74  if (get_bool_property("PRETTYPRINT_WITH_COMMON_NAMES")
75  && entity_in_common_p(e)) {
77  } else if (get_bool_property("PRETTYPRINT_EFFECT_WITH_FULL_ENTITY_NAME")) {
78  pc = CHAIN_SWORD(pc, entity_name(e));
79  } else {
80  pc = CHAIN_SWORD(pc, entity_minimal_name(e));
81  }
82 
83  begin_attachment = STRING(CAR(pc));
84 
85  if (reference_indices(obj) != NIL)
86  {
87  string before_first_index = string_undefined;
88  string before_index = string_undefined;
89  string after_index = string_undefined;
90  string after_last_index = string_undefined;
91  string before_field = string_undefined;
92  string after_field = string_undefined;
93 
95  {
98  before_first_index = "(";
99  before_index = "";
100  after_index = ",";
101  after_last_index = ")";
102  before_field = "";
103  after_field = "";
104  break;
105  case is_language_c:
106  before_first_index = "[";
107  before_index = "[";
108  after_index = "]";
109  after_last_index = "]";
110  before_field = ".";
111  after_field = "";
112  break;
113  default:
114  pips_internal_error("Language unknown !");
115  break;
116  }
117 
118  bool first = true;
119  for(list pi = reference_indices(obj); !ENDP(pi); POP(pi))
120  {
121  expression ind_exp = EXPRESSION(CAR(pi));
122  syntax s = expression_syntax(ind_exp);
123  if (syntax_reference_p(s) &&
125  {
126  // add a '.' to disambiguate field names from variable names
127  pc = CHAIN_SWORD(pc, before_field);
128  pc = gen_nconc(pc, Words_Expression(ind_exp));
129  pc = CHAIN_SWORD(pc, after_field);
130  }
131  else
132  {
133  if (first)
134  {
135  pc = CHAIN_SWORD(pc,before_first_index);
136  first = false;
137  }
138  else
139  pc = CHAIN_SWORD(pc,before_index);
140 
141  pc = gen_nconc(pc, Words_Expression(ind_exp));
142  if (CDR(pi) != NIL)
143  pc = CHAIN_SWORD(pc,after_index);
144  else
145  pc = CHAIN_SWORD(pc,after_last_index);
146  }
147  }
148  }
149 
150  attach_reference_to_word_list(begin_attachment, STRING(CAR(gen_last(pc))),
151  obj);
152  return(pc);
153 }
154 
156 {
158 }
159 
160 /************* CELL DESCRIPTORS */
161 
162 /* char * pips_region_user_name(entity ent)
163  * output : the name of entity.
164  * modifies : nothing.
165  * comment : allows to "catch" the PHIs entities, else, it works like
166  * pips_user_value_name() (see semantics.c).
167  */
168 const char *
170 {
171  /* external_value_name cannot be used because there is no need for
172  the #new suffix, but the #old one is necessary */
173  const char* name;
174  if(ent == NULL)
175  /* take care of the constant term TCST */
176  name = "";
177  else {
178  char *ent_name = entity_name(ent);
179 
180  if (strncmp(ent_name, REGIONS_MODULE_NAME, 7) == 0)
181  /* ent is a PHI entity from the regions module */
182  name = entity_local_name(ent);
183  else
184  {
185  /* if (!hash_entity_to_values_undefined_p() && !entity_has_values_p(ent)) */
186 /* name = external_value_name(ent); */
187 /* else */
188  name = entity_minimal_name(ent);
189  }
190  }
191 
192  return name;
193 }
194 
195 
196 
197 /********** POINTS_TO *************/
198 
199 
200 
201 #define PT_TO_SUFFIX ".points_to"
202 #define PT_TO_DECO "points to = "
203 #define SUMMARY_PT_TO_SUFFIX ".summary_points_to"
204 #define SUMMARY_PT_TO_DECO "summary points to = "
205 
206 /*Already exist in cprettyprint but in mode static. To be removed later.*/
207 static bool variable_p(entity e)
208 {
209  return type_undefined_p(entity_type(e));
210 }
211 
212 /* To modelize the heap locations we manufacture fictious reference,
213  * that triggered a bug when it appears as an argument of entity_user_name(). */
214 list
216 {
217  list pc = NIL;
218  entity e = reference_variable(obj);
219  pc = CHAIN_SWORD(pc, entity_name(e));
220  return(pc);
221 }
222 
223 #if 0
224 /* For debugging points-to: use this function in points_to_words_reference() */
225 static string entity_full_name(entity e)
226 {
227  return entity_name(e);
228 }
229 #endif
230 
231 /* Specific handling of references appearing in points_to */
233 {
234  extern const char* entity_minimal_user_name(entity);
235 
236  // Normal implementation, used for validation:
238  // To ease debugging, use:
239  //return words_any_reference(r, NIL, entity_full_name);
240 }
241 
243 {
244  list l2 = NIL, l1 = NIL, rlt1 = NIL;
245 
246  pips_assert("pt is defined", !points_to_undefined_p(pt));
248  cell c1 = points_to_source(pt);
249  cell c2 = points_to_sink(pt);
250  // FI->AM: check all your copy_xxxx(); you often copy a large object
251  // to obtain a small part of it
252  reference r1 = cell_to_reference(c1);
253  reference r2 = cell_to_reference(c2);
255  string l3 = "-MAY-";
256 
257  if (approximation_exact_p(rel))
258  l3 = "-Exact-";
260  l2 = words_fictious_reference(r2);
261  else
262  l2 = points_to_words_reference(r2);
263 
264  l1 = points_to_words_reference(r1);
265 
266  rlt1 = gen_nconc((CONS(STRING,strdup("("), NIL)),l1);
267  rlt1 = gen_nconc(rlt1,(CONS(STRING,strdup(","), NIL)));
268 
269  rlt1 = gen_nconc(rlt1, l2);
270  rlt1 = gen_nconc(rlt1,(CONS(STRING,strdup(","), NIL)));
271  rlt1 = gen_nconc(rlt1,(CONS(STRING,strdup(l3), NIL)));
272  rlt1 = gen_nconc(rlt1,(CONS(STRING,strdup(")"), NIL)));
273  return rlt1;
274 }
275 
276 /* Comparison of two points-to arcs based on their source and sink nodes.
277  *
278  * This comparison function is used to sort a list of points-to before
279  * storage and print-out.
280  *
281  * It must return -1, 0 or 1 like strcmp(). It should avoid 0 because
282  * we want a total order to avoid validation problems. Hence the
283  * exploitation of the references, number of indices, subscript
284  * expressions, etc. if the entity names are not sufficient to
285  * disambiguate the references.
286  *
287  * When subscript expressions are used, fields are replaced by the
288  * corresponding field number. So the sort is based on the field ranks
289  * in the data structure and not on the the field names.
290  *
291  * For abstract locations, the local name is used for the sort and the
292  * global names is sometimes used in the prettyprint. Hence, the
293  * alphabetical order is not obvious in the print-out.
294  */
295 int points_to_compare_cells(const void * vpt1, const void * vpt2)
296 {
297  int i = 0;
298 
299  points_to pt1 = *((points_to *) vpt1);
300  points_to pt2 = *((points_to *) vpt2);
301 
302  cell c1so = points_to_source(pt1);
303  cell c2so = points_to_source(pt2);
304  cell c1si = points_to_sink(pt1);
305  cell c2si = points_to_sink(pt2);
306 
307  //cell c1 = CELL(CAR(vc1));
308  //cell c2 = CELL(CAR(vc2));
309  // FI: bypass of GAP case
310  reference r1so = cell_to_reference(c1so);
311  reference r2so = cell_to_reference(c2so);
312  reference r1si = cell_to_reference(c1si);
313  reference r2si = cell_to_reference(c2si);
314 
315  entity v1so = reference_variable(r1so);
316  entity v2so = reference_variable(r2so);
317  entity v1si = reference_variable(r1si);
319  list sl1 = NIL, sl2 = NIL, sli1 = NIL, sli2 = NIL ;
320  // FI: memory leak? generation of a new string?
321  extern const char* entity_minimal_user_name(entity);
322  string n1so = entity_abstract_location_p(v1so)?
324  string n2so = entity_abstract_location_p(v2so)?
326  string n1si = entity_abstract_location_p(v1si)?
328  string n2si = entity_abstract_location_p(v2si)?
330 
331  i = strcmp(n1so, n2so);
332  if(i==0) {
333  i = strcmp(n1si, n2si);
334  if(i==0) {
335  sl1 = reference_indices(r1so);
336  sl2 = reference_indices(r2so);
337  int i1 = gen_length(sl1);
338  int i2 = gen_length(sl2);
339 
340  i = i2>i1? 1 : (i2<i1? -1 : 0);
341 
342  if(i==0) {
343  sli1 = reference_indices(r1si);
344  sli2 = reference_indices(r2si);
345  int i1 = gen_length(sli1);
346  int i2 = gen_length(sli2);
347 
348  i = i2>i1? 1 : (i2<i1? -1 : 0);
349  // if(i==0) {
350  for(;i==0 && !ENDP(sl1); POP(sl1), POP(sl2)){
351  expression se1 = EXPRESSION(CAR(sl1));
352  expression se2 = EXPRESSION(CAR(sl2));
354  int i1 = expression_to_int(se1);
355  int i2 = expression_to_int(se2);
356  i = i2>i1? -11 : (i2<i1? 1 : 0);
357  } else {
358  string s1 = expression_to_string(se1);
359  string s2 = expression_to_string(se2);
360  i = strcmp(s1, s2);
361  }
362  }
363  // if(i==0) {
364  // i = strcmp(entity_minimal_user_name(v1si), entity_minimal_user_name(v2si));
365  for(;i==0 && !ENDP(sli1); POP(sli1), POP(sli2)){
366  expression sei1 = EXPRESSION(CAR(sli1));
367  expression sei2 = EXPRESSION(CAR(sli2));
368  if(expression_constant_p(sei1) && expression_constant_p(sei2)){
369  int i1 = expression_to_int(sei1);
370  int i2 = expression_to_int(sei2);
371  i = i2>i1? -1 : (i2<i1? 1 : 0);
372  } else {
373  // FI: memory leak?
374  string s1 = expression_to_string(sei1);
375  string s2 = expression_to_string(sei2);
376  i = strcmp(s1, s2);
377  }
378  }
379  }
380  }
381  }
382  // }
383  return i;
384 }
385 
386 /* Allocate a copy of ptl and sort it. It might be better to admit a
387  side effect on ptl and to let the caller copy the liste before
388  sorting. */
390 {
391  list sptl = gen_full_copy_list(ptl);
392 
393  gen_sort_list(sptl, /* (gen_cmp_func_t) */ points_to_compare_cells);
394 
395  return sptl;
396 }
397 
398 //extern void print_points_to(
399 /* Make sure that points-to are fully ordered before prettyprinting
400  them or validation will be in trouble sooner or later. The sort
401  could occur before storing the points-to information into the hash
402  table or just before prettypriting it. */
404 {
405  list l = NIL;
406  int i = 0;
407  list ptl = points_to_list_list(s);
408  list sptl = points_to_list_sort(ptl);
409 
410  FOREACH(POINTS_TO, j, sptl) {
411  if(i>0)
412  l = gen_nconc(l, (CONS(STRING,strdup(";"), NIL)));
413  else
414  i++;
415  l = gen_nconc(l,word_points_to(j));
416  }
417  l = CONS(STRING,strdup("{"), l);
418  l = gen_nconc(l,(CONS(STRING,strdup("}"), NIL)));
419 
420  gen_full_free_list(sptl);
421 
422  return l;
423 }
424 
425 
426 /************* POINTER VALUES */
427 
429 {
430  cell first_c = cell_relation_first_cell(pv);
431  cell second_c = cell_relation_second_cell(pv);
432 
433  pips_assert("there should not be preference cells in pointer values (first) \n",
434  !cell_preference_p(first_c));
435  pips_assert("there should not be preference cells in pointer values (second) \n",
436  !cell_preference_p(second_c));
437 
438  pips_assert("gaps not handled yet (first)", !cell_gap_p(first_c));
439  pips_assert("gaps not handled yet (second)", !cell_gap_p(second_c));
440 
441  pips_assert("the first cell must have value_of interpretation\n",
443 
444  list w = NIL;
445 
446  reference first_r = cell_reference(first_c);
447  reference second_r = cell_reference(second_c);
449  pips_assert("approximation is not must\n", !approximation_exact_p(ap));
450 
451  w= gen_nconc(w, effect_words_reference(first_r));
452  w = CHAIN_SWORD(w," == ");
453  w= gen_nconc(w, effect_words_reference(second_r));
454  w = CHAIN_SWORD(w, approximation_may_p(ap) ? " (may)" : " (exact)" );
455  return (w);
456 }
457 
459 {
460  string as = string_undefined;
461  if(approximation_may_p(a))
462  as = "may";
463  else if(approximation_must_p(a))
464  as = "must"; // could be "exact"
465  else if(approximation_exact_p(a))
466  as = "exact";
467  else
468  pips_internal_error("Unknown approximation tag.\n");
469  return as;
470 }
471 
472 #define append(s) add_to_current_line(line_buffer, s, str_prefix, tpv)
473 
474 /* text text_region(effect reg)
475  * input : a region
476  * output : a text consisting of several lines of commentaries,
477  * representing the region
478  * modifies : nothing
479  */
481 {
482  text tpv = text_undefined;
483 
484  bool foresys = false;
485  string str_prefix = get_comment_continuation();
487  Psysteme sc;
488  list /* of string */ ls;
489 
491  {
492  ifdebug(1)
493  {
494  return make_text(CONS(SENTENCE,
496  strdup(concatenate(str_prefix,
497  "undefined pointer value\n",
498  NULL))),
499  NIL));
500  }
501  else
502  pips_user_warning("unexpected pointer value undefined\n");
503  }
504  else
505  tpv = make_text(NIL);
506 
507  cell first_c = cell_relation_first_cell(pv);
508  cell second_c = cell_relation_second_cell(pv);
509 
510  pips_assert("there should not be preference cells in pointer values (first) \n",
511  !cell_preference_p(first_c));
512  pips_assert("there should not be preference cells in pointer values (second) \n",
513  !cell_preference_p(second_c));
514 
515  pips_assert("gaps not handled yet (first)", !cell_gap_p(first_c));
516  pips_assert("gaps not handled yet (second)", !cell_gap_p(second_c));
517 
518  pips_assert("the first cell must have value_of interpretation\n",
520 
521 
522  reference first_r = cell_reference(first_c);
523  reference second_r = cell_reference(second_c);
526 
527  /* PREFIX
528  */
530  append(" ");
531 
532  /* REFERENCES */
533  ls = effect_words_reference(first_r);
534 
535  FOREACH(STRING, s, ls) {append(s);}
536  gen_free_string_list(ls); ls = NIL;
537 
538  append(" == ");
539 
540  ls = effect_words_reference(second_r);
542  append("&");
543 
544  FOREACH(STRING, s, ls) {append(s);}
545  gen_free_string_list(ls); ls = NIL;
546 
547  /* DESCRIPTOR */
548  /* sorts in such a way that constraints with phi variables come first.
549  */
550  if(!descriptor_none_p(d))
551  {
552  sc = sc_copy(descriptor_convex(d));
554  system_sorted_text_format(line_buffer, str_prefix, tpv, sc,
556  vect_contains_phi_p, foresys);
557  sc_rm(sc);
558  }
559 
560  /* APPROXIMATION */
561  append(approximation_may_p(ap) ? " (may);" : " (exact);");
562 
563  /* CLOSE */
564  close_current_line(line_buffer, tpv,str_prefix);
565 
566  return tpv;
567 }
568 
569 
570 text
571 text_pointer_values(list lpv, string header)
572 {
573  text tpv = make_text(NIL);
574  /* in case of loose_prettyprint, at least one region to print? */
575  bool loose_p = get_bool_property("PRETTYPRINT_LOOSE");
576 
577  /* GO: No redundant test anymore, see text_statement_array_regions */
578  if (lpv != (list) HASH_UNDEFINED_VALUE && lpv != list_undefined)
579  {
580  /* header first */
582  string str_prefix = get_comment_continuation();
583  if (loose_p)
584  {
585  strcpy(line_buffer,"\n");
587  }
588  else
589  {
591  }
592  append(" ");
593  append(header);
594  if(ENDP(lpv))
595  append(" none\n");
596  else
597  append("\n");
600  strdup(line_buffer)));
601  gen_sort_list(lpv, (int (*)(const void *,const void *)) pointer_value_compare);
602  FOREACH(CELL_RELATION, pv, lpv)
603  {
605  }
606 
607  if (loose_p)
610  strdup("\n")));
611  }
612  return tpv;
613 }
614 
616 {
617  text t = text_pointer_value(pv);
618  print_text(stderr, t);
619  free_text(t);
620 }
621 
623 {
624  fprintf(stderr,"\n");
625  if (ENDP(lpv))
626  fprintf(stderr,"<none>");
627  else
628  {
629  FOREACH(CELL_RELATION, pv, lpv)
630  {
632  }
633  }
634  fprintf(stderr,"\n");
635 }
__m64 v2si
Definition: 3dnow.h:7
bool points_to_consistent_p(points_to p)
sentence make_sentence(enum sentence_utype tag, void *val)
Definition: text.c:59
text make_text(list a)
Definition: text.c:107
void free_text(text p)
Definition: text.c:74
static reference ref
Current stmt (an integer)
Definition: adg_read_paf.c:163
bool entity_abstract_location_p(entity al)
void attach_reference_to_word_list(string begin_word, string end_word, reference r)
Attach a module usage (CALL or function call):
int is_inferior_cell_descriptor_pvarval(Pvecteur *pvarval1, Pvecteur *pvarval2)
weight function for Pvecteur passed as argument to sc_lexicographic_sort in prettyprint functions inv...
Definition: compare.c:305
int pointer_value_compare(cell_relation *ppv1, cell_relation *ppv2)
Compares two pointer values for sorting.
Definition: compare.c:255
void system_sorted_text_format(string line, string prefix, text txt, Psysteme ps, string(*variable_name)(Variable), bool(*put_first)(Pvecteur), bool a_la_fortran)
lower level hook for regions.
#define cell_relation_second_cell(cr)
#define cell_relation_second_address_of_p(cr)
#define cell_relation_first_cell(cr)
#define cell_relation_first_value_of_p(cr)
static bool variable_p(entity e)
lready exist in cprettyprint but in mode static.
Definition: prettyprint.c:207
int points_to_compare_cells(const void *vpt1, const void *vpt2)
Comparison of two points-to arcs based on their source and sink nodes.
Definition: prettyprint.c:295
void print_pointer_values(list lpv)
Definition: prettyprint.c:622
string approximation_to_string(approximation a)
Definition: prettyprint.c:458
text text_pointer_value(cell_relation pv)
text text_region(effect reg) input : a region output : a text consisting of several lines of commenta...
Definition: prettyprint.c:480
void print_pointer_value(cell_relation pv)
Definition: prettyprint.c:615
list effect_words_reference(reference obj)
made from words_reference this function can print entity_name instead of entity_local_name,...
Definition: prettyprint.c:68
list words_fictious_reference(reference obj)
To modelize the heap locations we manufacture fictious reference, that triggered a bug when it appear...
Definition: prettyprint.c:215
list word_points_to(points_to pt)
Definition: prettyprint.c:242
text text_pointer_values(list lpv, string header)
Definition: prettyprint.c:571
string effect_reference_to_string(reference ref)
Definition: prettyprint.c:155
list points_to_words_reference(reference r)
Specific handling of references appearing in points_to.
Definition: prettyprint.c:232
const char * pips_region_user_name(entity ent)
char * pips_region_user_name(entity ent) output : the name of entity.
Definition: prettyprint.c:169
list points_to_list_sort(list ptl)
Allocate a copy of ptl and sort it.
Definition: prettyprint.c:389
#define append(s)
Definition: prettyprint.c:472
list words_pointer_value(cell_relation pv)
Definition: prettyprint.c:428
list words_points_to_list(__attribute__((unused)) string note, points_to_list s)
Make sure that points-to are fully ordered before prettyprinting them or validation will be in troubl...
Definition: prettyprint.c:403
reference cell_to_reference(cell)
FI: probably to be moved elsewhere in ri-util.
Definition: effects.c:1326
bool vect_contains_phi_p(Pvecteur)
bool vect_contains_phi_p(Pvecteur v) input : a vector output : true if v contains a PHI variable,...
Definition: effects.c:1427
#define cell_reference(x)
Definition: effects.h:469
#define cell_relation_descriptor(x)
Definition: effects.h:517
#define CELL_RELATION(x)
CELL_RELATION.
Definition: effects.h:479
#define cell_relation_approximation(x)
Definition: effects.h:515
#define approximation_exact_p(x)
Definition: effects.h:369
#define approximation_may_p(x)
Definition: effects.h:363
#define cell_gap_p(x)
Definition: effects.h:473
#define approximation_must_p(x)
Definition: effects.h:366
#define descriptor_convex(x)
Definition: effects.h:601
#define cell_preference_p(x)
Definition: effects.h:470
#define descriptor_none_p(x)
Definition: effects.h:602
#define cell_relation_undefined_p(x)
Definition: effects.h:486
bool get_bool_property(const string)
FC 2015-07-20: yuk, moved out to prevent an include cycle dependency include "properties....
#define STRING(x)
Definition: genC.h:87
void gen_full_free_list(list l)
Definition: genClib.c:1023
#define ENDP(l)
Test if a list is empty.
Definition: newgen_list.h:66
#define POP(l)
Modify a list pointer to point on the next element of the list.
Definition: newgen_list.h:59
#define NIL
The empty list (nil in Lisp)
Definition: newgen_list.h:47
size_t gen_length(const list l)
Definition: list.c:150
void gen_free_string_list(list ls)
Definition: list.c:564
#define CONS(_t_, _i_, _l_)
List element cell constructor (insert an element at the beginning of a list)
Definition: newgen_list.h:150
list gen_nconc(list cp1, list cp2)
physically concatenates CP1 and CP2 but do not duplicates the elements
Definition: list.c:344
#define CAR(pcons)
Get the value of the first element of a list.
Definition: newgen_list.h:92
list gen_last(list l)
Return the last element of a list.
Definition: list.c:578
#define FOREACH(_fe_CASTER, _fe_item, _fe_list)
Apply/map an instruction block on all the elements of a list.
Definition: newgen_list.h:179
#define CDR(pcons)
Get the list less its first element.
Definition: newgen_list.h:111
#define list_undefined
Undefined list definition :-)
Definition: newgen_list.h:69
list gen_full_copy_list(list l)
Copy a list structure with element copy.
Definition: list.c:535
void gen_sort_list(list l, gen_cmp_func_t compare)
Sorts a list of gen_chunks in place, to avoid allocations...
Definition: list.c:796
bool expression_constant_p(expression)
HPFC module by Fabien COELHO.
Definition: expression.c:2453
enum language_utype get_prettyprint_language_tag()
Definition: language.c:67
#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
const char * entity_minimal_user_name(entity e)
Do not preserve scope information.
Definition: naming.c:223
const char * entity_minimal_name(entity e)
Do preserve scope informations.
Definition: naming.c:214
string concatenate(const char *,...)
Return the concatenation of the given strings.
Definition: string.c:183
#define HASH_UNDEFINED_VALUE
value returned by hash_get() when the key is not found; could also be called HASH_KEY_NOT_FOUND,...
Definition: newgen_hash.h:56
#define string_undefined
Definition: newgen_types.h:40
char * string
STRING.
Definition: newgen_types.h:39
#define points_to_approximation(x)
#define points_to_undefined_p(x)
#define points_to_sink(x)
#define points_to_list_list(x)
#define POINTS_TO(x)
POINTS_TO.
#define points_to_source(x)
string expression_to_string(expression e)
Definition: expression.c:77
list Words_Any_Reference(reference obj, list pdl, const char *(*enf)(entity))
Definition: misc.c:773
string get_comment_sentinel()
Start a single line comment.
Definition: misc.c:154
string get_comment_continuation()
Start a single line comment with continuation (blank spaces)
Definition: misc.c:167
list Words_Expression(expression obj)
of string
Definition: misc.c:2616
static int * line_buffer
le buffer contenant la ligne que l'on doit lire en avance pour se rendre compte qu'on a finit de lire...
Definition: reader.c:251
#define REGIONS_MODULE_NAME
Already defined.
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
bool entity_field_p(entity e)
e is the field of a structure
Definition: entity.c:857
const char * entity_and_common_name(entity e)
See next function!
Definition: entity.c:654
bool entity_in_common_p(entity e)
Definition: entity.c:1082
int expression_to_int(expression exp)
================================================================
Definition: expression.c:2205
#define syntax_reference_p(x)
Definition: ri.h:2728
#define syntax_reference(x)
Definition: ri.h:2730
#define reference_variable(x)
Definition: ri.h:2326
#define EXPRESSION(x)
EXPRESSION.
Definition: ri.h:1217
#define type_undefined_p(x)
Definition: ri.h:2884
#define entity_name(x)
Definition: ri.h:2790
#define reference_indices(x)
Definition: ri.h:2328
#define entity_type(x)
Definition: ri.h:2792
#define expression_syntax(x)
Definition: ri.h:1247
@ is_language_fortran
Definition: ri.h:1566
@ is_language_fortran95
Definition: ri.h:1568
@ is_language_c
Definition: ri.h:1567
void sc_rm(Psysteme ps)
void sc_rm(Psysteme ps): liberation de l'espace memoire occupe par le systeme de contraintes ps;
Definition: sc_alloc.c:277
Psysteme sc_copy(Psysteme ps)
Psysteme sc_copy(Psysteme ps): duplication d'un systeme (allocation et copie complete des champs sans...
Definition: sc_alloc.c:230
int fprintf()
test sc_min : ce test s'appelle par : programme fichier1.data fichier2.data ...
char * strdup()
void sc_lexicographic_sort(Psysteme sc, int(*compare)(Pvecteur *, Pvecteur *))
Minimize first the lexico-graphic weight of each constraint according to the comparison function "com...
Definition: sc_unaires.c:206
static bool __attribute__((unused))
Definition: prettyprint.c:435
s1
Definition: set.c:247
#define ifdebug(n)
Definition: sg.c:47
The structure used to build lists in NewGen.
Definition: newgen_list.h:41
#define CHAIN_SWORD(l, s)
#define MERGE_TEXTS(r, t)
#define ADD_SENTENCE_TO_TEXT(t, p)
#define MAX_LINE_LENGTH
maximum length of a line when prettyprinting...
void print_text(FILE *fd, text t)
Definition: print.c:195
string words_to_string(cons *lw)
Definition: print.c:211
void close_current_line(string, text, string)
Definition: util.c:235
#define SENTENCE(x)
newgen_unformatted_domain_defined
Definition: text.h:36
#define text_undefined
Definition: text.h:91
@ is_sentence_formatted
Definition: text.h:57
char *(* get_variable_name_t)(Variable)
Definition: vecteur-local.h:62