PIPS
intrinsics.c
Go to the documentation of this file.
1 /*
2 
3  $Id: intrinsics.c 23466 2018-03-12 03:08:18Z ancourt $
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 /* package generic effects : Be'atrice Creusillet 5/97
28  *
29  * File: intrinsics.c
30  * ~~~~~~~~~~~~~~~~~~
31  *
32  * This File contains the generic functions necessary for the computation of
33  * all types of proper effects and proper references of intrinsics.
34  *
35  *
36  * Modifications :
37  * --------------
38  *
39  * Molka Becher (MB), May-June 2010
40  *
41  * - Reordering of the existing intrinsics according to ISO/IEC 9899
42  * - Add of missing C Intrinsics
43  * - Add of generic_string_effects and memmove_effects for handling string.h
44  * effects
45  */
46 
47 #include <stdio.h>
48 #include <string.h>
49 #include <ctype.h>
50 #include <unistd.h>
51 
52 #include "genC.h"
53 
54 #include "linear.h"
55 
56 #include "text.h"
57 #include "ri.h"
58 #include "effects.h"
59 
60 #include "misc.h"
61 
62 #include "ri-util.h"
63 #include "prettyprint.h"
64 #include "effects-util.h"
65 #include "text-util.h"
66 
67 #include "properties.h"
68 
69 // for add_index_range_conditions() & other stuff
70 // ??? should be in effects-convex?!
71 #include "transformer.h"
72 #include "semantics.h"
73 
74 #include "effects-generic.h"
75 
76 /********************************************************* LOCAL FUNCTIONS */
77 
78 static list actual_pointer_argument_to_cells(expression);
79 //static list cells_to_write_effects(list);
80 
81 // Use directly by IntrinsicDescriptor
82 static list not_implemented_intrinsics_effects(entity, list );
83 static list time_effects(entity, list );
84 static list time_buffer_effects(entity, list );
85 static list no_write_effects(entity e,list args);
86 static list safe_c_effects(entity e, list args);
87 static list safe_c_read_only_effects(entity e,list args);
88 static list address_expression_effects(entity e,list args);
89 static list conditional_effects(entity e,list args);
90 static list address_of_effects(entity e,list args);
91 static list affect_effects(entity e,list args);
92 static list update_effects(entity e,list args);
93 static list unique_update_effects(entity e,list args);
94 static list assign_substring_effects(entity e,list args);
95 static list substring_effect(entity e,list args);
96 static list make_io_read_write_memory_effects(entity e, list args);
97 static list io_effects(entity e, list args);
98 static list c_io_effects(entity e, list args);
99 static list read_io_effects(entity e, list args);
100 static list unix_io_effects(entity e,list args);
101 static list rgs_effects(entity e,list args);
102 static list rgsi_effects(entity e,list args);
103 static list any_heap_effects(entity e,list args);
104 static list va_list_effects(entity e, list args);
105 static list search_or_sort_effects(entity e, list args);
106 static list memcpy_effects(entity e,list args);
107 static list generic_string_effects(entity e,list args);
108 static list memmove_effects(entity e, list args);
109 static list strtod_like_effects(entity e, list args);
110 static list strtol_like_effects(entity e, list args);
111 static list strdup_effects(entity, list);
112 static list end_program_effects(entity e, list args);
113 static list end_process_effects(entity e, list args);
114 
115 // Use indirectly by IntrinsicDescriptor
116 static list any_rgs_effects(entity e, list args, bool write_p, bool read_p);
117 static list generic_logical_units_effects(expression unit, bool only_read_p);
118 static list generic_c_io_effects(entity e,list args, bool system_p);
119 static list effects_of_C_ioelem(expression exp, tag act);
120 static list effects_of_any_ioelem(expression exp, tag act, bool is_fortran); //only for FORTRAN in fact
121 static list effects_of_ioelem(expression exp, tag act);
122 static list effects_of_iolist(list exprs, tag act);
123 // NL: This last function is directly use by intrinsic???
124 // {IMPLIED_DO_NAME, effects_of_implied_do},
125 // I thank that the first arg must be entity and second a list???
126 static list effects_of_implied_do(expression exp, tag act);
127 
128 // MPI Functions
129 static list mpi_functions_effects(entity e, list args);
130 static list mpi_send_effects(entity e, list args);
131 
132 /* the following data structure indicates wether an io element generates
133 a read effects or a write effect. the kind of effect depends on the
134 instruction type: for instance, access generates a read effect if used
135 within an open statement, and a write effect when used inside an inquire
136 statement */
137 
138 typedef struct IoElementDescriptor {
139  string StmtName;
140  string IoElementName;
143 
145 
147  {"OPEN", "UNIT=", is_action_read, is_approximation_exact},
148  {"OPEN", "ERR=", is_action_read, is_approximation_may},
149  {"OPEN", "FILE=", is_action_read, is_approximation_exact},
150  {"OPEN", "STATUS=", is_action_read, is_approximation_may},
151  {"OPEN", "ACCESS=", is_action_read, is_approximation_exact},
152  {"OPEN", "FORM=", is_action_read, is_approximation_exact},
153  {"OPEN", "RECL=", is_action_read, is_approximation_exact},
154  {"OPEN", "BLANK=", is_action_read, is_approximation_may},
155  {"OPEN", "IOSTAT=", is_action_write, is_approximation_may},
156 
157  {"CLOSE", "UNIT=", is_action_read, is_approximation_exact},
158  {"CLOSE", "ERR=", is_action_read, is_approximation_may},
159  {"CLOSE", "STATUS=", is_action_read, is_approximation_may},
160  {"CLOSE", "IOSTAT=", is_action_write, is_approximation_may},
161 
162  {"INQUIRE", "UNIT=", is_action_read, is_approximation_exact},
163  {"INQUIRE", "ERR=", is_action_read, is_approximation_may},
164  {"INQUIRE", "FILE=", is_action_read, is_approximation_exact},
165  {"INQUIRE", "IOSTAT=", is_action_write, is_approximation_exact},
166  {"INQUIRE", "EXIST=", is_action_write, is_approximation_exact},
167  {"INQUIRE", "OPENED=", is_action_write, is_approximation_exact},
168  {"INQUIRE", "NUMBER=", is_action_write, is_approximation_exact},
169  {"INQUIRE", "NAMED=", is_action_write, is_approximation_exact},
170  {"INQUIRE", "NAME=", is_action_write, is_approximation_exact},
171  {"INQUIRE", "ACCESS=", is_action_write, is_approximation_exact},
172  {"INQUIRE", "SEQUENTIAL=", is_action_write, is_approximation_exact},
173  {"INQUIRE", "DIRECT=", is_action_write, is_approximation_exact},
174  {"INQUIRE", "FORM=", is_action_write, is_approximation_exact},
175  {"INQUIRE", "FORMATTED=", is_action_write, is_approximation_exact},
176  {"INQUIRE", "UNFORMATTED=", is_action_write, is_approximation_exact},
177  {"INQUIRE", "RECL=", is_action_write, is_approximation_exact},
178  {"INQUIRE", "NEXTREC=", is_action_write, is_approximation_exact},
179  {"INQUIRE", "BLANK=", is_action_write, is_approximation_exact},
180 
181  {"BACKSPACE", "UNIT=", is_action_read, is_approximation_exact},
182  {"BACKSPACE", "ERR=", is_action_read, is_approximation_may},
183  {"BACKSPACE", "IOSTAT=", is_action_write, is_approximation_may},
184 
185  {"ENDFILE", "UNIT=", is_action_read, is_approximation_exact},
186  {"ENDFILE", "ERR=", is_action_read, is_approximation_may},
187  {"ENDFILE", "IOSTAT=", is_action_write, is_approximation_may},
188 
189  {"REWIND", "UNIT=", is_action_read, is_approximation_exact},
190  {"REWIND", "ERR=", is_action_read, is_approximation_may},
191  {"REWIND", "IOSTAT=", is_action_write, is_approximation_may},
192 
193  {"READ", "FMT=", is_action_read, is_approximation_exact},
194  {"READ", "UNIT=", is_action_read, is_approximation_exact},
195  {"READ", "REC=", is_action_read, is_approximation_exact},
196  {"READ", "ERR=", is_action_read, is_approximation_may},
197  {"READ", "END=", is_action_read, is_approximation_exact},
198  {"READ", "IOSTAT=", is_action_write, is_approximation_may},
199  {"READ", "IOLIST=", is_action_write, is_approximation_exact},
200 
201  {"WRITE", "ADVANCE=", is_action_read, is_approximation_exact},
202  {"WRITE", "FMT=", is_action_read, is_approximation_exact},
203  {"WRITE", "UNIT=", is_action_read, is_approximation_exact},
204  {"WRITE", "REC=", is_action_read, is_approximation_exact},
205  {"WRITE", "ERR=", is_action_read, is_approximation_may},
206  {"WRITE", "END=", is_action_read, is_approximation_exact},
207  {"WRITE", "IOSTAT=", is_action_write, is_approximation_may},
208  {"WRITE", "IOLIST=", is_action_read, is_approximation_exact},
209 
210  /* C IO intrinsics arranged in the order of the standard ISO/IEC 9899:TC2. MB */
211 
212  /* The field IoElementName is used to describe the function's pattern
213  defined according to the standard ISO/IEC 9899 (BC, july 2009) :
214  n when there is only the read effect on the value of the actual
215  argument.
216  r,w,x for read, write, or read and write effects on the object
217  pointed to by the actual argument.
218  R,W are used for formatted ios, because we need a specific handling
219  for char * arguments subsequent to the format specifier.
220  * means that the last effect is repeated for the last arguments
221  (varargs).
222  s for a FILE * argument ("s" stands for "stream").
223  f for an integer file descriptor (unix io system calls).
224  v for a va_list argument (this could be enhanced in the future
225  to distinguish between read and write effects on the components
226  of the va_list).
227 
228  The tag fields are not relevant.
229  */
230 
231  /* Input/Output <stdio.h> */
232 
279 
280 
281  /* UNIX IO system calls */
282 
298 
299 
300  /* wchar.h */
301 
305 
306  /* BSD err.h */
315 
316  /* Fortran extensions for asynchronous IO's */
317 
320 
321 
322  {0, 0, 0, 0}
323 };
324 
325 
326 /* the following data structure describes an intrinsic function: its
327 name and the function to apply on a call to this intrinsic to get the
328 effects of the call */
329 
330 /* These intrinsics are arranged in the order of the standard ISO/IEC 9899:TC2. MB */
331 
332 typedef struct IntrinsicDescriptor
333 {
334  string name;
335  list (*effects_function)();
337 
338 static IntrinsicDescriptor IntrinsicEffectsDescriptorTable[] = {
339  {PLUS_OPERATOR_NAME, no_write_effects},
340  {MINUS_OPERATOR_NAME, no_write_effects},
341  {DIVIDE_OPERATOR_NAME, no_write_effects},
342  {MULTIPLY_OPERATOR_NAME, no_write_effects},
343  {INVERSE_OPERATOR_NAME, no_write_effects},
344  {UNARY_MINUS_OPERATOR_NAME, no_write_effects},
345  {POWER_OPERATOR_NAME, no_write_effects},
346  {EQUIV_OPERATOR_NAME, no_write_effects},
347  {NON_EQUIV_OPERATOR_NAME, no_write_effects},
348  {OR_OPERATOR_NAME, no_write_effects},
349  {AND_OPERATOR_NAME, no_write_effects},
350  {LESS_THAN_OPERATOR_NAME, no_write_effects},
351  {GREATER_THAN_OPERATOR_NAME, no_write_effects},
352  {LESS_OR_EQUAL_OPERATOR_NAME, no_write_effects},
353  {GREATER_OR_EQUAL_OPERATOR_NAME, no_write_effects},
354  {EQUAL_OPERATOR_NAME, no_write_effects},
355  {NON_EQUAL_OPERATOR_NAME, no_write_effects},
356  {CONCATENATION_FUNCTION_NAME, no_write_effects},
357  {NOT_OPERATOR_NAME, no_write_effects},
358 
359  {CONTINUE_FUNCTION_NAME, no_write_effects},
360  {ENDDO_FUNCTION_NAME, no_write_effects},
361  {PAUSE_FUNCTION_NAME, make_io_read_write_memory_effects},
362  {RETURN_FUNCTION_NAME, no_write_effects},
363  {STOP_FUNCTION_NAME, make_io_read_write_memory_effects},
364  {END_FUNCTION_NAME, no_write_effects},
365  {FORMAT_FUNCTION_NAME, no_write_effects},
366 
367  { IMPLIED_COMPLEX_NAME, no_write_effects},
368  { IMPLIED_DCOMPLEX_NAME, no_write_effects},
369 
370  {INT_GENERIC_CONVERSION_NAME, no_write_effects},
371  {IFIX_GENERIC_CONVERSION_NAME, no_write_effects},
372  {IDINT_GENERIC_CONVERSION_NAME, no_write_effects},
373  {REAL_GENERIC_CONVERSION_NAME, no_write_effects},
374  {FLOAT_GENERIC_CONVERSION_NAME, no_write_effects},
375  {DFLOAT_GENERIC_CONVERSION_NAME, no_write_effects},
376  {SNGL_GENERIC_CONVERSION_NAME, no_write_effects},
377  {DBLE_GENERIC_CONVERSION_NAME, no_write_effects},
378  {DREAL_GENERIC_CONVERSION_NAME, no_write_effects}, /* Added for Arnauld Leservot */
379  {CMPLX_GENERIC_CONVERSION_NAME, no_write_effects},
380  {DCMPLX_GENERIC_CONVERSION_NAME, no_write_effects},
381  {INT_TO_CHAR_CONVERSION_NAME, no_write_effects},
382  {CHAR_TO_INT_CONVERSION_NAME, no_write_effects},
383  {AINT_CONVERSION_NAME, no_write_effects},
384  {DINT_CONVERSION_NAME, no_write_effects},
385  {ANINT_CONVERSION_NAME, no_write_effects},
386  {DNINT_CONVERSION_NAME, no_write_effects},
387  {NINT_CONVERSION_NAME, no_write_effects},
388  {IDNINT_CONVERSION_NAME, no_write_effects},
389  {IABS_OPERATOR_NAME, no_write_effects},
390  {ABS_OPERATOR_NAME, no_write_effects},
391  {DABS_OPERATOR_NAME, no_write_effects},
392  {CABS_OPERATOR_NAME, no_write_effects},
393  {CDABS_OPERATOR_NAME, no_write_effects},
394 
395  {MODULO_OPERATOR_NAME, no_write_effects},
396  {REAL_MODULO_OPERATOR_NAME, no_write_effects},
397  {DOUBLE_MODULO_OPERATOR_NAME, no_write_effects},
398  {ISIGN_OPERATOR_NAME, no_write_effects},
399  {SIGN_OPERATOR_NAME, no_write_effects},
400  {DSIGN_OPERATOR_NAME, no_write_effects},
401  {IDIM_OPERATOR_NAME, no_write_effects},
402  {DIM_OPERATOR_NAME, no_write_effects},
403  {DDIM_OPERATOR_NAME, no_write_effects},
404  {DPROD_OPERATOR_NAME, no_write_effects},
405  {MAX_OPERATOR_NAME, no_write_effects},
406  {MAX0_OPERATOR_NAME, no_write_effects},
407  {AMAX1_OPERATOR_NAME, no_write_effects},
408  {DMAX1_OPERATOR_NAME, no_write_effects},
409  {AMAX0_OPERATOR_NAME, no_write_effects},
410  {MAX1_OPERATOR_NAME, no_write_effects},
411  {PIPS_C_MAX_OPERATOR_NAME, no_write_effects},
412  {MIN_OPERATOR_NAME, no_write_effects},
413  {MIN0_OPERATOR_NAME, no_write_effects},
414  {AMIN1_OPERATOR_NAME, no_write_effects},
415  {DMIN1_OPERATOR_NAME, no_write_effects},
416  {AMIN0_OPERATOR_NAME, no_write_effects},
417  {MIN1_OPERATOR_NAME, no_write_effects},
418  {PIPS_C_MIN_OPERATOR_NAME, no_write_effects},
419  {PIPS_C_DIV_OPERATOR_NAME, no_write_effects},
420  {LENGTH_OPERATOR_NAME, no_write_effects},
421  {INDEX_OPERATOR_NAME, no_write_effects},
422  {AIMAG_CONVERSION_NAME, no_write_effects},
423  {DIMAG_CONVERSION_NAME, no_write_effects},
424  {CONJG_OPERATOR_NAME, no_write_effects},
425  {DCONJG_OPERATOR_NAME, no_write_effects},
426  {SQRT_OPERATOR_NAME, no_write_effects},
427  {DSQRT_OPERATOR_NAME, no_write_effects},
428  {CSQRT_OPERATOR_NAME, no_write_effects},
429 
430  {EXP_OPERATOR_NAME, no_write_effects},
431  {DEXP_OPERATOR_NAME, no_write_effects},
432  {CEXP_OPERATOR_NAME, no_write_effects},
433  {LOG_OPERATOR_NAME, no_write_effects},
434  {ALOG_OPERATOR_NAME, no_write_effects},
435  {DLOG_OPERATOR_NAME, no_write_effects},
436  {CLOG_OPERATOR_NAME, no_write_effects},
437  {LOG10_OPERATOR_NAME, no_write_effects},
438  {ALOG10_OPERATOR_NAME, no_write_effects},
439  {DLOG10_OPERATOR_NAME, no_write_effects},
440  {SIN_OPERATOR_NAME, no_write_effects},
441  {DSIN_OPERATOR_NAME, no_write_effects},
442  {CSIN_OPERATOR_NAME, no_write_effects},
443  {COS_OPERATOR_NAME, no_write_effects},
444  {DCOS_OPERATOR_NAME, no_write_effects},
445  {CCOS_OPERATOR_NAME, no_write_effects},
446  {TAN_OPERATOR_NAME, no_write_effects},
447  {DTAN_OPERATOR_NAME, no_write_effects},
448  {ASIN_OPERATOR_NAME, no_write_effects},
449  {DASIN_OPERATOR_NAME, no_write_effects},
450  {ACOS_OPERATOR_NAME, no_write_effects},
451  {DACOS_OPERATOR_NAME, no_write_effects},
452  {ATAN_OPERATOR_NAME, no_write_effects},
453  {DATAN_OPERATOR_NAME, no_write_effects},
454  {ATAN2_OPERATOR_NAME, no_write_effects},
455  {DATAN2_OPERATOR_NAME, no_write_effects},
456  {SINH_OPERATOR_NAME, no_write_effects},
457  {DSINH_OPERATOR_NAME, no_write_effects},
458  {COSH_OPERATOR_NAME, no_write_effects},
459  {DCOSH_OPERATOR_NAME, no_write_effects},
460  {TANH_OPERATOR_NAME, no_write_effects},
461  {DTANH_OPERATOR_NAME, no_write_effects},
462 
463  {LGE_OPERATOR_NAME, no_write_effects},
464  {LGT_OPERATOR_NAME, no_write_effects},
465  {LLE_OPERATOR_NAME, no_write_effects},
466  {LLT_OPERATOR_NAME, no_write_effects},
467 
468  {LIST_DIRECTED_FORMAT_NAME, no_write_effects},
469  {UNBOUNDED_DIMENSION_NAME, no_write_effects},
470 
471  {ASSIGN_OPERATOR_NAME, affect_effects},
472 
473  /* Fortran IO related intrinsic */
474  {WRITE_FUNCTION_NAME, io_effects},
475  {REWIND_FUNCTION_NAME, io_effects},
476  {BACKSPACE_FUNCTION_NAME, io_effects},
477  {OPEN_FUNCTION_NAME, io_effects},
478  {CLOSE_FUNCTION_NAME, io_effects},
479  {INQUIRE_FUNCTION_NAME, io_effects},
480  {READ_FUNCTION_NAME, read_io_effects},
481  {BUFFERIN_FUNCTION_NAME, c_io_effects},
482  {BUFFEROUT_FUNCTION_NAME, c_io_effects},
483  {ENDFILE_FUNCTION_NAME, io_effects},
484  {IMPLIED_DO_NAME, effects_of_implied_do},
485 
486  {SUBSTRING_FUNCTION_NAME, substring_effect},
487  {ASSIGN_SUBSTRING_FUNCTION_NAME, assign_substring_effects},
488 
489  /* These operators are used within the OPTIMIZE transformation in
490  order to manipulate operators such as n-ary add and multiply or
491  multiply-add operators ( JZ - sept 98) */
492  {EOLE_SUM_OPERATOR_NAME, no_write_effects },
493  {EOLE_PROD_OPERATOR_NAME, no_write_effects },
494  {EOLE_FMA_OPERATOR_NAME, no_write_effects },
495 
496  {IMA_OPERATOR_NAME, no_write_effects },
497  {IMS_OPERATOR_NAME, no_write_effects },
498 
499 
500  /* Bit manipulation F90 functions. ISO/IEC 1539 : 1991 Amira Mensi */
501 
502  {ISHFT_OPERATOR_NAME, no_write_effects },
503  {ISHFTC_OPERATOR_NAME, no_write_effects },
504  {IBITS_OPERATOR_NAME, no_write_effects },
505  {MVBITS_OPERATOR_NAME, no_write_effects },
506  {BTEST_OPERATOR_NAME, no_write_effects },
507  {IBCLR_OPERATOR_NAME, no_write_effects },
508  {BIT_SIZE_OPERATOR_NAME, no_write_effects },
509  {IBSET_OPERATOR_NAME, no_write_effects },
510  {IAND_OPERATOR_NAME, no_write_effects },
511  {IEOR_OPERATOR_NAME, no_write_effects },
512  {IOR_OPERATOR_NAME, no_write_effects },
513 
514  /* Here are C intrinsics.*/
515 
516  /* ISO 6.5.2.3 structure and union members */
517  {FIELD_OPERATOR_NAME, address_expression_effects},
518  {POINT_TO_OPERATOR_NAME, address_expression_effects},
519 
520  /* ISO 6.5.2.4 postfix increment and decrement operators, real or pointer type operand */
521  {POST_INCREMENT_OPERATOR_NAME, unique_update_effects},
522  {POST_DECREMENT_OPERATOR_NAME, unique_update_effects},
523 
524  /* ISO 6.5.3.1 prefix increment and decrement operators, real or pointer type operand */
525  {PRE_INCREMENT_OPERATOR_NAME, unique_update_effects},
526  {PRE_DECREMENT_OPERATOR_NAME, unique_update_effects},
527 
528  /* ISO 6.5.3.2 address and indirection operators, add pointer type */
529  {ADDRESS_OF_OPERATOR_NAME, address_of_effects},
530  {DEREFERENCING_OPERATOR_NAME, address_expression_effects},
531 
532  /* ISO 6.5.3.3 unary arithmetic operators */
533  {UNARY_PLUS_OPERATOR_NAME, no_write_effects},
534  // {"-unary", no_write_effects},UNARY_MINUS_OPERATOR already exist (FORTRAN)
535  {BITWISE_NOT_OPERATOR_NAME, no_write_effects},
536  {C_NOT_OPERATOR_NAME, no_write_effects},
537 
538  {C_MODULO_OPERATOR_NAME, no_write_effects},
539 
540  /* ISO 6.5.6 additive operators, arithmetic types or pointer + integer type*/
541  {PLUS_C_OPERATOR_NAME, no_write_effects},
542  {MINUS_C_OPERATOR_NAME, no_write_effects},
543 
544  /* ISO 6.5.7 bitwise shift operators*/
545  {LEFT_SHIFT_OPERATOR_NAME, no_write_effects},
546  {RIGHT_SHIFT_OPERATOR_NAME, no_write_effects},
547 
548  /* ISO 6.5.8 relational operators,arithmetic or pointer types */
549  {C_LESS_THAN_OPERATOR_NAME, no_write_effects},
550  {C_GREATER_THAN_OPERATOR_NAME, no_write_effects},
551  {C_LESS_OR_EQUAL_OPERATOR_NAME, no_write_effects},
552  {C_GREATER_OR_EQUAL_OPERATOR_NAME, no_write_effects},
553 
554  /* ISO 6.5.9 equality operators, return 0 or 1*/
555  {C_EQUAL_OPERATOR_NAME, no_write_effects},
556  {C_NON_EQUAL_OPERATOR_NAME, no_write_effects},
557 
558  /* ISO 6.5.10 bitwise AND operator */
559  {BITWISE_AND_OPERATOR_NAME, no_write_effects},
560 
561  /* ISO 6.5.11 bitwise exclusive OR operator */
562  {BITWISE_XOR_OPERATOR_NAME, no_write_effects},
563 
564  /* ISO 6.5.12 bitwise inclusive OR operator */
565  {BITWISE_OR_OPERATOR_NAME, no_write_effects},
566 
567  /* ISO 6.5.13 logical AND operator */
568  {C_AND_OPERATOR_NAME, no_write_effects},
569 
570  /* ISO 6.5.14 logical OR operator */
571  {C_OR_OPERATOR_NAME, no_write_effects},
572 
573  /* ISO 6.5.15 conditional operator */
574  {CONDITIONAL_OPERATOR_NAME, conditional_effects},
575 
576  /* ISO 6.5.16.2 compound assignments*/
577  {MULTIPLY_UPDATE_OPERATOR_NAME, update_effects},
578  {DIVIDE_UPDATE_OPERATOR_NAME, update_effects},
579  {MODULO_UPDATE_OPERATOR_NAME, update_effects},
580  {PLUS_UPDATE_OPERATOR_NAME, update_effects},
581  {MINUS_UPDATE_OPERATOR_NAME, update_effects},
582  {LEFT_SHIFT_UPDATE_OPERATOR_NAME, update_effects},
583  {RIGHT_SHIFT_UPDATE_OPERATOR_NAME, update_effects},
584  {BITWISE_AND_UPDATE_OPERATOR_NAME, update_effects},
585  {BITWISE_XOR_UPDATE_OPERATOR_NAME, update_effects},
586  {BITWISE_OR_UPDATE_OPERATOR_NAME, update_effects},
587 
588  /* ISO 6.5.17 comma operator */
589  {COMMA_OPERATOR_NAME, no_write_effects},
590 
591  {BREAK_FUNCTION_NAME, no_write_effects},
592  {CASE_FUNCTION_NAME, no_write_effects},
593  {DEFAULT_FUNCTION_NAME, no_write_effects},
594  {C_RETURN_FUNCTION_NAME, end_program_effects},
595 
596  /* intrinsic to handle C initialization */
597 
598  {BRACE_INTRINSIC, no_write_effects},
599 
600 
601  /* assert.h */
602  /* These intrinsics are added with no_write_effects to work with C.
603  The real effects must be studied !!! I do not have time for the moment */
604 
605  {ASSERT_FUNCTION_NAME, no_write_effects},
606  {ASSERT_FAIL_FUNCTION_NAME, no_write_effects}, /* in fact, IO effect, does not return */
607 
608  /* #include <complex.h> */
609  {CACOS_OPERATOR_NAME, no_write_effects},
610  {CACOSF_OPERATOR_NAME, no_write_effects},
611  {CACOSL_OPERATOR_NAME, no_write_effects},
612  {CASIN_OPERATOR_NAME, no_write_effects},
613  {CASINF_OPERATOR_NAME, no_write_effects},
614  {CASINL_OPERATOR_NAME, no_write_effects},
615  {CATAN_OPERATOR_NAME, no_write_effects},
616  {CATANF_OPERATOR_NAME, no_write_effects},
617  {CATANL_OPERATOR_NAME, no_write_effects},
618  {C_CCOS_OPERATOR_NAME, no_write_effects},
619  {CCOSF_OPERATOR_NAME, no_write_effects},
620  {CCOSL_OPERATOR_NAME, no_write_effects},
621  {C_CSIN_OPERATOR_NAME, no_write_effects},
622  {CSINF_OPERATOR_NAME, no_write_effects},
623  {CSINL_OPERATOR_NAME, no_write_effects},
624  {CTAN_OPERATOR_NAME, no_write_effects},
625  {CTANF_OPERATOR_NAME, no_write_effects},
626  {CTANL_OPERATOR_NAME, no_write_effects},
627  {CACOSH_OPERATOR_NAME, no_write_effects},
628  {CACOSHF_OPERATOR_NAME, no_write_effects},
629  {CACOSHL_OPERATOR_NAME, no_write_effects},
630  {CASINH_OPERATOR_NAME, no_write_effects},
631  {CASINHF_OPERATOR_NAME, no_write_effects},
632  {CASINHL_OPERATOR_NAME, no_write_effects},
633  {CATANH_OPERATOR_NAME, no_write_effects},
634  {CATANHF_OPERATOR_NAME, no_write_effects},
635  {CATANHL_OPERATOR_NAME, no_write_effects},
636  {CCOSH_OPERATOR_NAME, no_write_effects},
637  {CCOSHF_OPERATOR_NAME, no_write_effects},
638  {CCOSHL_OPERATOR_NAME, no_write_effects},
639  {CSINH_OPERATOR_NAME, no_write_effects},
640  {CSINHF_OPERATOR_NAME, no_write_effects},
641  {CSINHL_OPERATOR_NAME, no_write_effects},
642  {CTANH_OPERATOR_NAME, no_write_effects},
643  {CTANHF_OPERATOR_NAME, no_write_effects},
644  {CTANHL_OPERATOR_NAME, no_write_effects},
645  {C_CEXP_OPERATOR_NAME, no_write_effects},
646  {CEXPF_OPERATOR_NAME, no_write_effects},
647  {CEXPL_OPERATOR_NAME, no_write_effects},
648  {C_CLOG_OPERATOR_NAME, no_write_effects},
649  {CLOGF_OPERATOR_NAME, no_write_effects},
650  {CLOGL_OPERATOR_NAME, no_write_effects},
651  {C_CABS_OPERATOR_NAME, no_write_effects},
652  {CABSF_OPERATOR_NAME, no_write_effects},
653  {CABSL_OPERATOR_NAME, no_write_effects},
654  {CPOW_OPERATOR_NAME, no_write_effects},
655  {CPOWF_OPERATOR_NAME, no_write_effects},
656  {CPOWL_OPERATOR_NAME, no_write_effects},
657  {C_CSQRT_OPERATOR_NAME, no_write_effects},
658  {CSQRTF_OPERATOR_NAME, no_write_effects},
659  {CSQRTL_OPERATOR_NAME, no_write_effects},
660  {CARG_OPERATOR_NAME, no_write_effects},
661  {CARGF_OPERATOR_NAME, no_write_effects},
662  {CARGL_OPERATOR_NAME, no_write_effects},
663  {CIMAG_OPERATOR_NAME, no_write_effects},
664  {GCC_CIMAG_OPERATOR_NAME, no_write_effects},
665  {CIMAGF_OPERATOR_NAME, no_write_effects},
666  {CIMAGL_OPERATOR_NAME, no_write_effects},
667  {CONJ_OPERATOR_NAME, no_write_effects},
668  {CONJF_OPERATOR_NAME, no_write_effects},
669  {CONJL_OPERATOR_NAME, no_write_effects},
670  {CPROJ_OPERATOR_NAME, no_write_effects},
671  {CPROJF_OPERATOR_NAME, no_write_effects},
672  {CPROJL_OPERATOR_NAME, no_write_effects},
673  {CREAL_OPERATOR_NAME, no_write_effects},
674  {GCC_CREAL_OPERATOR_NAME, no_write_effects},
675  {CREALF_OPERATOR_NAME, no_write_effects},
676  {CREALL_OPERATOR_NAME, no_write_effects},
677 
678  /* #include <ctype.h>*/
679 
680  {ISALNUM_OPERATOR_NAME, no_write_effects},
681  {ISALPHA_OPERATOR_NAME, no_write_effects},
682  {ISBLANK_OPERATOR_NAME, no_write_effects},
683  {ISCNTRL_OPERATOR_NAME, no_write_effects},
684  {ISDIGIT_OPERATOR_NAME, no_write_effects},
685  {ISGRAPH_OPERATOR_NAME, no_write_effects},
686  {ISLOWER_OPERATOR_NAME, no_write_effects},
687  {ISPRINT_OPERATOR_NAME, no_write_effects},
688  {ISPUNCT_OPERATOR_NAME, no_write_effects},
689  {ISSPACE_OPERATOR_NAME, no_write_effects},
690  {ISUPPER_OPERATOR_NAME, no_write_effects},
691  {ISXDIGIT_OPERATOR_NAME, no_write_effects},
692  {TOLOWER_OPERATOR_NAME, no_write_effects},
693  {TOUPPER_OPERATOR_NAME, no_write_effects},
694 
695  /* errno.h */
696  // MB: errno is usually an extern int variable, but *errno() is allowed (ISO section 7.5 in C99)
697  {"errno", no_write_effects},
698 
699  /* fenv.h */
700 
701  {FECLEAREXCEPT_FUNCTION_NAME, no_write_effects},
702  {FERAISEEXCEPT_FUNCTION_NAME, no_write_effects},
703  {FESETEXCEPTFLAG_FUNCTION_NAME, no_write_effects},
704  {FETESTEXCEPT_FUNCTION_NAME, no_write_effects},
705  {FEGETROUND_FUNCTION_NAME, no_write_effects},
706  {FESETROUND_FUNCTION_NAME, no_write_effects},
707  // fenv_t *
708  // {FESETENV_FUNCTION_NAME, no_write_effects},
709  //{FEUPDATEENV_FUNCTION_NAME, no_write_effects},
710 
711 
712  /* inttypes.h */
713  {IMAXABS_FUNCTION_NAME, no_write_effects},
714  {IMAXDIV_FUNCTION_NAME, no_write_effects},
715 
716  /* locale.h */
717  {SETLOCALE_FUNCTION_NAME, no_write_effects},
718  {"localeconv", no_write_effects},
719 
720  /* #include <math.h>*/
721 
722  {FPCLASSIFY_OPERATOR_NAME, no_write_effects},
723  {ISFINITE_OPERATOR_NAME, no_write_effects},
724  {ISINF_OPERATOR_NAME, no_write_effects},
725  {ISNAN_OPERATOR_NAME, no_write_effects},
726  {ISNANL_OPERATOR_NAME, no_write_effects},
727  {ISNANF_OPERATOR_NAME, no_write_effects},
728  {ISNORMAL_OPERATOR_NAME, no_write_effects},
729  {SIGNBIT_OPERATOR_NAME, no_write_effects},
730  {C_ACOS_OPERATOR_NAME, no_write_effects},
731  {ACOSF_OPERATOR_NAME, no_write_effects},
732  {ACOSL_OPERATOR_NAME, no_write_effects},
733  {C_ASIN_OPERATOR_NAME, no_write_effects},
734  {ASINF_OPERATOR_NAME, no_write_effects},
735  {ASINL_OPERATOR_NAME, no_write_effects},
736  {C_ATAN_OPERATOR_NAME, no_write_effects},
737  {ATANF_OPERATOR_NAME, no_write_effects},
738  {ATANL_OPERATOR_NAME, no_write_effects},
739  {C_ATAN2_OPERATOR_NAME, no_write_effects},
740  {ATAN2F_OPERATOR_NAME, no_write_effects},
741  {ATAN2L_OPERATOR_NAME, no_write_effects},
742  {C_COS_OPERATOR_NAME, no_write_effects},
743  {COSF_OPERATOR_NAME, no_write_effects},
744  {COSL_OPERATOR_NAME, no_write_effects},
745  {C_SIN_OPERATOR_NAME, no_write_effects},
746  {SINF_OPERATOR_NAME, no_write_effects},
747  {SINL_OPERATOR_NAME, no_write_effects},
748  {C_TAN_OPERATOR_NAME, no_write_effects},
749  {TANF_OPERATOR_NAME, no_write_effects},
750  {TANL_OPERATOR_NAME, no_write_effects},
751  {C_ACOSH_OPERATOR_NAME , no_write_effects},
752  {ACOSHF_OPERATOR_NAME , no_write_effects},
753  {ACOSHL_OPERATOR_NAME , no_write_effects},
754  {C_ASINH_OPERATOR_NAME, no_write_effects},
755  {ASINHF_OPERATOR_NAME, no_write_effects},
756  {ASINHL_OPERATOR_NAME, no_write_effects},
757  {C_ATANH_OPERATOR_NAME, no_write_effects},
758  {ATANHF_OPERATOR_NAME, no_write_effects},
759  {ATANHL_OPERATOR_NAME, no_write_effects},
760  {C_COSH_OPERATOR_NAME, no_write_effects},
761  {COSHF_OPERATOR_NAME, no_write_effects},
762  {COSHL_OPERATOR_NAME, no_write_effects},
763  {C_SINH_OPERATOR_NAME, no_write_effects},
764  {SINHF_OPERATOR_NAME, no_write_effects},
765  {SINHL_OPERATOR_NAME, no_write_effects},
766  {C_TANH_OPERATOR_NAME, no_write_effects},
767  {TANHF_OPERATOR_NAME, no_write_effects},
768  {TANHL_OPERATOR_NAME, no_write_effects},
769  {C_EXP_OPERATOR_NAME, no_write_effects},
770  {EXPF_OPERATOR_NAME, no_write_effects},
771  {EXPL_OPERATOR_NAME, no_write_effects},
772  {EXP2_OPERATOR_NAME, no_write_effects},
773  {EXP2F_OPERATOR_NAME, no_write_effects},
774  {EXP2L_OPERATOR_NAME, no_write_effects},
775  {EXPM1_OPERATOR_NAME, no_write_effects},
776  {EXPM1F_OPERATOR_NAME, no_write_effects},
777  {EXPM1L_OPERATOR_NAME, no_write_effects},
778  //frexp has a write effect not defined correctly. MB
779  {FREXP_OPERATOR_NAME, no_write_effects},
780  {ILOGB_OPERATOR_NAME, no_write_effects},
781  {ILOGBF_OPERATOR_NAME, no_write_effects},
782  {ILOGBL_OPERATOR_NAME, no_write_effects},
783  {LDEXP_OPERATOR_NAME, no_write_effects},
784  {LDEXPF_OPERATOR_NAME, no_write_effects},
785  {LDEXPL_OPERATOR_NAME, no_write_effects},
786  {C_LOG_OPERATOR_NAME, no_write_effects},
787  {LOGF_OPERATOR_NAME, no_write_effects},
788  {LOGL_OPERATOR_NAME, no_write_effects},
789  {C_LOG10_OPERATOR_NAME, no_write_effects},
790  {LOG10F_OPERATOR_NAME, no_write_effects},
791  {LOG10L_OPERATOR_NAME, no_write_effects},
792  {LOG1P_OPERATOR_NAME, no_write_effects},
793  {LOG1PF_OPERATOR_NAME, no_write_effects},
794  {LOG1PL_OPERATOR_NAME, no_write_effects},
795  {LOG2_OPERATOR_NAME, no_write_effects},
796  {LOG2F_OPERATOR_NAME, no_write_effects},
797  {LOG2L_OPERATOR_NAME, no_write_effects},
798  {LOGB_OPERATOR_NAME, no_write_effects},
799  {LOGBF_OPERATOR_NAME, no_write_effects},
800  {LOGBL_OPERATOR_NAME, no_write_effects},
801  //modf & modff have write effects not defined correctly. MB
802  {MODF_OPERATOR_NAME, no_write_effects},
803  {MODFF_OPERATOR_NAME, no_write_effects},
804  {SCALBN_OPERATOR_NAME, no_write_effects},
805  {SCALBNF_OPERATOR_NAME, no_write_effects},
806  {SCALBNL_OPERATOR_NAME, no_write_effects},
807  {SCALB_OPERATOR_NAME, no_write_effects}, /* POSIX.1-2001, The scalb function is the BSD name for ldexp */
808  {SCALBLN_OPERATOR_NAME, no_write_effects},
809  {SCALBLNF_OPERATOR_NAME, no_write_effects},
810  {SCALBLNL_OPERATOR_NAME, no_write_effects},
811  {CBRT_OPERATOR_NAME, no_write_effects},
812  {CBRTF_OPERATOR_NAME, no_write_effects},
813  {CBRTL_OPERATOR_NAME, no_write_effects},
814  {FABS_OPERATOR_NAME, no_write_effects},
815  {FABSF_OPERATOR_NAME, no_write_effects},
816  {FABSL_OPERATOR_NAME, no_write_effects},
817  {HYPOT_OPERATOR_NAME, no_write_effects},
818  {HYPOTF_OPERATOR_NAME, no_write_effects},
819  {HYPOTL_OPERATOR_NAME, no_write_effects},
820  {POW_OPERATOR_NAME, no_write_effects},
821  {POWF_OPERATOR_NAME, no_write_effects},
822  {POWL_OPERATOR_NAME, no_write_effects},
823  {C_SQRT_OPERATOR_NAME, no_write_effects},
824  {SQRTF_OPERATOR_NAME, no_write_effects},
825  {SQRTL_OPERATOR_NAME, no_write_effects},
826  {ERF_OPERATOR_NAME, no_write_effects},
827  {ERFF_OPERATOR_NAME, no_write_effects},
828  {ERFL_OPERATOR_NAME, no_write_effects},
829  {ERFC_OPERATOR_NAME, no_write_effects},
830  {ERFCF_OPERATOR_NAME, no_write_effects},
831  {ERFCL_OPERATOR_NAME, no_write_effects},
832  {GAMMA_OPERATOR_NAME, no_write_effects}, /* GNU C Library */
833  {LGAMMA_OPERATOR_NAME, no_write_effects},
834  {LGAMMAF_OPERATOR_NAME, no_write_effects},
835  {LGAMMAL_OPERATOR_NAME, no_write_effects},
836  {TGAMMA_OPERATOR_NAME, no_write_effects},
837  {TGAMMAF_OPERATOR_NAME, no_write_effects},
838  {TGAMMAL_OPERATOR_NAME, no_write_effects},
839  {CEIL_OPERATOR_NAME, no_write_effects},
840  {CEILF_OPERATOR_NAME, no_write_effects},
841  {CEILL_OPERATOR_NAME, no_write_effects},
842  {FLOOR_OPERATOR_NAME, no_write_effects},
843  {FLOORF_OPERATOR_NAME, no_write_effects},
844  {FLOORL_OPERATOR_NAME, no_write_effects},
845  {NEARBYINT_OPERATOR_NAME, no_write_effects},
846  {NEARBYINTF_OPERATOR_NAME, no_write_effects},
847  {NEARBYINTL_OPERATOR_NAME, no_write_effects},
848  {RINT_OPERATOR_NAME, no_write_effects},
849  {RINTF_OPERATOR_NAME, no_write_effects},
850  {RINTL_OPERATOR_NAME, no_write_effects},
851  {LRINT_OPERATOR_NAME, no_write_effects},
852  {LRINTF_OPERATOR_NAME, no_write_effects},
853  {LRINTL_OPERATOR_NAME, no_write_effects},
854  {LLRINT_OPERATOR_NAME, no_write_effects},
855  {LLRINTF_OPERATOR_NAME, no_write_effects},
856  {LLRINTL_OPERATOR_NAME, no_write_effects},
857  {ROUND_OPERATOR_NAME, no_write_effects},
858  {ROUNDF_OPERATOR_NAME, no_write_effects},
859  {ROUNDL_OPERATOR_NAME, no_write_effects},
860  {LROUND_OPERATOR_NAME, no_write_effects},
861  {LROUNDF_OPERATOR_NAME, no_write_effects},
862  {LROUNDL_OPERATOR_NAME, no_write_effects},
863  {LLROUND_OPERATOR_NAME, no_write_effects},
864  {LLROUNDF_OPERATOR_NAME, no_write_effects},
865  {LLROUNDL_OPERATOR_NAME, no_write_effects},
866  {TRUNC_OPERATOR_NAME, no_write_effects},
867  {TRUNCF_OPERATOR_NAME, no_write_effects},
868  {TRUNCL_OPERATOR_NAME, no_write_effects},
869  {FMOD_OPERATOR_NAME, no_write_effects},
870  {FMODF_OPERATOR_NAME, no_write_effects},
871  {FMODL_OPERATOR_NAME, no_write_effects},
872  {REMAINDER_OPERATOR_NAME, no_write_effects},
873  {REMAINDERF_OPERATOR_NAME, no_write_effects},
874  {REMAINDERL_OPERATOR_NAME, no_write_effects},
875  {COPYSIGN_OPERATOR_NAME, no_write_effects},
876  {COPYSIGNF_OPERATOR_NAME, no_write_effects},
877  {COPYSIGNL_OPERATOR_NAME, no_write_effects},
878  {NAN_OPERATOR_NAME, no_write_effects},
879  {NANF_OPERATOR_NAME, no_write_effects},
880  {NANL_OPERATOR_NAME, no_write_effects},
881  {NEXTAFTER_OPERATOR_NAME, no_write_effects},
882  {NEXTAFTERF_OPERATOR_NAME, no_write_effects},
883  {NEXTAFTERL_OPERATOR_NAME, no_write_effects},
884  {NEXTTOWARD_OPERATOR_NAME, no_write_effects},
885  {NEXTTOWARDF_OPERATOR_NAME, no_write_effects},
886  {NEXTTOWARDL_OPERATOR_NAME, no_write_effects},
887  {FDIM_OPERATOR_NAME, no_write_effects},
888  {FDIMF_OPERATOR_NAME, no_write_effects},
889  {FDIML_OPERATOR_NAME, no_write_effects},
890  {FMAX_OPERATOR_NAME, no_write_effects},
891  {FMAXF_OPERATOR_NAME, no_write_effects},
892  {FMAXL_OPERATOR_NAME, no_write_effects},
893  {FMIN_OPERATOR_NAME, no_write_effects},
894  {FMINF_OPERATOR_NAME, no_write_effects},
895  {FMINL_OPERATOR_NAME, no_write_effects},
896  {FMA_OPERATOR_NAME, no_write_effects},
897  {FMAF_OPERATOR_NAME, no_write_effects},
898  {FMAL_OPERATOR_NAME, no_write_effects},
899  {ISGREATER_OPERATOR_NAME, no_write_effects},
900  {ISGREATEREQUAL_OPERATOR_NAME, no_write_effects},
901  {ISLESS_OPERATOR_NAME, no_write_effects},
902  {ISLESSEQUAL_OPERATOR_NAME, no_write_effects},
903  {ISLESSGREATER_OPERATOR_NAME, no_write_effects},
904  {ISUNORDERED_OPERATOR_NAME, no_write_effects},
905 
906 
907  /*#include <setjmp.h>*/
908 
909  {"setjmp", no_write_effects},
910  {"__setjmp", no_write_effects},
911  {"longjmp", no_write_effects}, // control effect 7.13 in C99
912  {"__longjmp", no_write_effects},
913  {"sigsetjmp", no_write_effects}, //POSIX.1-2001
914  {"siglongjmp", no_write_effects}, //POSIX.1-2001
915 
916 
917  /* signal.h 7.14 */
918  {SIGFPE_OPERATOR_NAME, no_write_effects}, //macro
919  {SIGNAL_OPERATOR_NAME, no_write_effects},
920  {RAISE_FUNCTION_NAME, no_write_effects},
921 
922 
923  /* stdarg.h */
924 
925  {BUILTIN_VA_START, va_list_effects},
926  {BUILTIN_VA_END, va_list_effects},
927  {BUILTIN_VA_COPY, va_list_effects},
928  /* va_arg is not a standard call; it is directly represented in PIPS
929  internal representation. */
930 
931  /*#include <stdio.h>*/
932  // IO functions
933  {REMOVE_FUNCTION_NAME, no_write_effects},
934  {RENAME_FUNCTION_NAME, no_write_effects},
935  {TMPFILE_FUNCTION_NAME, no_write_effects},
936  {TMPNAM_FUNCTION_NAME, no_write_effects},
937  {FCLOSE_FUNCTION_NAME, c_io_effects},
938  {FFLUSH_FUNCTION_NAME, no_write_effects},
939  {FOPEN_FUNCTION_NAME, c_io_effects},
940  {FREOPEN_FUNCTION_NAME, no_write_effects},
941  {SETBUF_FUNCTION_NAME, no_write_effects},
942  {SETVBUF_FUNCTION_NAME , no_write_effects},
943  {FPRINTF_FUNCTION_NAME, c_io_effects},
944  {FSCANF_FUNCTION_NAME, c_io_effects},
945  {ISOC99_FSCANF_FUNCTION_NAME, c_io_effects},
946  {PRINTF_FUNCTION_NAME, c_io_effects},
947  {SCANF_FUNCTION_NAME, c_io_effects},
948  {ISOC99_SCANF_FUNCTION_NAME, c_io_effects},
949  {SNPRINTF_FUNCTION_NAME, c_io_effects},
950  {SPRINTF_FUNCTION_NAME, c_io_effects},
951  {SSCANF_FUNCTION_NAME, c_io_effects},
952  {ISOC99_SSCANF_FUNCTION_NAME, c_io_effects},
953  {VFPRINTF_FUNCTION_NAME, c_io_effects},
954  {VFSCANF_FUNCTION_NAME, c_io_effects},
955  {ISOC99_VFSCANF_FUNCTION_NAME, c_io_effects},
956  {VPRINTF_FUNCTION_NAME, c_io_effects},
957  {VSCANF_FUNCTION_NAME, c_io_effects},
958  {ISOC99_VSCANF_FUNCTION_NAME, c_io_effects},
959  {VSNPRINTF_FUNCTION_NAME, c_io_effects},
960  {VSPRINTF_FUNCTION_NAME, c_io_effects},
961  {VSSCANF_FUNCTION_NAME, c_io_effects},
962  {ISOC99_VSSCANF_FUNCTION_NAME, c_io_effects},
963  {FGETC_FUNCTION_NAME, c_io_effects},
964  {FGETS_FUNCTION_NAME, c_io_effects},
965  {FPUTC_FUNCTION_NAME, c_io_effects},
966  {FPUTS_FUNCTION_NAME, c_io_effects},
967  {GETC_FUNCTION_NAME, c_io_effects},
968  {_IO_GETC_FUNCTION_NAME, c_io_effects},
969  {GETCHAR_FUNCTION_NAME, c_io_effects},
970  {GETS_FUNCTION_NAME, c_io_effects},
971  {PUTC_FUNCTION_NAME, c_io_effects},
972  {_IO_PUTC_FUNCTION_NAME, c_io_effects},
973  {PUTCHAR_FUNCTION_NAME, c_io_effects},
974  {PUTS_FUNCTION_NAME, c_io_effects},
975  {UNGETC_FUNCTION_NAME, c_io_effects},
976  {FREAD_FUNCTION_NAME, c_io_effects},
977  {FWRITE_FUNCTION_NAME, c_io_effects},
978  {FGETPOS_FUNCTION_NAME, c_io_effects},
979  {FSEEK_FUNCTION_NAME, c_io_effects},
980  {FSETPOS_FUNCTION_NAME, c_io_effects},
981  {FTELL_FUNCTION_NAME, c_io_effects},
982  {C_REWIND_FUNCTION_NAME, c_io_effects},
983  {CLEARERR_FUNCTION_NAME, c_io_effects},
984  {FEOF_FUNCTION_NAME, c_io_effects},
985  {FERROR_FUNCTION_NAME, c_io_effects},
986  {PERROR_FUNCTION_NAME, c_io_effects},
987 
988 
989  /* #include <stdlib.h> */
990  {ATOF_FUNCTION_NAME, safe_c_read_only_effects},
991  {ATOI_FUNCTION_NAME, safe_c_read_only_effects},
992  {ATOL_FUNCTION_NAME, safe_c_read_only_effects},
993  {ATOLL_FUNCTION_NAME, safe_c_read_only_effects},
994  {STRTOD_FUNCTION_NAME, strtod_like_effects},
995  {STRTOF_FUNCTION_NAME, strtod_like_effects},
996  {STRTOLD_FUNCTION_NAME, strtod_like_effects},
997  {STRTOL_FUNCTION_NAME, strtol_like_effects},
998  {STRTOLL_FUNCTION_NAME, strtol_like_effects},
999  {STRTOUL_FUNCTION_NAME, strtol_like_effects},
1000  {STRTOULL_FUNCTION_NAME, strtol_like_effects},
1001  {RAND_FUNCTION_NAME, rgs_effects},
1002  {SRAND_FUNCTION_NAME, rgsi_effects},
1003  {CALLOC_FUNCTION_NAME, no_write_effects},
1004  {FREE_FUNCTION_NAME, any_heap_effects},
1005  {MALLOC_FUNCTION_NAME, any_heap_effects},
1006  {REALLOC_FUNCTION_NAME, any_heap_effects},
1007  /* SG: I am setting an any_heap_effects for alloca, which is over pessimistic ... */
1008  {ALLOCA_FUNCTION_NAME, any_heap_effects},
1009  {ABORT_FUNCTION_NAME, end_process_effects},
1010  {ATEXIT_FUNCTION_NAME, end_process_effects},
1011  {EXIT_FUNCTION_NAME, end_process_effects},
1012  // In unistd.h
1013  //{_EXIT_FUNCTION_NAME, end_process_effects},
1014  {GETENV_FUNCTION_NAME, no_write_effects},
1015  {SYSTEM_FUNCTION_NAME, no_write_effects},
1016  {BSEARCH_FUNCTION_NAME, search_or_sort_effects},
1017  {QSORT_FUNCTION_NAME, search_or_sort_effects},
1018  {C_ABS_FUNCTION_NAME, no_write_effects},
1019  {LABS_FUNCTION_NAME, no_write_effects},
1020  {LLABS_FUNCTION_NAME, no_write_effects},
1021  {DIV_FUNCTION_NAME, no_write_effects},
1022  {LDIV_FUNCTION_NAME, no_write_effects},
1023  {LLDIV_FUNCTION_NAME, no_write_effects},
1024  {MBLEN_FUNCTION_NAME, no_write_effects},
1025  {MBTOWC_FUNCTION_NAME, no_write_effects},
1026  {WCTOMB_FUNCTION_NAME, no_write_effects},
1027  {MBSTOWCS_FUNCTION_NAME, no_write_effects},
1028  {WCSTOMBS_FUNCTION_NAME, no_write_effects},
1029 
1030  /*#include <string.h>*/
1031 
1032  //{MEMCPY_FUNCTION_NAME, generic_string_effects},
1033  {MEMCPY_FUNCTION_NAME, memcpy_effects},
1034  {MEMMOVE_FUNCTION_NAME, memcpy_effects},
1035  {STRCPY_FUNCTION_NAME, generic_string_effects},
1036  {STRDUP_FUNCTION_NAME, strdup_effects}, /* according to man page, _BSD_SOURCE || _POSIX_C_SOURCE >= 200809L */
1037  {STRNCPY_FUNCTION_NAME, generic_string_effects},
1038  {STRCAT_FUNCTION_NAME, generic_string_effects},
1039  {STRNCAT_FUNCTION_NAME, generic_string_effects},
1040  {MEMCMP_FUNCTION_NAME, no_write_effects},
1041  {STRCMP_FUNCTION_NAME, memcpy_effects},
1042  {STRCOLL_FUNCTION_NAME, no_write_effects},
1043  {STRNCMP_FUNCTION_NAME, memcpy_effects},
1044  {STRXFRM_FUNCTION_NAME, generic_string_effects},
1045  {MEMCHR_FUNCTION_NAME, no_write_effects},
1046  {STRCHR_FUNCTION_NAME, no_write_effects},
1047  {STRCSPN_FUNCTION_NAME, no_write_effects},
1048  {STRPBRK_FUNCTION_NAME, no_write_effects},
1049  {STRRCHR_FUNCTION_NAME, no_write_effects},
1050  {STRSPN_FUNCTION_NAME, no_write_effects},
1051  {STRSTR_FUNCTION_NAME, no_write_effects},
1052  {STRTOK_FUNCTION_NAME, no_write_effects},
1053  {MEMSET_FUNCTION_NAME, generic_string_effects},
1054  {STRERROR_FUNCTION_NAME, no_write_effects},
1055  {STRERROR_R_FUNCTION_NAME, no_write_effects},
1056  {STRLEN_FUNCTION_NAME, safe_c_read_only_effects},
1057 
1058  /* #include <time.h> */
1059 
1060  /* The effets are wrong or at least incomplete, for most of these
1061  intrinsics functions */
1062 
1063  {GETTIMEOFDAY_FUNCTION_NAME, time_effects},
1064  {SECOND_FUNCTION_NAME, time_effects}, //gfortran extension
1065 
1066  {CLOCK_FUNCTION_NAME, time_effects},
1067  {TIME_FUNCTION_NAME, time_effects},
1068  {DIFFTIME_FUNCTION_NAME, no_write_effects},
1069  // modify its argument...
1070  {MKTIME_FUNCTION_NAME, not_implemented_intrinsics_effects},
1071  // Side effect
1072  {STRFTIME_FUNCTION_NAME, no_write_effects},
1073  // Side effect
1074  {STRPTIME_FUNCTION_NAME, no_write_effects},
1075  // Side effect
1076  {STRFTIME_L_FUNCTION_NAME, no_write_effects},
1077  // Side effect
1078  {STRPTIME_L_FUNCTION_NAME, no_write_effects},
1079  // Conversion function, not thread-safe, writes a static buffer
1080  {GMTIME_FUNCTION_NAME, time_buffer_effects},
1081  // Conversion function, not thread-safe, writes a static buffer
1082  {LOCALTIME_FUNCTION_NAME, time_buffer_effects},
1083  // Thread-safe
1084  {GMTIME_R_FUNCTION_NAME, no_write_effects},
1085  // Thread-safe
1086  {LOCALTIME_R_FUNCTION_NAME, no_write_effects},
1087  // Side effect
1088  {ASCTIME_FUNCTION_NAME, time_buffer_effects},
1089  // Side effect
1090  {CTIME_FUNCTION_NAME, no_write_effects},
1091  // Side effect
1092  {ASCTIME_R_FUNCTION_NAME, no_write_effects},
1093  // Side effect
1094  {CTIME_R_FUNCTION_NAME, no_write_effects},
1095  // Side effect
1096  {TZSET_FUNCTION_NAME, no_write_effects},
1097  // Side effect
1098  {STIME_FUNCTION_NAME, no_write_effects},
1099  {TIMEGM_FUNCTION_NAME, no_write_effects},
1100  {TIMELOCAL_FUNCTION_NAME, no_write_effects},
1101  {DYSIZE_FUNCTION_NAME, no_write_effects},
1102  {NANOSLEEP_FUNCTION_NAME, no_write_effects},
1103  {CLOCK_GETRES_FUNCTION_NAME, no_write_effects},
1104  {CLOCK_GETTIME_FUNCTION_NAME, time_effects},
1105  {CLOCK_SETTIME_FUNCTION_NAME, no_write_effects},
1106  {CLOCK_NANOSLEEP_FUNCTION_NAME, no_write_effects},
1107  {CLOCK_GETCPULOCKID_FUNCTION_NAME, no_write_effects},
1108  {TIMER_CREATE_FUNCTION_NAME, no_write_effects},
1109  {TIMER_DELETE_FUNCTION_NAME, no_write_effects},
1110  {TIMER_SETTIME_FUNCTION_NAME, no_write_effects},
1111  {TIMER_GETTIME_FUNCTION_NAME, no_write_effects},
1112  {TIMER_GETOVERRUN_FUNCTION_NAME, no_write_effects},
1113  {GETDATE_FUNCTION_NAME, no_write_effects},
1114  {GETDATE_R_FUNCTION_NAME, no_write_effects},
1115 
1116  /* #include <wchar.h> */
1117 
1118  {FWSCANF_FUNCTION_NAME, c_io_effects},
1119  {SWSCANF_FUNCTION_NAME, c_io_effects},
1120  {WSCANF_FUNCTION_NAME, c_io_effects},
1121 
1122  /* #include <wctype.h> */
1123 
1124  {ISWALNUM_OPERATOR_NAME, no_write_effects},
1125  {ISWALPHA_OPERATOR_NAME, no_write_effects},
1126  {ISWBLANK_OPERATOR_NAME, no_write_effects},
1127  {ISWCNTRL_OPERATOR_NAME, no_write_effects},
1128  {ISWDIGIT_OPERATOR_NAME, no_write_effects},
1129  {ISWGRAPH_OPERATOR_NAME, no_write_effects},
1130  {ISWLOWER_OPERATOR_NAME, no_write_effects},
1131  {ISWPRINT_OPERATOR_NAME, no_write_effects},
1132  {ISWPUNCT_OPERATOR_NAME, no_write_effects},
1133  {ISWSPACE_OPERATOR_NAME, no_write_effects},
1134  {ISWUPPER_OPERATOR_NAME, no_write_effects},
1135  {ISWXDIGIT_OPERATOR_NAME, no_write_effects},
1136  {ISWCTYPE_OPERATOR_NAME, no_write_effects},
1137  {WCTYPE_OPERATOR_NAME, no_write_effects},
1138  {TOWLOWER_OPERATOR_NAME, no_write_effects},
1139  {TOWUPPER_OPERATOR_NAME, no_write_effects},
1140  {TOWCTRANS_OPERATOR_NAME, no_write_effects},
1141  {WCTRANS_OPERATOR_NAME, no_write_effects},
1142 
1143 
1144 
1145  //not found in standard C99 (in GNU C Library)
1146  {ISASCII_OPERATOR_NAME, no_write_effects}, //This function is a BSD extension and is also an SVID extension.
1147  {TOASCII_OPERATOR_NAME, no_write_effects}, //This function is a BSD extension and is also an SVID extension.
1148  {_TOLOWER_OPERATOR_NAME, no_write_effects}, //This function is provided for compatibility with the SVID
1149  {_TOUPPER_OPERATOR_NAME, no_write_effects}, //This function is provided for compatibility with the SVID
1150 
1151  /* Part of the binary standard */
1152  {CTYPE_B_LOC_OPERATOR_NAME, no_write_effects},
1153 
1154 
1155 
1156  {"__flt_rounds", no_write_effects},
1157 
1158  {"_sysconf", no_write_effects},
1159  {"wdinit", no_write_effects},
1160  {"wdchkind", no_write_effects},
1161  {"wdbindf", no_write_effects},
1162  {"wddelim", no_write_effects},
1163  {"mcfiller", no_write_effects},
1164  {"mcwrap", no_write_effects},
1165 
1166  //GNU C Library
1167  {"dcgettext", no_write_effects},
1168  {"dgettext", no_write_effects},
1169  {"gettext", no_write_effects},
1170  {"textdomain", no_write_effects},
1171  {"bindtextdomain", no_write_effects},
1172 
1173 
1174  /* not found in C99 standard (in GNU C Library) */
1175 
1176  {J0_OPERATOR_NAME, no_write_effects},
1177  {J1_OPERATOR_NAME, no_write_effects},
1178  {JN_OPERATOR_NAME, no_write_effects},
1179  {Y0_OPERATOR_NAME, no_write_effects},
1180  {Y1_OPERATOR_NAME, no_write_effects},
1181  {YN_OPERATOR_NAME, no_write_effects},
1182 
1183  //In the System V math library
1184  {MATHERR_OPERATOR_NAME, no_write_effects},
1185 
1186  //This function exists mainly for use in certain standardized tests of IEEE 754 conformance.
1187  {SIGNIFICAND_OPERATOR_NAME, no_write_effects},
1188 
1189  /* netdb.h not in C99 standard (in GNU library) */
1190  {__H_ERRNO_LOCATION_OPERATOR_NAME, no_write_effects},
1191 
1192  /* bits/errno.h */
1193  {__ERRNO_LOCATION_OPERATOR_NAME, no_write_effects},
1194 
1195 
1196  //Posix LEGACY Std 1003.1
1197  {ECVT_FUNCTION_NAME, no_write_effects},
1198  {FCVT_FUNCTION_NAME, no_write_effects},
1199  {GCVT_FUNCTION_NAME, no_write_effects},
1200 
1201 
1202  /* Random number generators in stdlib.h Conforming to SVr4, POSIX.1-2001 but not in C99 */
1203 
1204  {RANDOM_FUNCTION_NAME, rgs_effects},
1205  {SRANDOM_FUNCTION_NAME, rgsi_effects},
1206  {DRAND48_FUNCTION_NAME, rgs_effects},
1207  {ERAND48_FUNCTION_NAME, rgs_effects},
1208  {JRAND48_FUNCTION_NAME, rgs_effects},
1209  {LRAND48_FUNCTION_NAME, rgs_effects},
1210  {MRAND48_FUNCTION_NAME, rgs_effects},
1211  {NRAND48_FUNCTION_NAME, rgs_effects},
1212  {SRAND48_FUNCTION_NAME, rgsi_effects},
1213  {SEED48_FUNCTION_NAME, rgsi_effects},
1214  {LCONG48_FUNCTION_NAME, rgsi_effects},
1215 
1216 
1217  //Posix
1218  {POSIX_MEMALIGN_FUNCTION_NAME, any_heap_effects},
1219  {MEMALIGN_FUNCTION_NAME, any_heap_effects},
1220  {ATOQ_FUNCTION_NAME, no_write_effects},
1221  {LLTOSTR_FUNCTION_NAME, safe_c_effects},
1222  {ULLTOSTR_FUNCTION_NAME, no_write_effects},
1223 
1224  //MB: not found in C99 standard. POSIX.2
1225  {__FILBUF_FUNCTION_NAME, no_write_effects},
1226  {__FILSBUF_FUNCTION_NAME, no_write_effects},
1227  {SETBUFFER_FUNCTION_NAME, no_write_effects},
1228  {SETLINEBUF_FUNCTION_NAME, no_write_effects},
1229  {FDOPEN_FUNCTION_NAME, no_write_effects},
1230  {CTERMID_FUNCTION_NAME, no_write_effects},
1231  {FILENO_FUNCTION_NAME, no_write_effects},
1232  {POPEN_FUNCTION_NAME, no_write_effects},
1233  {CUSERID_FUNCTION_NAME, no_write_effects},
1234  {TEMPNAM_FUNCTION_NAME, no_write_effects},
1235  {GETOPT_FUNCTION_NAME, no_write_effects}, // unistd.h,
1236  // side effects
1237  {GETOPT_LONG_FUNCTION_NAME, no_write_effects}, // getopt.h,
1238  // side effects
1239  {GETOPT_LONG_ONLY_FUNCTION_NAME, no_write_effects}, // same
1240  // as above
1241  {GETSUBOPT_FUNCTION_NAME, no_write_effects},
1242  {GETW_FUNCTION_NAME, no_write_effects},
1243  {PUTW_FUNCTION_NAME, no_write_effects},
1244  {PCLOSE_FUNCTION_NAME, no_write_effects},
1245  {FSEEKO_FUNCTION_NAME, no_write_effects},
1246  {FTELLO_FUNCTION_NAME, no_write_effects},
1247  {FOPEN64_FUNCTION_NAME, no_write_effects},
1248  {FREOPEN64_FUNCTION_NAME, no_write_effects},
1249  {TMPFILE64_FUNCTION_NAME, no_write_effects},
1250  {FGETPOS64_FUNCTION_NAME, no_write_effects},
1251  {FSETPOS64_FUNCTION_NAME, no_write_effects},
1252  {FSEEKO64_FUNCTION_NAME, no_write_effects},
1253  {FTELLO64_FUNCTION_NAME, no_write_effects},
1254 
1255  //MB: not found in C99
1256  {SINGLE_TO_DECIMAL_OPERATOR_NAME, no_write_effects},
1257  {DOUBLE_TO_DECIMAL_OPERATOR_NAME, no_write_effects},
1258  {EXTENDED_TO_DECIMAL_OPERATOR_NAME, no_write_effects},
1259  {QUADRUPLE_TO_DECIMAL_OPERATOR_NAME, no_write_effects},
1260  {DECIMAL_TO_SINGLE_OPERATOR_NAME, no_write_effects},
1261  {DECIMAL_TO_DOUBLE_OPERATOR_NAME, no_write_effects},
1262  {DECIMAL_TO_EXTENDED_OPERATOR_NAME, no_write_effects},
1263  {DECIMAL_TO_QUADRUPLE_OPERATOR_NAME, no_write_effects},
1264  {STRING_TO_DECIMAL_OPERATOR_NAME, no_write_effects},
1265  {FUNC_TO_DECIMAL_OPERATOR_NAME, no_write_effects},
1266  {FILE_TO_DECIMAL_OPERATOR_NAME, no_write_effects},
1267  //3bsd
1268  {SECONVERT_OPERATOR_NAME, no_write_effects},
1269  {SFCONVERT_OPERATOR_NAME, no_write_effects},
1270  {SGCONVERT_OPERATOR_NAME, no_write_effects},
1271  {ECONVERT_OPERATOR_NAME, no_write_effects},
1272  {FCONVERT_OPERATOR_NAME, no_write_effects},
1273  {GCONVERT_OPERATOR_NAME, no_write_effects},
1274  {QECONVERT_OPERATOR_NAME, no_write_effects},
1275  {QFCONVERT_OPERATOR_NAME, no_write_effects},
1276  {QGCONVERT_OPERATOR_NAME, no_write_effects},
1277 
1278  /* C IO system functions in man -S 2, unless they also are in unistd.h */
1279 
1280  {C_OPEN_FUNCTION_NAME, unix_io_effects},
1281  {CREAT_FUNCTION_NAME, unix_io_effects},
1282 
1283  {FCNTL_FUNCTION_NAME, unix_io_effects},
1284  {IOCTL_FUNCTION_NAME, unix_io_effects},
1285  {SELECT_FUNCTION_NAME, unix_io_effects},
1286  {PSELECT_FUNCTION_NAME, unix_io_effects},
1287  {STAT_FUNCTION_NAME, no_write_effects}, /* sys/stat.h */
1288  {FSTAT_FUNCTION_NAME, unix_io_effects},
1289  {LSTAT_FUNCTION_NAME, no_write_effects},
1290 
1291  /* unistd.h, in the header file order */
1292 
1293  {LSEEK_FUNCTION_NAME, unix_io_effects},
1294  {LSEEK64_FUNCTION_NAME, unix_io_effects},
1295  {C_CLOSE_FUNCTION_NAME, unix_io_effects},
1296  {C_READ_FUNCTION_NAME, unix_io_effects},
1297  {C_WRITE_FUNCTION_NAME, unix_io_effects},
1298  {PREAD_FUNCTION_NAME, unix_io_effects},
1299  {PWRITE_FUNCTION_NAME, unix_io_effects},
1300  {PREAD64_FUNCTION_NAME, unix_io_effects},
1301  {PIPE_FUNCTION_NAME, no_write_effects},
1302  {PIPE2_FUNCTION_NAME, no_write_effects},
1303  {SLEEP_FUNCTION_NAME, no_write_effects},
1304  {UALARM_FUNCTION_NAME, no_write_effects},
1305  {USLEEP_FUNCTION_NAME, no_write_effects},
1306  {C_PAUSE_FUNCTION_NAME, no_write_effects},
1307  {CHOWN_FUNCTION_NAME, no_write_effects},
1308  {FCHOWN_FUNCTION_NAME, no_write_effects},
1309  {LCHOWN_FUNCTION_NAME, no_write_effects},
1310  {FCHOWNAT_FUNCTION_NAME, no_write_effects},
1311  {CHDIR_FUNCTION_NAME, no_write_effects},
1312  {FCHDIR_FUNCTION_NAME, no_write_effects},
1313  {GETCWD_FUNCTION_NAME, no_write_effects},
1314  {GET_CURRENT_DIR_NAME_FUNCTION_NAME, no_write_effects},
1315  {GETWD_FUNCTION_NAME, no_write_effects},
1316  {DUP_FUNCTION_NAME, no_write_effects},
1317  {DUP2_FUNCTION_NAME, no_write_effects},
1318  {DUP3_FUNCTION_NAME, no_write_effects},
1319  {EXECVE_FUNCTION_NAME, no_write_effects},
1320  {FEXECVE_FUNCTION_NAME, no_write_effects},
1321  {EXECV_FUNCTION_NAME, no_write_effects},
1322  {EXECLE_FUNCTION_NAME, no_write_effects},
1323  {EXECL_FUNCTION_NAME, no_write_effects},
1324  {EXECVP_FUNCTION_NAME, no_write_effects},
1325  {EXECLP_FUNCTION_NAME, no_write_effects},
1326  {EXECVPE_FUNCTION_NAME, no_write_effects},
1327  {NICE_FUNCTION_NAME, no_write_effects},
1328  {_EXIT_FUNCTION_NAME, end_process_effects},
1329  {PATHCONF_FUNCTION_NAME, no_write_effects},
1330  {FPATHCONF_FUNCTION_NAME, no_write_effects},
1331  {SYSCONF_FUNCTION_NAME, no_write_effects},
1332  {CONFSTR_FUNCTION_NAME, no_write_effects},
1333  {GETPID_FUNCTION_NAME, no_write_effects},
1334  {GETPPID_FUNCTION_NAME, no_write_effects},
1335  {GETPGRP_FUNCTION_NAME, no_write_effects},
1336  {__GETPGID_FUNCTION_NAME, no_write_effects},
1337  {GETPGID_FUNCTION_NAME, no_write_effects},
1338  {SETPGID_FUNCTION_NAME, no_write_effects},
1339  {SETPGRP_FUNCTION_NAME, no_write_effects},
1340  {SETSID_FUNCTION_NAME, no_write_effects},
1341  {GETSID_FUNCTION_NAME, no_write_effects},
1342  {GETUID_FUNCTION_NAME, no_write_effects},
1343  {GETEUID_FUNCTION_NAME, no_write_effects},
1344  {GETGID_FUNCTION_NAME, no_write_effects},
1345  {GETEGID_FUNCTION_NAME, no_write_effects},
1346  {GETPGROUPS_FUNCTION_NAME, no_write_effects},
1347  {GROUP_MEMBER_FUNCTION_NAME, no_write_effects},
1348  {SETUID_FUNCTION_NAME, no_write_effects},
1349  {SETREUID_FUNCTION_NAME, no_write_effects},
1350  {SETEUID_FUNCTION_NAME, no_write_effects},
1351  {SETGID_FUNCTION_NAME, no_write_effects},
1352  {SETREGID_FUNCTION_NAME, no_write_effects},
1353  {SETEGID_FUNCTION_NAME, no_write_effects},
1354  {GETRESUID_FUNCTION_NAME, no_write_effects},
1355  {GETRESGID_FUNCTION_NAME, no_write_effects},
1356  {SETRESUID_FUNCTION_NAME, no_write_effects},
1357  {SETRESGID_FUNCTION_NAME, no_write_effects},
1358  {FORK_FUNCTION_NAME, no_write_effects},
1359  {VFORK_FUNCTION_NAME, no_write_effects},
1360  {TTYNAME_FUNCTION_NAME, no_write_effects},
1361  {TTYNAME_R_FUNCTION_NAME, no_write_effects},
1362  {ISATTY_FUNCTION_NAME, no_write_effects},
1363  {TTYSLOT_FUNCTION_NAME, no_write_effects},
1364  {LINK_FUNCTION_NAME, c_io_effects},
1365  {LINKAT_FUNCTION_NAME, no_write_effects},
1366  {SYMLINK_FUNCTION_NAME, c_io_effects},
1367  {READLINK_FUNCTION_NAME, c_io_effects},
1368  {SYMLINKAT_FUNCTION_NAME, no_write_effects},
1369  {READLINKAT_FUNCTION_NAME, no_write_effects},
1370  {UNLINK_FUNCTION_NAME, c_io_effects},
1371  {UNLINKAT_FUNCTION_NAME, c_io_effects},
1372  {RMDIR_FUNCTION_NAME, no_write_effects},
1373  {TCGETPGRP_FUNCTION_NAME, no_write_effects},
1374  {TCSETPGRP_FUNCTION_NAME, no_write_effects},
1375  {GETLOGIN_FUNCTION_NAME, no_write_effects},
1376  {GETLOGIN_R_FUNCTION_NAME, no_write_effects},
1377  {SETLOGIN_FUNCTION_NAME, no_write_effects},
1378  {GETHOSTNAME_FUNCTION_NAME, no_write_effects},
1379  {SETHOSTNAME_FUNCTION_NAME, no_write_effects},
1380  {SETHOSTID_FUNCTION_NAME, no_write_effects},
1381  {GETDOMAINNAME_FUNCTION_NAME, no_write_effects},
1382  {SETDOMAINNAME_FUNCTION_NAME, no_write_effects},
1383  {VHANGUP_FUNCTION_NAME, no_write_effects},
1384  {REVOKE_FUNCTION_NAME, no_write_effects},
1385  {PROFIL_FUNCTION_NAME, no_write_effects},
1386  {ACCT_FUNCTION_NAME, no_write_effects},
1387  {GETUSERSHELL_FUNCTION_NAME, no_write_effects},
1388  {ENDUSERSHELL_FUNCTION_NAME, no_write_effects},
1389  {SETUSERSHELL_FUNCTION_NAME, no_write_effects},
1390  {DAEMON_FUNCTION_NAME, no_write_effects},
1391  {CHROOT_FUNCTION_NAME, no_write_effects},
1392  {GETPASS_FUNCTION_NAME, no_write_effects},
1393  {FSYNC_FUNCTION_NAME, unix_io_effects},
1394  {SYNCFS_FUNCTION_NAME, no_write_effects},
1395  {GETHOSTID_FUNCTION_NAME, no_write_effects},
1396  {GETPAGESIZE_FUNCTION_NAME, no_write_effects},
1397  {GETDTABLESIZE_FUNCTION_NAME, no_write_effects},
1398  {TRUNCATE_FUNCTION_NAME, no_write_effects},
1399  {TRUNCATE64_FUNCTION_NAME, no_write_effects},
1400  {FTRUNCATE_FUNCTION_NAME, no_write_effects},
1401  {FTRUNCATE64_FUNCTION_NAME, no_write_effects},
1402  {BRK_FUNCTION_NAME, no_write_effects},
1403  {SBRK_FUNCTION_NAME, no_write_effects},
1404  {SYSCALL_FUNCTION_NAME, no_write_effects},
1405  {LOCKF_FUNCTION_NAME, no_write_effects},
1406  {LOCKF64_FUNCTION_NAME, no_write_effects},
1407  {FDATASYNC_FUNCTION_NAME, unix_io_effects},
1408  {CRYPT_FUNCTION_NAME, no_write_effects},
1409  {ENCRYPT_FUNCTION_NAME, no_write_effects},
1410  {SWAB_FUNCTION_NAME, no_write_effects},
1411  // Also found in stdio.h
1412  // {CTERMID_FUNCTION_NAME, no_write_effects},
1413 
1414  /* {char *getenv(const char *, 0, 0},
1415  {long int labs(long, 0, 0},
1416  {ldiv_t ldiv(long, long, 0, 0},*/
1417 
1418  /* F95 */
1419  {ALLOCATE_FUNCTION_NAME, any_heap_effects},
1420  {DEALLOCATE_FUNCTION_NAME, any_heap_effects},
1421  {ETIME_FUNCTION_NAME, no_write_effects},
1422  {DTIME_FUNCTION_NAME, no_write_effects},
1423  {CPU_TIME_FUNCTION_NAME, no_write_effects},
1424 
1425  /* F2003 */
1426  {C_LOC_FUNCTION_NAME, no_write_effects},
1427 
1428  /* BSD <err.h> */
1429  /* SG: concerning the err* family of functions, they also exit() from the program
1430  * This is not represented in the EXIT_FUNCTION_NAME description, so neither it is here
1431  * but it seems an error to me */
1432  {ERR_FUNCTION_NAME, c_io_effects},
1433  {ERRX_FUNCTION_NAME, c_io_effects},
1434  {WARN_FUNCTION_NAME, c_io_effects},
1435  {WARNX_FUNCTION_NAME, c_io_effects},
1436  {VERR_FUNCTION_NAME, c_io_effects},
1437  {VERRX_FUNCTION_NAME, c_io_effects},
1438  {VWARN_FUNCTION_NAME, c_io_effects},
1439  {VWARNX_FUNCTION_NAME, c_io_effects},
1440 
1441  /*Conforming to 4.3BSD, POSIX.1-2001.*/
1442  /* POSIX.1-2001 declares this function obsolete; use nanosleep(2) instead.*/
1443  /*POSIX.1-2008 removes the specification of usleep()*/
1444  {USLEEP_FUNCTION_NAME, no_write_effects},
1445 
1446  /* _POSIX_C_SOURCE >= 199309L */
1447  {NANOSLEEP_FUNCTION_NAME, safe_c_effects},
1448 
1449  /* assembly code */
1451 
1452  /* PIPS internal intrinsics */
1454  {PIPS_IO_BARRIER_OPERATOR_NAME, make_io_read_write_memory_effects},
1455 
1456  /* SPIRE intrinsics */
1457  {SEND_FUNCTION_NAME, c_io_effects},
1458  {RECV_FUNCTION_NAME, c_io_effects},
1459 
1460  /* MPI intrinsics */
1461  {MPI_INIT_FUNCTION_NAME, mpi_functions_effects},
1462  {MPI_FINALIZE_FUNCTION_NAME, mpi_functions_effects},
1463  {MPI_BARRIER_FUNCTION_NAME, mpi_functions_effects},
1464 //TODO Check effet
1465  {MPI_COMM_SIZE_FUNCTION_NAME, mpi_functions_effects},
1466  {MPI_COMM_RANK_FUNCTION_NAME, mpi_functions_effects},
1467  {MPI_SEND_FUNCTION_NAME, mpi_send_effects},
1468  {MPI_SSEND_FUNCTION_NAME, mpi_functions_effects},
1469  {MPI_RSEND_FUNCTION_NAME, mpi_functions_effects},
1470  {MPI_BSEND_FUNCTION_NAME, mpi_functions_effects},
1471  {MPI_ISEND_FUNCTION_NAME, mpi_functions_effects},
1472  {MPI_ISSEND_FUNCTION_NAME, mpi_functions_effects},
1473  {MPI_IRSEND_FUNCTION_NAME, mpi_functions_effects},
1474  {MPI_IBSEND_FUNCTION_NAME, mpi_functions_effects},
1475  {MPI_RECV_FUNCTION_NAME, mpi_functions_effects},
1476  {MPI_IRECV_FUNCTION_NAME, mpi_functions_effects},
1477  {MPI_SENDRECV_FUNCTION_NAME, mpi_functions_effects},
1478 
1479 
1480  /* {int mblen(const char *, size_t, 0, 0},
1481  {size_t mbstowcs(wchar_t *, const char *, size_t, 0, 0},
1482  {int mbtowc(wchar_t *, const char *, size_t, 0, 0},
1483  {void qsort(void *, size_t, size_t,
1484  int (*)(const void *, const void *), 0, 0},
1485  {int rand(void, 0, 0},
1486  {void *realloc(void *, size_t, 0, 0},
1487  {void srand(unsigned int, 0, 0},
1488  {double strtod(const char *, char **, 0, 0},
1489  {long int strtol(const char *, char **, int, 0, 0},
1490  {unsigned long int strtoul(const char *, char **, int, 0, 0},
1491  {int system(const char *, 0, 0},
1492  {int wctomb(char *, wchar_t, 0, 0},
1493  {size_t wcstombs(char *, const wchar_t *, size_t, 0, 0},
1494  {void _exithandle(void, 0, 0},
1495  {double drand48(void, 0, 0},
1496  {double erand48(unsigned short *, 0, 0},
1497  {long jrand48(unsigned short *, 0, 0},
1498  {void lcong48(unsigned short *, 0, 0},
1499  {long lrand48(void, 0, 0},
1500  {long mrand48(void, 0, 0},
1501  {long nrand48(unsigned short *, 0, 0},
1502  {unsigned short *seed48(unsigned short *, 0, 0},
1503  {void srand48(long, 0, 0},
1504  {int putenv(char *, 0, 0},
1505  {void setkey(const char *, 0, 0},
1506  {void swab(const char *, char *, ssize_t, 0, 0},
1507  {int mkstemp(char *, 0, 0},
1508  {int mkstemp64(char *, 0, 0},
1509  {long a64l(const char *, 0, 0},
1510  {char *ecvt(double, int, int *, int *, 0, 0},
1511  {char *fcvt(double, int, int *, int *, 0, 0},
1512  {char *gcvt(double, int, char *, 0, 0},
1513  {int getsubopt(char **, char *const *, char **, 0, 0},
1514  {int grantpt(int, 0, 0},
1515  {char *initstate(unsigned, char *, size_t, 0, 0},
1516  {char *l64a(long, 0, 0},
1517  {char *mktemp(char *, 0, 0},
1518  {char *ptsname(int, 0, 0},
1519  {long random(void, 0, 0},
1520  {char *realpath(const char *, char *, 0, 0},
1521  {char *setstate(const char *, 0, 0},
1522  {void srandom(unsigned, 0, 0},
1523  {int ttyslot(void, 0, 0},
1524  {int unlockpt(int, 0, 0},
1525  {void *valloc(size_t, 0, 0},
1526  {int dup2(int, int, 0, 0},
1527  {char *qecvt(long double, int, int *, int *, 0, 0},
1528  {char *qfcvt(long double, int, int *, int *, 0, 0},
1529  {char *qgcvt(long double, int, char *, 0, 0},
1530  {char *getcwd(char *, size_t, 0, 0},
1531  {const char *getexecname(void, 0, 0},
1532  {char *getlogin(void, 0, 0},
1533  {int getopt(int, char *const *, const char *, 0, 0},
1534  {char *optarg;
1535  {int optind, opterr, optopt;
1536  {char *getpass(const char *, 0, 0},
1537  {char *getpassphrase(const char *, 0, 0},
1538  {int getpw(uid_t, char *, 0, 0},
1539  {int isatty(int, 0, 0},
1540  {void *memalign(size_t, size_t, 0, 0},
1541  {char *ttyname(int, 0, 0},
1542  {long long atoll(const char *, 0, 0},
1543  {long long llabs(long long, 0, 0},
1544  {lldiv_t lldiv(long long, long long, 0, 0},
1545  {char *lltostr(long long, char *, 0, 0},
1546  {long long strtoll(const char *, char **, int, 0, 0},
1547  {unsigned long long strtoull(const char *, char **, int, 0, 0},
1548  {char *ulltostr(unsigned long long, char *, 0, 0},*/
1549  {NULL, 0}
1550 };
1551 
1552 
1553 
1554 /* list generic_proper_effects_of_intrinsic(entity e, list args)
1555  * @return the corresponding list of effects.
1556  * @param e, an intrinsic function name,
1557  * @param args, the list or arguments.
1558  * modifies : nothing.
1559  * comment :
1560  */
1561 list
1563 {
1564  const char* s = entity_local_name(e);
1565  IntrinsicDescriptor *pid = IntrinsicEffectsDescriptorTable;
1566  list lr;
1567 
1568  pips_debug(3, "begin\n");
1569 
1570  while (pid->name != NULL) {
1571  if (strcmp(pid->name, s) == 0) {
1572  lr = (*(pid->effects_function))(e, args);
1573  pips_debug(3, "end\n");
1574  return(lr);
1575  }
1576 
1577  pid += 1;
1578  }
1579 
1580  pips_internal_error("unknown intrinsic \"%s\"\n", s);
1581 
1582  return(NIL);
1583 }
1584 
1585 /**
1586  * In Fortran, write on parameters can be observed by the caller,
1587  * hence the historical name of this function. Not in C, where
1588  * parameter are passed by value. However dereferencings and side
1589  * effects are much more common in C. In case a pointer is passed, it
1590  * is not possible, in general, to guess if it is dereference or
1591  * not. However, pointers passed to intrinsics are passed to be
1592  * dereferenced. Unfortunately, this function is called recursively
1593  * and the above rule does not apply in general. Specific functions
1594  * are needed to handle intrinics precisely.
1595  *
1596  * NL: the name of the function is certainly badly chosen
1597  * because it also compute side effects, which induce write effects.
1598  *
1599  * FI: beware when pointers are passed, directly or indirectly, via an
1600  * array containing pointers or structs, or a struct containing
1601  * pointers or arrays, and when they are dereferenced. However,
1602  * intrinsics are unlikely to have struct as argument because they
1603  * are inefficiently passed by value. Arrays of structs or
1604  * pointers are unlikely too.
1605  */
1606 static list
1607 no_write_effects(entity e __attribute__ ((__unused__)), list args)
1608 {
1609  list lr;
1610 
1611  pips_debug(5, "begin\n");
1613  if(false) {
1614  FOREACH(EXPRESSION, a, args) {
1616  if(pointer_type_p(at)) {
1617  // Look for the sinks
1618  list cl = actual_pointer_argument_to_cells(a);
1619  list el = cells_to_read_effects(cl);
1620  lr = gen_nconc(lr, el);
1621  }
1622  else if(array_type_p(at)) {
1623  // pips_internal_error("No array that is not used as pointer expected as intrinsic argument.\n");
1624  list cl = actual_pointer_argument_to_cells(a);
1625  list el = cells_to_read_effects(cl);
1626  lr = gen_nconc(lr, el);
1627  }
1628  else if(struct_type_p(at)) {
1629  pips_internal_error("No struct expected as intrinsic argument.\n");
1630  }
1631  else {
1632  ; // ignore
1633  }
1634  }
1635  }
1636  pips_debug(5, "end\n");
1637  return(lr);
1638 }
1639 
1640 
1641 /**
1642  assumes may read and write effects on the objects pointed to by actual arguments
1643 
1644  Hopefully also used for empty functions, i.e. functions with an
1645  empty statement, which, most of the time, are unknown functions.
1646  */
1647 static list
1648 safe_c_effects(entity e __attribute__ ((__unused__)),list args)
1649 {
1650  list lw = NIL, lr = NIL;
1651 
1652  pips_debug(5, "begin\n");
1654  FOREACH(EXPRESSION, arg, args)
1655  {
1657  }
1658  pips_debug(5, "end\n");
1659  lr = gen_nconc(lr, lw);
1660  return(lr);
1661 }
1662 
1663 static list
1664 safe_c_read_only_effects(entity e __attribute__ ((__unused__)),list args)
1665 {
1666  list lw = NIL, lr = NIL;
1667 
1668  pips_debug(5, "begin\n");
1670  FOREACH(EXPRESSION, arg, args)
1671  {
1673  }
1674  pips_debug(5, "end\n");
1675  lr = gen_nconc(lr, lw);
1676  return(lr);
1677 }
1678 
1679 
1680 static list
1681 address_expression_effects(entity op, list args)
1682 {
1683  list le = list_undefined;
1684  expression ne = make_call_expression(op, args);
1686 
1687  pips_debug(5, "begin\n");
1689  call_function(nc) = entity_undefined; // useless because of persistance
1690  call_arguments(nc) = NIL;
1691  free_expression(ne);
1692  pips_debug(5, "end\n");
1693  return le;
1694 }
1695 
1696 static list
1697 conditional_effects(entity e __attribute__ ((__unused__)),list args)
1698 {
1699  list le;
1700 
1701  pips_debug(5, "begin\n");
1702  expression cond = EXPRESSION(CAR(args));
1703  expression et = EXPRESSION(CAR(CDR(args)));
1704  expression ef = EXPRESSION(CAR(CDR(CDR(args))));
1705 
1709 
1710  // functions that can be pointed by effects_test_union_op:
1711  // EffectsMayUnion
1712  // RegionsMayUnion
1713  // ReferenceTestUnion
1714  le = (*effects_test_union_op)(lt, lf, effects_scalars_and_same_action_p);
1715 
1716  pips_debug_effects(8, "Effects for the two branches:\n", le);
1717 
1718  // functions that can be pointed by effects_union_op:
1719  // ProperEffectsMustUnion
1720  // RegionsMustUnion
1721  // ReferenceUnion
1722  // EffectsMustUnion
1723  le = (*effects_union_op)(le, lc, effects_scalars_and_same_action_p);
1724 
1725  pips_debug(5, "end\n");
1726  return le;
1727 }
1728 
1729 static list
1730 address_of_effects(entity f __attribute__ ((__unused__)),list args)
1731 {
1732  list lr;
1733  expression e = EXPRESSION(CAR(args));
1734  syntax s = expression_syntax(e);
1735  pips_debug(5, "begin\n");
1736  pips_assert("address of has only one argument", gen_length(args)==1);
1737 
1738  if( syntax_reference_p(s))
1739  {
1740  reference r = syntax_reference(s);
1741  list i = reference_indices(r);
1743  if (!get_bool_property("MEMORY_EFFECTS_ONLY"))
1744  lr = CONS(EFFECT, make_declaration_effect(reference_variable(r), false), lr);
1745  }
1746  else
1747  {
1748  list l_eff = NIL;
1750  /* there is no effect on the argument of & */
1751  effects_free(l_eff);
1752  }
1753 
1754  pips_debug_effects(5, "end\n", lr);
1755  return(lr);
1756 }
1757 
1758 /* @return the corresponding list of effects.
1759  * @param args, the list or arguments.
1760  * @param update_p, set to true if the operator is an update operator (i.e +=)
1761  * @param unique_p, set to true if the operator is an unique operator (i.e ++)
1762  * Three different cases are handled:
1763  * the standard assignement: x = y;
1764  * the assignement with update, x+=y, which implies first a read of the lhs
1765  * the update, x++, which has no rhs
1766  */
1767 static list any_affect_effects(entity e __attribute__ ((__unused__)),
1768  list args,
1769  bool update_p,
1770  bool unique_p)
1771 {
1772  list le = NIL;
1773  expression lhs = EXPRESSION(CAR(args));
1774 
1775  pips_debug(5, "begin\n");
1776 
1777  if (update_p)
1778  {
1779  pips_debug(5, "update_p is true\n");
1781  }
1782 
1784 
1785  if(!unique_p)
1786  {
1787  pips_debug(5, "unique_p is false\n");
1788 
1789  expression rhs = EXPRESSION(CAR(CDR(args)));
1791  }
1792 
1793  ifdebug(5)
1794  {
1795  pips_debug(5, "end with effects :\n");
1796  (*effects_prettyprint_func)(le);
1797  }
1798 
1799  return le;
1800 }
1801 
1802 static list affect_effects(entity e __attribute__ ((__unused__)),list args)
1803 {
1804  return any_affect_effects(e, args, false, false);
1805 }
1806 
1807 static list
1808 update_effects(entity e __attribute__ ((__unused__)),list args)
1809 {
1810  return any_affect_effects(e, args, true, false);
1811 }
1812 
1813 static list
1814 unique_update_effects(entity e __attribute__ ((__unused__)),list args)
1815 {
1816  return any_affect_effects(e, args, true, true);
1817 }
1818 
1819 static list
1820 assign_substring_effects(entity e __attribute__ ((__unused__)), list args)
1821 {
1822  list le = NIL;
1823 
1824  expression lhs = EXPRESSION(CAR(args));
1825  syntax s = expression_syntax(lhs);
1826  expression l = EXPRESSION(CAR(CDR(args)));
1827  expression u = EXPRESSION(CAR(CDR(CDR(args))));
1828  expression rhs = EXPRESSION(CAR(CDR(CDR(CDR(args)))));
1829 
1830  pips_debug(5, "begin\n");
1831 
1832  if (! syntax_reference_p(s))
1833  pips_internal_error("not a reference");
1834 
1835 
1839 
1841 
1842  pips_debug(5, "end\n");
1843  return(le);
1844 }
1845 
1846 static list
1847 substring_effect(entity e __attribute__ ((__unused__)), list args)
1848 {
1849  list le = NIL;
1850  expression expr = EXPRESSION(CAR(args));
1851  expression l = EXPRESSION(CAR(CDR(args)));
1852  expression u = EXPRESSION(CAR(CDR(CDR(args))));
1853 
1854  pips_debug(5, "begin\n");
1855 
1857  pips_internal_error("not a reference");
1858 
1862 
1863  pips_debug(5, "end\n");
1864 
1865  return(le);
1866 }
1867 
1868 static IoElementDescriptor*
1869 search_io_element(const char *s, const char *i)
1870 {
1872 
1873  while (p->StmtName != NULL) {
1874  if (strcmp(p->StmtName, s) == 0 && strcmp(p->IoElementName, i) == 0)
1875  return(p);
1876  p += 1;
1877  }
1878 
1879  pips_internal_error("unknown io element %s %s", s, i);
1880  /* Never reaches this point. Only to avoid a warning at compile time. BC. */
1882 }
1883 
1884 /* return the appropriate C IO function.Amira Mensi*/
1885 static IoElementDescriptor*
1886 search_c_io_Element(const char *s)
1887 {
1889 
1890  while (p->StmtName != NULL) {
1891  if (strcmp(p->StmtName, s) == 0)
1892  return(p);
1893  p += 1;
1894  }
1895 
1896  pips_internal_error("unknown io element %s", s);
1897 
1899 }
1900 
1901 static list generic_logical_units_effects(expression unit, bool only_read_p) {
1902  pips_debug(8, "begin\n");
1903  list le = NIL;
1904 
1905 // // To know if LUNS are used in code, so if they have to appear on return statement
1906 // /**
1907 // * NL: to be more precise (EXACT READ for return), we can keep a list of all the LUNS used
1908 // */
1909 // static bool use_luns_p = false;
1910 // if (only_read_p && !use_luns_p) {
1911 // return le;
1912 // }
1913 // use_luns_p = true;
1914 
1916  entity private_io_entity =
1918  pips_assert("private_io_entity is defined",
1919  !entity_undefined_p(private_io_entity));
1920 
1921  reference ref1 = make_reference(private_io_entity, indices);
1922 
1923  /**
1924  * NL: If it's not unbounded and not a number, unit expression must have some READ (and WRITE?)
1925  */
1926  // Add Read Effects/Regions
1929  // NL: it's was done after the if
1930  //if (!only_read_p) {
1931  // reference ref2 = copy_reference(ref1);
1932  // /**
1933  // * NL: we can have a duplication of a READ on unit
1934  // * but (*reference_to_effect_func) doestn't keep polyhedral constraint
1935  // * and we will have to add it manually
1936  // * so decide to use generic_proper_effects_of_write_reference
1937  // * even if it implicate duplication of READ on unit
1938  // */
1939  // le = gen_nconc(le, generic_proper_effects_of_written_reference(ref2));
1940  //}
1941  }
1942  else {
1943  /* FI: I would like not to use "preference" instead of
1944  * "reference", but this causes a bug in cumulated effects and I
1945  * do not have time to chase it. */
1946  // functions that can be pointed by reference_to_effect_func:
1947  // reference_to_simple_effect
1948  // reference_to_convex_region
1949  // reference_to_reference_effect
1950  effect eff1 = (*reference_to_effect_func)(ref1, make_action_read_memory(), true);
1952  effect_to_may_effect(eff1);
1953  }
1954  le = gen_nconc(le, CONS(EFFECT, eff1, NIL));
1955  }
1956 
1957  // Add Write Effects/Regions
1958  if (!only_read_p) {
1959  reference ref2 = copy_reference(ref1);
1960  /* FI: I would like not to use "preference" instead of
1961  * "reference", but this causes a bug in cumulated effects and I
1962  * do not have time to chase it. */
1963  // functions that can be pointed by reference_to_effect_func:
1964  // reference_to_simple_effect
1965  // reference_to_convex_region
1966  // reference_to_reference_effect
1967  effect eff2 = (*reference_to_effect_func)(ref2, make_action_write_memory(), true);
1969  effect_to_may_effect(eff2);
1970  }
1971  le = gen_nconc(le, CONS(EFFECT, eff2, NIL));
1972  }
1973 
1974  // Add Read Environment for LUNS
1975  if (!get_bool_property("MEMORY_EFFECTS_ONLY")) {
1976  //reference refe = make_reference(private_io_entity, NIL);
1977  // functions that can be pointed by reference_to_effect_func:
1978  // reference_to_simple_effect
1979  // reference_to_convex_region
1980  // reference_to_reference_effect
1981  //effect effe = (*reference_to_effect_func)(refe, make_action_read(make_action_kind_environment()), true);
1982  effect effe = make_declaration_effect(private_io_entity, false);
1983  le = gen_nconc(CONS(EFFECT, effe, NIL), le);
1984  }
1985 
1986  // Add context constraint if available
1987  // come from generic_proper_effects_of_reference
1991  // NL: In some case context can be undefined (I don't know how?)
1993  // functions that can be pointed by effects_precondition_composition_op:
1994  // effects_composition_with_preconditions_nop
1995  // convex_regions_precondition_compose
1996  (*effects_precondition_composition_op)(le, context, false);
1997  }
1998  }
1999 
2000  ifdebug(8) {
2001  pips_assert("IO Effects should be OK...",
2003  print_reference(ref1);
2004  (*effects_prettyprint_func)(le);
2005  pips_debug(8, "end\n");
2006  }
2007  return le;
2008 }
2009 
2010 static list
2011 make_io_read_write_memory_effects(entity e __attribute__ ((__unused__)), list args __attribute__ ((__unused__)))
2012 {
2013  /* Fortran standard deliberately does not define the exact output
2014  device of a PAUSE or STOP statement. See Page B-6 in ANSI X3.9-1978
2015  FORTRAN 77. We assume a WRITE on stderr, i.e. unit 0 on UNIX, if
2016  one argument is available or not. */
2017  list le = NIL;
2019 
2020  le = gen_nconc(le, generic_logical_units_effects(unit, false));
2021 
2022  return le;
2023 }
2024 
2025 static list read_io_effects(entity e, list args)
2026 {
2027  /* READ is a special case , for example
2028 
2029  N = 5
2030  READ *,N, (T(I),I=1,N)
2031 
2032  There is write effect on N in the READ statement, so we have
2033  to project N from the proper region of the READ statement, then add
2034  the precondition after.
2035 
2036  The correct region in this case is :
2037 
2038  <T(PHI1)-MAY-{1 <= PHI1, N==5} >*/
2039 
2040 
2041  /* get standard io effects
2042 
2043  Attention : in this list of io_effects, there are already
2044  preconditions so the too late application of reverse transformer
2045  still gives the false result !!!
2046 
2047  io_effects => generic_proper_effects_of_expression => ....
2048  effects_precondition_composition_op
2049 
2050  */
2051 
2052  list le = io_effects(e, args);
2053 
2054  /* get current transformer */
2056  transformer t = (*load_transformer_func)(s);
2057 
2058  if (!transformer_undefined_p(t)) /* hummm... */
2059  {
2060  /* reverse-apply transformer to le. */
2061  // functions that can be pointed by effects_transformer_composition_op:
2062  // effects_composition_with_transformer_nop
2063  // effects_undefined_composition_with_transformer
2064  // convex_regions_transformer_compose
2065  // simple_effects_composition_with_effect_transformer
2066  le = (*effects_transformer_composition_op)(le, t);
2067  }
2068 
2069  return le;
2070 }
2071 
2072 static list io_effects(entity e, list args)
2073 {
2074  list le = NIL, pc, lep;
2075 
2076  pips_debug(5, "begin\n");
2077 
2078  for (pc = args; pc != NIL; pc = CDR(pc)) {
2080  entity ci;
2082 
2083  pips_assert("syntax is a call", syntax_call_p(s));
2084 
2085  ci = call_function(syntax_call(s));
2086  p = search_io_element(entity_local_name(e), entity_local_name(ci));
2087 
2088  pc = CDR(pc);
2089 
2090  if (strcmp(p->IoElementName, "IOLIST=") == 0) {
2091  lep = effects_of_iolist(pc, p->ReadOrWrite);
2092  }
2093  else {
2094  lep = effects_of_ioelem(EXPRESSION(CAR(pc)),
2095  p->ReadOrWrite);
2096  }
2097 
2098  if (p->MayOrMust == is_approximation_may)
2100 
2101  le = gen_nconc(le, lep);
2102 
2103  /* effects effects on logical units - taken from effects/io.c */
2104  if ((get_bool_property ("PRETTYPRINT_IO_EFFECTS")) &&
2105  (pc != NIL) &&
2106  (strcmp(p->IoElementName, "UNIT=") == 0))
2107  {
2108  /* We simulate actions on files by read/write actions
2109  to a static integer array
2110  GO:
2111  It is necessary to do a read and and write action to
2112  the array, because it updates the file-pointer so
2113  it reads it and then writes it ...*/
2114  expression unit = EXPRESSION(CAR(pc));
2115 
2121  else
2122  pips_internal_error("Which logical unit?");
2123  }
2124 
2125  le = gen_nconc(le, generic_logical_units_effects(unit, false));
2126  }
2127  }
2128 
2129  pips_debug(5, "end\n");
2130 
2131  return(le);
2132 }
2133 
2134 /* generic_c_io_effects() to encompass the system functions and the C
2135  * libray IO functions. Amira Mensi
2136  */
2137 static list generic_c_io_effects(entity e, list args, bool system_p)
2138 {
2139  /*
2140  return ( unix_io_effects( e, args));
2141  else
2142  return ( c_io_effects( e, args));
2143  */
2144  list le = NIL, lep;
2146  int lenght=0;
2147  int i=0;
2148  /* it really is an IO, not a string operation */
2149  //bool file_p = true;
2150 
2152 
2153  pips_debug(5, "begin\n");
2154 
2155  p = search_c_io_Element(entity_local_name(e));
2156  lenght=strlen(p->IoElementName);
2157 
2158  FOREACH(EXPRESSION, arg, args)
2159  {
2160  //if we have * as last argument, we repeat the effect of the
2161  //penultimate argument for the rest of the arguments
2162 
2163  if(p->IoElementName[lenght-1]=='*' && i>=lenght-1)
2164  lep = effects_of_C_ioelem(arg, p->IoElementName[lenght-2]);
2165  else
2166  lep = effects_of_C_ioelem(arg, p->IoElementName[i]);
2167 
2168  i=i+1;
2169 
2170  if (p->MayOrMust == is_approximation_may)
2172 
2173  le = gen_nconc(le, lep);
2174 
2175  ifdebug(8)
2176  {
2177  pips_debug(8, "effects for argument %s :\n",
2178  expression_to_string(arg));
2179  (*effects_prettyprint_func)(lep);
2180  }
2181  }
2182 
2183  /* special cases */
2184  /* We simulate actions on files by read/write actions
2185  * to a special static integer array.
2186  * GO:
2187  * It is necessary to do a read and and write action to
2188  * the array, because it updates the file-pointer so
2189  * it reads it and then writes it ...*/
2190 
2191  if(!system_p)
2192  {
2193  reference std_ref = reference_undefined;
2194  /* FILE * file descriptors are used */
2195  if(ENTITY_PRINTF_P(e) || ENTITY_PUTCHAR_P(e) ||
2197  {
2198  // The output is written to stdout
2199  entity std_ent = get_stdout_entity();
2200  if (entity_undefined_p(std_ent))
2201  pips_user_irrecoverable_error("stdout is not defined: check if \"stdio.h\""
2202  " is included)\n");
2203  else
2204  std_ref = make_reference(std_ent, NIL);
2205 
2206  if (!get_bool_property("USER_EFFECTS_ON_STD_FILES"))
2208  else
2209  /* we cannot use STDOUT_FILENO because the stdout variable may have been modified by the user */
2211  }
2212  else if (ENTITY_SCANF_P(e) || ENTITY_ISOC99_SCANF_P(e)
2214  || ENTITY_GETS_P(e)
2215  || ENTITY_GETCHAR_P(e))
2216  {
2217  //The input is obtained from stdin
2218  entity std_ent = get_stdin_entity();
2219  if (entity_undefined_p(std_ent))
2220  pips_user_irrecoverable_error("stdin is not defined (check if <stdio.h> is included)\n");
2221  else
2222  std_ref = make_reference(std_ent, NIL);
2223 
2224  if (!get_bool_property("USER_EFFECTS_ON_STD_FILES"))
2226  else
2227  /* we cannot use STDIN_FILENO because the stdin variable may have been modified by the user */
2229  }
2230  else if (ENTITY_PERROR_P(e))
2231  {
2232  entity std_ent = get_stderr_entity();
2233  if (entity_undefined_p(std_ent))
2234  pips_user_irrecoverable_error("stderr is not defined (check if <stdio.h> is included)\n");
2235  else
2236  std_ref = make_reference(std_ent, NIL);
2237 
2238  if (!get_bool_property("USER_EFFECTS_ON_STD_FILES"))
2240  else
2241  /* we cannot use STDERR_FILENO because the stderr variable may have been modified by the user */
2243  }
2244 
2247  // the fopen and link/unlink functions the path's file as arguments.
2249 
2250  else if(ENTITY_BUFFERIN_P(e) || ENTITY_BUFFEROUT_P(e))
2251  // the first argument is an integer specifying the logical unit
2252  // The expression should be evaluated and used if an integer is returned
2254 
2255  if (!reference_undefined_p(std_ref))
2256  {
2257  // functions that can be pointed by reference_to_effect_func:
2258  // reference_to_simple_effect
2259  // reference_to_convex_region
2260  // reference_to_reference_effect
2261  effect fp_eff_w = (*reference_to_effect_func)(std_ref, make_action_write_memory(), false);
2262  // functions that can be pointed by reference_to_effect_func:
2263  // reference_to_simple_effect
2264  // reference_to_convex_region
2265  // reference_to_reference_effect
2266  effect fp_eff_r = (*reference_to_effect_func)(copy_reference(std_ref), make_action_read_memory(), false);
2267  list l_fp_eff = CONS(EFFECT, copy_effect(fp_eff_r), NIL);
2269  effect_to_may_effect(fp_eff_w);
2271  effect_to_may_effect(fp_eff_r);
2272 
2273  l_fp_eff = gen_nconc(l_fp_eff, CONS(EFFECT, fp_eff_r, CONS(EFFECT, fp_eff_w, NIL)));
2274  le = gen_nconc(le, l_fp_eff);
2275 
2276  // Add Read Environment for std
2277  if (!get_bool_property("MEMORY_EFFECTS_ONLY")) {
2278  //reference std_refe = make_reference(reference_variable(std_ref), NIL);
2279  // functions that can be pointed by reference_to_effect_func:
2280  // reference_to_simple_effect
2281  // reference_to_convex_region
2282  // reference_to_reference_effect
2283  //effect effe = (*reference_to_effect_func)(std_refe, make_action_read(make_action_kind_environment()), true);
2284  effect effe = make_declaration_effect(reference_variable(std_ref), false);
2285  le = gen_nconc(CONS(EFFECT, effe, NIL), le);
2286  }
2287  }
2288  }
2289  else
2290  {
2292  {
2293  /* Several file descriptors are read */
2294  ;
2295  }
2296  }
2297 
2299  le = gen_nconc(le, generic_logical_units_effects(unit, false));
2300  }
2301 
2302  pips_debug(5, "end\n");
2303 
2304  return(le);
2305 }
2306 
2307 /* unix_io_effects to manage the IO system's functions */
2308 static list unix_io_effects(entity e, list args)
2309 {
2310  return generic_c_io_effects(e, args, true);
2311 }
2312 
2313 /* c_io_effects to handle the effects of functions of the "stdio.h" library. Amira Mensi*/
2314 static list c_io_effects(entity e, list args)
2315 {
2316  return generic_c_io_effects(e, args, false);
2317 }
2318 ␌
2319 
2320 static list strdup_effects(entity e, list args) {
2321  list le = safe_c_read_only_effects(e, args);
2322  le = gen_nconc(any_heap_effects(e,args), le);
2323  return le;
2324 }
2325 
2326 /* Transform count "e" into range "[0..e-1]"
2327  *
2328  * No sharing
2329  */
2331 {
2333  copy_expression(e),
2334  int_to_expression(1));
2338  return re;
2339 }
2340 
2342 {
2344  copy_expression(c),
2345  int_to_expression(1));
2346  if(!zero_expression_p(o))
2348  copy_expression(o),
2349  argm1);
2350 
2354  return re;
2355 }
2356 
2358 {
2359  list sl = gen_last(reference_indices(r));
2360  if(!ENDP(sl)) {
2361  expression o = EXPRESSION(CAR(sl));
2362  if(!unbounded_expression_p(o)) {
2366  else
2368 
2375  free_expression(re);
2376  }
2377  }
2378  else {
2379  pips_internal_error("No subscript to update in reference e.\n");
2380  }
2381 }
2382 
2383 /* The range information given in e can either be added as a new
2384  * subscript or alter the last subscript of any effect in cl or modify
2385  * the type of a typed anywhere location or have no impact on
2386  * *anymodule*:*anywhere*.
2387  *
2388  * See Ancourt3009/memcpyxx.c. See also CIntrinsics.
2389  */
2391 {
2392  FOREACH(CELL, c, cl) {
2394  entity v = reference_variable(r);
2395  if(!entity_anywhere_locations_p(v)) {
2398  // FI: the test should be refined, takig into account the number
2399  // of dimensions of vt, and the number of existing subscripts
2400  if(array_type_p(rt)) {
2403  CONS(EXPRESSION, re, NIL));
2404  }
2405  if(array_type_p(vt)) {
2406  int d = (int) array_type_dimension(vt);
2407  int ns = (int) gen_length(reference_indices(r));
2408  if(d==ns+1) {
2411  CONS(EXPRESSION, re, NIL));
2412  }
2413  else if(d==ns && ns>0) {
2415  }
2416  else {
2418  if(pointer_type_p(et)) {
2419  if(ns==d+1) {
2420  list lsl = gen_last(reference_indices(r));
2421  expression s = EXPRESSION(CAR(lsl));
2422  if(unbounded_expression_p(s)) {
2423  // FI: we assume the last subscript is artificial
2425  EXPRESSION_(CAR(lsl)) = ns;
2426  free_expression(s);
2427  }
2428  else {
2429  pips_internal_error("Unexpected case with d=%d and ns=%d,"
2430  " and expression %s.\n",
2431  d, ns, expression_to_string(s));
2432  }
2433  }
2434  else {
2435  pips_internal_error("Unexpected case with d=%d and ns=%d.\n", d, ns);
2436  }
2437  }
2438  else {
2439  pips_internal_error("Unexpected case with d=%d and ns=%d.\n", d, ns);
2440  }
2441  }
2442  }
2443  else {
2444  if(pointer_type_p(rt)) {
2446  type pt = type_to_pointed_type(rt);
2449  reference_variable(r) = a;
2450  }
2451  else
2452  pips_internal_error("Dereferencing must be performed by the caller.");
2453  }
2454  // FI: is it possible to end up here?
2455  // update_last_reference_subscript(r, e);
2456  }
2457  }
2458  }
2459 }
2460 
2461 /* It is assumed that the list is linked to a unique reference */
2463 {
2464  FOREACH(EFFECT, e, el) {
2468  if(!approximation_may_p(ap)) {
2469  free_approximation(ap);
2471  }
2472  }
2473  }
2474 }
2475 
2477 {
2479 
2483  else
2484  {
2486  (*effects_precondition_composition_op)(el, context, false);
2487  }
2488 }
2489 
2490 static list actual_pointer_argument_to_cells(expression e)
2491 {
2492  list cl = NIL;
2493 
2494 #if false
2495  // FI: this test should be useless and performed by
2496  // effects_lhs_expression_to_sinks()
2497  if(expression_address_of_p(e)) {
2498  call c = expression_call(e);
2501  // FI: I should have named the related test cases
2502  // FI: case &buf[0]
2503  if(ENDP(cl))
2505  }
2506  else
2508 #endif
2509 
2510  // FI: hard to find the best tradeoff between the accuracy of proper
2511  // effects and the accuracy due to points-to information
2515  reference_indices(r) =
2518  cl = CONS(CELL, make_cell_reference(r), NIL);
2519  }
2520  else {
2521  // Potentially, exploit points-to information but get cumulated
2522  // effects instead of proper effects
2524  }
2525 
2526  return cl;
2527 }
2528 
2529 /* memcpy, memmove, strcmp, strncmp... */
2530 static list memcpy_effects(entity e, list args)
2531 {
2532  // first read effects for the evaluation of arguments
2534 
2535  bool write_p = true; // The first argument is written by default
2536 
2539  write_p = false;
2540 
2542  if(!ENDP(CDR(CDR(args))))
2543  e3 = EXPRESSION(CAR(CDR(CDR(args))));
2544  //else
2545  // e3 = make_unbounded_expression();
2546 
2547  expression e1 = EXPRESSION(CAR(args));
2548  if (expression_call_p(e1)
2550  {
2551  pips_user_error("Constant expression as first argument not allowed "
2552  "for intrinsic \"%s\".\n", entity_user_name(e));
2553  }
2554 
2555  // Look for the sinks
2556  list cl1 = actual_pointer_argument_to_cells(e1);
2557  // Add range information: specific to memcpy
2559  list el1 = cells_to_read_or_write_effects(cl1, write_p);
2560 
2561  expression e2 = EXPRESSION(CAR(CDR(args)));
2562  list el2 = list_undefined;
2563  if (expression_call_p(e2)
2564  && call_constant_p(expression_call(e2))) {
2565  el2 = NIL;
2566  }
2567  else {
2568  list cl2 = actual_pointer_argument_to_cells(e2);
2570  el2 = cells_to_read_effects(cl2);
2571  }
2572 
2573  // effects on buffer for memmove intrinsic
2575  {
2576  el = gen_nconc(el,memmove_effects(e, args));
2577  }
2578 
2579  el = gen_nconc(el, gen_nconc(el1, el2));
2580  return el;
2581 }
2582 
2583 /* Molka Becher: generic_string_effects to encompass the C string.h intrinsics
2584  *
2585  * @brief handles several C intrinsics from string.h.
2586  *
2587  * memset, strxfrm, strncat,strcat, strncpy, memmove, memcpy
2588  *
2589  * Does not exploit points-to information, explicitly or implicitly
2590  */
2591 static list
2592 generic_string_effects(entity e, list args)
2593 {
2594  list le = NIL;
2595  const char * lname = entity_local_name(e);
2596 
2597  pips_debug(5, "begin\n");
2598 
2599  // first read effects for the evaluation of arguments
2601 
2602  // then effects on special entities for memmove intrinsic
2604  {
2605  le = gen_nconc(le,memmove_effects(e, args));
2606  }
2607 
2608  // finally write effects on some elements of first argument depending on third argument
2609  // if the main effect is not on a char *, or if we don't know the number of copied elements,
2610  // we generate may effects on all reachable paths
2611  // from the main effect, without going through pointers.
2612 
2613  expression arg1 = EXPRESSION(CAR(args));
2614 
2615  if (expression_call_p(arg1)
2616  && call_constant_p(expression_call(arg1)))
2617  {
2618  pips_user_error("constant expression as first argument not allowed "
2619  "for intrinsic %s\n", entity_name(e));
2620  }
2621  else
2622  {
2623  list l_eff1 = NIL; /* main effects on first arg */
2624  list l_tmp = generic_proper_effects_of_complex_address_expression(arg1, &l_eff1, true);
2625  gen_full_free_list(l_tmp);
2626 
2627  FOREACH(EFFECT, eff1, l_eff1)
2628  {
2629  if (!anywhere_effect_p(eff1))
2630  {
2631  if (gen_length(args) == 3) // we may know the number of elements
2632  {
2633  /* first check whether the argument main effect is on a char *. */
2636  if (!variable_undefined_p(v)
2638  && ENDP(variable_dimensions(v))
2640  ||
2641  (char_type_p(t) && (gen_length(variable_dimensions(v)) == 1))))
2642  {
2643  /* Effect is on eff11_ref[0..arg3-1]*/
2644  expression arg3 = EXPRESSION(CAR(CDR(CDR(args))));
2646  copy_expression(arg3),
2647  int_to_expression(1));
2651  // functions that can be pointed by effect_add_expression_dimension_func:
2652  // simple_effect_add_expression_dimension
2653  // convex_region_add_expression_dimension
2654  (*effect_add_expression_dimension_func)(eff1, ie);
2655  le = gen_nconc(le, CONS(EFFECT, eff1, NIL));
2656  }
2657  else
2658  {
2660  free_effect(eff1);
2661  }
2662  }
2663  else
2664  {
2666  free_effect(eff1);
2667  }
2668  }
2669  else
2670  le = gen_nconc(le, CONS(EFFECT, eff1, NIL)); /* write is after reads */
2671  }
2672  gen_free_list(l_eff1);
2673  }
2674 
2675  // and on the same number of elements of the second one for all handled intrinsics
2676  // except memset.
2678  {
2679  /* this is almost the same code as for arg1 just before,
2680  maybe this could be factorized. */
2681  expression arg2 = EXPRESSION(CAR(CDR(args)));
2682  //type t2 = expression_to_type(arg2);
2683  if (expression_call_p(arg2)
2684  && call_constant_p(expression_call(arg2)))
2685  {
2686  pips_debug(5, "constant expression as ssecond argument -> no effect");
2687  }
2688  else
2689  {
2690  list l_eff2; /* main effects on second arg */
2691  list l_tmp = generic_proper_effects_of_complex_address_expression(arg2, &l_eff2, false);
2692  gen_full_free_list(l_tmp);
2693 
2694  FOREACH(EFFECT, eff2, l_eff2)
2695  {
2696  if (!anywhere_effect_p(eff2))
2697  {
2698  if (gen_length(args) == 3) // we may know the number of elements
2699  {
2700  /* first check whether the argument main effect is on a char *. */
2703  if (!variable_undefined_p(v)
2705  && ENDP(variable_dimensions(v))
2707  ||
2708  (char_type_p(t) && (gen_length(variable_dimensions(v)) == 1))))
2709  {
2710  /* Effect is on eff12_ref[0..arg3-1]*/
2711  expression arg3 = EXPRESSION(CAR(CDR(CDR(args))));
2713  copy_expression(arg3),
2714  int_to_expression(1));
2718  // functions that can be pointed by effect_add_expression_dimension_func:
2719  // simple_effect_add_expression_dimension
2720  // convex_region_add_expression_dimension
2721  (*effect_add_expression_dimension_func)(eff2, ie);
2722  le = gen_nconc(le, CONS(EFFECT, eff2, NIL));
2723  }
2724  else
2725  {
2727  free_effect(eff2);
2728  }
2729  }
2730  else
2731  {
2733  free_effect(eff2);
2734  }
2735  }
2736  else
2737  le = gen_nconc(le, CONS(EFFECT, eff2, NIL));
2738  }
2739  gen_free_list(l_eff2);
2740  }
2741  }
2742 
2743  pips_debug_effects(5,"returning:\n", le);
2744  pips_debug(5, "end\n");
2745 
2746  return(le);
2747 }
2748 
2749 /* To handle the effects of random functions. Amira Mensi*/
2750 static list any_rgs_effects(entity __attribute__ ((__unused__)) e, list __attribute__ ((__unused__)) args, bool write_p, bool read_p)
2751 {
2752  list le = NIL;
2753  entity private_rgs_entity = entity_undefined;
2754  reference ref;
2755  list indices = NIL;
2756  // To know if random are used in code, so if they have to appear on return statement
2757  //static bool use_rgs = false;
2758 
2759  pips_debug(5, "begin\n");
2760 
2761  private_rgs_entity = FindEntity(RAND_EFFECTS_PACKAGE_NAME,
2763  pips_assert("gen_seed_effects", private_rgs_entity != entity_undefined);
2764 
2765  ref = make_reference(private_rgs_entity, indices);
2767 
2768  if (write_p) {
2769  //use_rgs = true;
2771  if (read_p) {
2773  }
2774  }
2775  //else if (use_rgs && read_p) {
2776  // le = generic_proper_effects_of_read_reference(ref);
2777  //}
2778 
2779  pips_debug(5, "end\n");
2780  return(le);
2781 }
2782 
2783 /* The seed is written for initialization */
2784 static list rgsi_effects(entity e, list args)
2785 {
2787  list lr = any_rgs_effects(e, args, true, false);
2788  le = gen_nconc(le, lr);
2789  return le;
2790 }
2791 
2792 /* The seed is read and then written */
2793 static list rgs_effects(entity e, list args)
2794 {
2796  list lr = any_rgs_effects(e, args, true, true);
2797  le = gen_nconc(le, lr);
2798  return le;
2799 }
2800 ␌
2801 /* To handle the effects of heap related functions.
2802  CreateHeapAbstractState() is done in bootstrap.c */
2803 static list any_heap_effects(entity e, list args)
2804 {
2805  list le = NIL;
2806  list lep = NIL;
2807  entity malloc_entity = entity_undefined;
2808  reference ref;
2809  effect malloc_effect;
2810 
2811  pips_debug(5, "begin for function \"%s\"\n", entity_user_name(e));
2812 
2813  MAP(EXPRESSION,exp,{
2815  le = gen_nconc(le, lep);
2816  //ifdebug(8) print_effects(le);
2817  //ifdebug(8) print_effects(lep);
2818  }, args);
2819 
2820  malloc_entity = FindEntity(MALLOC_EFFECTS_PACKAGE_NAME,
2822 
2823  pips_assert("malloc entity pre-exists", !entity_undefined_p(malloc_entity));
2824 
2825  ref = make_reference(malloc_entity, NIL);
2826 
2828 
2829  /* Read first. */
2830  // functions that can be pointed by reference_to_effect_func:
2831  // reference_to_simple_effect
2832  // reference_to_convex_region
2833  // reference_to_reference_effect
2835 
2836  le = CONS(EFFECT, malloc_effect, le);
2837 
2838  /* Write back. */
2839  // functions that can be pointed by reference_to_effect_func:
2840  // reference_to_simple_effect
2841  // reference_to_convex_region
2842  // reference_to_reference_effect
2844  le = CONS(EFFECT, malloc_effect, le);
2845 
2846  pips_debug_effects(5, "output effects :\n", le);
2847 
2848  return(le);
2849 }
2850 
2851 /* Molka Becher : To handle the effects of memmove function. Memmove acts as if it uses
2852  a temporary array to copy characters from one object to another. C99
2853  Note : CreateMemmoveAbstractState() is defined in bootstrap.c */
2854 static list memmove_effects(entity e, list args __attribute__ ((unused)))
2855 {
2856  list le = NIL;
2857  entity memmove_entity = entity_undefined;
2858  reference ref;
2859  effect memmove_effect;
2860 
2861  pips_debug(5, "begin for function \"%s\"\n", entity_user_name(e));
2862 
2863  /* MAP(EXPRESSION,exp,{ */
2864  /* lep = generic_proper_effects_of_expression(exp); */
2865  /* le = gen_nconc(le, lep); */
2866  /* //ifdebug(8) print_effects(le); */
2867  /* //ifdebug(8) print_effects(lep); */
2868  /* }, args); */
2869 
2870  memmove_entity = FindEntity(MEMMOVE_EFFECTS_PACKAGE_NAME,
2872 
2873  pips_assert("memmove entity pre-exists", !entity_undefined_p(memmove_entity));
2874 
2875  ref = make_reference(memmove_entity, NIL);
2876 
2878 
2879  /* Write First. */
2880  // functions that can be pointed by reference_to_effect_func:
2881  // reference_to_simple_effect
2882  // reference_to_convex_region
2883  // reference_to_reference_effect
2885  le = CONS(EFFECT, memmove_effect, le);
2886 
2887  /* Read Back. */
2888  // functions that can be pointed by reference_to_effect_func:
2889  // reference_to_simple_effect
2890  // reference_to_convex_region
2891  // reference_to_reference_effect
2893 
2894  le = CONS(EFFECT, memmove_effect, le);
2895 
2896  pips_debug_effects(5, "output effects :\n", le);
2897 
2898  return(le);
2899 }
2900 ␌
2901 static entity dummy_c_io_ptr = entity_undefined;
2902 
2903 /* Intrinsics do not have formal parameters. This function returns a
2904  char * needed to analyze calls to C IO functions. */
2905 static entity make_dummy_io_ptr()
2906 {
2907  if(entity_undefined_p(dummy_c_io_ptr)) {
2908  type pt = make_scalar_integer_type(1); /* char */
2910 
2911  dummy_c_io_ptr =
2914  t,
2920  0, NIL)),
2921  make_value_unknown());
2922  }
2923 
2924  return dummy_c_io_ptr;
2925 }
2926 ␌
2927 static list effects_of_any_ioelem(expression exp, tag act, bool is_fortran)
2928 {
2929  list le = NIL;
2930  //syntax s = expression_syntax(exp);
2931 
2932  pips_debug(5, "begin with expression %s, act=%s\n",
2934  (act == is_action_write) ? "w" :
2935  ((act == 'x') ? "read-write" : "r"));
2936 
2937  if (act == 'w' || act == 'x' || act == is_action_write) {
2938  pips_debug(6, "is_action_write or read-write\n");
2939 
2940  if(is_fortran)
2942  else {
2943  pips_internal_error("we should never get here: there is effects_of_c_ioelem for that purpose");
2944  /* C language */
2945  /* FI: we lack information about the number of elements written */
2946  /* This is not generic! */
2947  entity ioptr = make_dummy_io_ptr();
2949  // functions that can be pointed by reference_to_effect_func:
2950  // reference_to_simple_effect
2951  // reference_to_convex_region
2952  // reference_to_reference_effect
2953  effect eff = (*reference_to_effect_func)(r, make_action_write_memory(),false);
2955  /* FI: this is really not generic! removed because should be useless BC. */
2956  // le = c_summary_effect_to_proper_effects(eff, exp);
2957  /* FI: We also need the read effects implied by the evaluation
2958  * of exp... but I do not know any function available to do
2959  * that. generic_proper_effects_of_expression() is ging to
2960  * return a bit too much. */
2961 
2962  if(false) {
2963  /* FI: short term simplification... We need pointers for side effects... */
2965 
2966  if(syntax_reference_p(s)) {
2967  /* This is not possible as parameters are passed by value,
2968  * except if an address is passed, for instance an array or a
2969  * pointer */
2970  reference r = syntax_reference(s);
2971  entity v = reference_variable(r);
2972  type t = entity_type(v);
2973  type ut = ultimate_type(t); /* FI: is ultimate_type() enough? */
2974 
2975  if(type_variable_p(ut)) {
2976  variable vt = type_variable(ut);
2977 
2978  if(!ENDP(variable_dimensions(vt))) {
2979  /* Fine, this is an array */
2981  /* Is it fully written? More information about the IO and
2982  * about the array would be needed to make the
2983  * decision...*/
2984  pips_assert("Only one effect for this reference?", gen_length(le)==1);
2986  }
2987  else if(basic_pointer_p(variable_basic(vt))) {
2988  /* This is going to be called for the FILE descriptors */
2989  /* pips_internal_error("Effects thru pointers not implemented yet"); */
2990  pips_user_warning("Effects thru pointers not implemented yet\n");
2991  }
2992  else
2993  pips_user_error("IO element update for \"\%s\": an address should be passed",
2994  entity_user_name(v));
2995  }
2996  else {
2997  pips_user_error("IO element update for \"\%s\": incompatible type",
2998  entity_user_name(v));
2999  }
3000  }
3001  else if(syntax_call_p(s)) {
3002  call c = syntax_call(s);
3003  entity op = call_function(c);
3004  list nargs = call_arguments(c);
3005 
3006  if(ENTITY_DEREFERENCING_P(op)) {
3007  pips_internal_error("Effects thru dereferenced pointers not implemented yet");
3008  }
3009  if(ENTITY_ADDRESS_OF_P(op)) {
3010  expression e = EXPRESSION(CAR(nargs));
3011 
3012  pips_assert("one argument", gen_length(nargs)==1);
3014  }
3015  else {
3016  pips_internal_error("Operator \"\%s\" not handled", entity_name(op));
3017  }
3018  }
3019  }
3020  }
3021  }
3022 
3023  if(act == 'r' || act == 'x' || act == is_action_read) {
3024  pips_debug(6, "is_action_read or read-write\n");
3026  }
3027 
3028  pips_debug(5, "end\n");
3029 
3030  return le;
3031 }
3032 
3033 static list effects_of_ioelem(expression exp, tag act)
3034 {
3035  return effects_of_any_ioelem(exp, act, true);
3036 }
3037 
3038 /* Returns a list of possible effects */
3039 static list c_intrinsics_pointer_actual_argument_to_effects(expression e, tag act)
3040 {
3041  // These effects may have already been gathered by the caller
3042  // list el = generic_proper_effects_of_expression(e);
3043  list el = NIL;
3044  list cl = actual_pointer_argument_to_cells(e);
3045  list el1 = NIL, el2 = NIL;
3046  switch(act) {
3047  case 'r': el1 = cells_to_read_effects(cl);
3048  break;
3049  case 'w': el1 = cells_to_write_effects(cl);
3050  break;
3051  case 'x': el1 = cells_to_read_effects(cl);
3052  el2 = cells_to_write_effects(cl);
3053  break;
3054  default: pips_internal_error("Unexpected tag.\n");
3055  }
3056  el = gen_nconc(el, gen_nconc(el1, el2));
3057  return el;
3058 }
3059 
3060 static list c_intrinsics_actual_argument_to_effects(expression e, tag act)
3061 {
3062  list el = NIL;
3064 
3065  if(pointer_type_p(t)) {
3066  if(get_constant_paths_p())
3067  // Use points-to information if possible
3068  el = c_intrinsics_pointer_actual_argument_to_effects(e, act);
3069  else {
3070  if(act == 'w') {
3072  gen_free_list(sel);
3073  }
3074  else if(act == 'r') {
3076  gen_free_list(sel);
3077  }
3078  else
3079  pips_internal_error("Unexpected tag '\%c\'\n", act);
3080 
3081  //#if false
3082  // FI: this is not generic...
3083  type pt = type_to_pointed_type(t);
3084  list nel = NIL;
3085  FOREACH(EFFECT, ef, el) {
3086  // Add dereferencing if needed
3089  // FI: beware of persistent references used in proper effects
3090  if(type_equal_p(pt, rt) && pointer_type_p(pt)) {
3091  // The actual argument is an array: the last zero, at least,
3092  // must be replaced by unbounded and the effect be updated
3093  reference nr = copy_reference(r);
3094  list sl = reference_indices(nr); // subscript list
3095  list lsl = gen_last(sl); // last subscript list
3096  if(!ENDP(lsl)) {
3097  if(zero_expression_p(EXPRESSION(CAR(lsl)))) {
3100  cell nc = make_cell_reference(nr);
3102  action ac = (act=='r')?
3104  free_cell(effect_cell(ef));
3105  effect_cell(ef) = nc;
3107  effect_action(ef) = ac;
3109  effect_approximation(ef) = ap;
3110  }
3111  else
3112  pips_internal_error("Unexpected subscript case.\n");
3113  }
3114  else {
3115  // A scalar case, as with &pos, where pos is a scalar
3116 
3117  // FI: if pt is a struct, all fields must be read or
3118  // written independently...
3119  action ac = (act=='r')?
3122  effect_action(ef) = ac;
3123  }
3124  }
3125  else if(type_equal_p(pt, rt)) {
3126  // FI: if pt is not a pointer type, nothing to add ?
3127  // Effects/hyantes_readtowns ?
3128  action ac = (act=='r')?
3131  effect_action(ef) = ac;
3132  }
3133  else { // The code must be generic
3134  // The actual argument is a pointer. The read effect must be
3135  // preserved and an effect on the dereferenced area added
3136  // the effect cannot be copied because of a persistent reference
3137  // effect nef = copy_effect(ef);
3139  // if(effect_region_p(nef)) {
3140  entity v = reference_variable(nr);
3141  if(!entity_all_locations_p(v)) {
3144  reference_variable(nr) = nv;
3145  }
3146  else if(descriptor_convex_p(effect_descriptor(ef))) {
3147  int d = (int) gen_length(reference_indices(nr));
3148  // FI: cheating with genericity
3149  extern entity make_phi_entity(int);
3150  entity phi_dp1 = make_phi_entity(d+1);
3151  expression phi_e = entity_to_expression(phi_dp1);
3152  list sl = CONS(EXPRESSION, phi_e, NIL);
3154  }
3155  else { // effect simple
3156  reference_indices(nr) =
3158  }
3159  }
3160 
3161  // reference nr = copy_reference(effect_any_reference(ef));
3162  cell c = make_cell_reference(nr);
3164  //free_approximation(effect_approximation(nef));
3165  //effect_approximation(nef) = ap;
3166  action ac = (act=='r')?
3168  //free_action(effect_action(nef));
3169  //effect_action(nef) = ac;
3171  // effect nef = (*reference_to_effect_func)(nr, ac, true);
3172  effect nef = make_effect(c, ac, ap, d);
3173  nel = gen_nconc(nel, CONS(EFFECT, nef, NIL));
3174  }
3175  }
3176  el = gen_nconc(el, nel);
3177  //#endif
3178  }
3179  }
3180  else
3182 
3183  FOREACH(EFFECT, ef, el) {
3185  entity v = reference_variable(r);
3186  if(entity_all_locations_p(v)) {
3187  list sl = reference_indices(r);
3188  if(!ENDP(sl))
3189  pips_internal_error("Bad use of anywhere.\n");
3190  }
3191  }
3192 
3193  return el;
3194 }
3195 
3196 
3197 /**
3198  Computes the effects of an io C intrinsic function on the actual
3199  argument arg according to the action tag act.
3200  proper effects on the evaluation of the argument are systematically added.
3201 
3202  @param arg is an actual argument of a C io intrinsic function
3203  @param act is an action tag as described in the IoElementDescriptorTable.
3204  (its value can be either 'i', 's', 'r', 'w','x', 'R', 'W', 'v' or 'n').
3205 
3206  f: logical unit
3207 
3208  i:
3209 
3210  n: no further effects
3211 
3212  r, w, x: potentially, pointers
3213 
3214  R, W: formatted IOs
3215 
3216  s: stream or integer file descriptor
3217 
3218  v: va_list case
3219  */
3220 static list effects_of_C_ioelem(expression arg, tag act)
3221 {
3222  list le = NIL; /* result list */
3224 
3225  pips_debug(5, "begin with expression %s and tag %c\n",
3226  expression_to_string(arg), act);
3227 
3229 
3230  switch (act)
3231  {
3232  case 'f':
3233  unit = copy_expression(arg);
3234  /* We simulate actions on files by read/write actions
3235  * to a special static integer array.
3236  * GO:
3237  * It is necessary to do a read and write action to
3238  * the array, because it updates the file-pointer so
3239  * it reads it and then writes it ...
3240  */
3241  le = gen_nconc(le, generic_logical_units_effects(unit, false));
3242  break;
3243  case 's':
3244  pips_debug(5, "stream or integer file descriptor case \n");
3245 
3246  /* first the effects on the file pointer */
3247  /* We should maybe check here that the argument has the right type (FILE *) */
3248  list l_fp_eff_r = NIL;
3249  list l_fp_eff = generic_proper_effects_of_complex_address_expression(arg, &l_fp_eff_r, false);
3250 
3252  // FI: assuming no recursive descent is needed to get all fields,
3253  // i.e. no field is itself a struct
3254  type arg_pt = type_to_pointed_type(arg_t);
3255  list fl = struct_type_to_fields(arg_pt);
3256 
3257  FOREACH(EFFECT, fp_eff_r, l_fp_eff_r)
3258  {
3259  effect fp_eff_w = effect_undefined;
3260  if (effect_undefined_p(fp_eff_r)) {
3263  l_fp_eff = gen_nconc(l_fp_eff, CONS(EFFECT, fp_eff_w, CONS(EFFECT, fp_eff_r, NIL)));
3264  }
3265  else {
3266  if( anywhere_effect_p(fp_eff_r)) {
3268  l_fp_eff = gen_nconc(l_fp_eff, CONS(EFFECT, fp_eff_w, CONS(EFFECT, fp_eff_r, NIL)));
3269  }
3270  else {
3271  /* the read effect on the file pointer will be added later */
3272  /* l_fp_eff = gen_nconc(l_fp_eff, CONS(EFFECT, copy_effect(fp_eff_r), NIL)); */
3273  if(false) {
3274  // FI: generate an effect on the whole data structure, e.g. fd[0]
3276  effect_to_may_effect(fp_eff_r);
3277  fp_eff_w = copy_effect(fp_eff_r);
3279  l_fp_eff = gen_nconc(l_fp_eff, CONS(EFFECT, fp_eff_w, CONS(EFFECT, fp_eff_r, NIL)));
3280  }
3281  else if(false) {
3282  // FI: generate an implicit effect on all data structure
3283  // fields, e.g. fd[0][*]. This leads to a typing error
3284  // because all fields do not have the same type.
3287  // The function is defined in effects-simple and not in effects-util
3290  effect_to_may_effect(fp_eff_r);
3291  fp_eff_w = copy_effect(fp_eff_r);
3293  l_fp_eff = gen_nconc(l_fp_eff, CONS(EFFECT, fp_eff_w, CONS(EFFECT, fp_eff_r, NIL)));
3294  }
3295  else {
3296  // FI: if we are dealing with a pointer to a struct, we
3297  // have to generate one or two effect(s) for each field,
3298  // e.g. fd[0][a], fd[0][b], fd[0][c]...
3299  FOREACH(ENTITY, f, fl) {
3300  effect n_fp_eff_r = copy_effect(fp_eff_r);
3302  effect_add_field_dimension(n_fp_eff_r, f);
3303  effect_to_may_effect(n_fp_eff_r);
3304  fp_eff_w = copy_effect(n_fp_eff_r);
3306  l_fp_eff = gen_nconc(l_fp_eff, CONS(EFFECT, fp_eff_w, CONS(EFFECT, n_fp_eff_r, NIL)));
3307  }
3308  // free_effect(fp_eff_r); used below in a test
3309  }
3310  }
3311  }
3312 
3313  /* Then we simulate actions on files by read/write actions
3314  * to a special static integer array.
3315  * GO: It is necessary to do a read and write action to
3316  * the array, because it updates the file-pointer so
3317  * it reads it and then writes it ...
3318  * We try to identify if the stream points to a std file
3319  */
3320 
3321  if ((!get_bool_property("USER_EFFECTS_ON_STD_FILES")) && std_file_effect_p(fp_eff_r))
3322  {
3323  const char* s = entity_user_name(effect_entity(fp_eff_r));
3324  if (same_string_p(s, "stdout"))
3326  else if (same_string_p(s, "stdin"))
3328  else /* (same_string_p(s, "stderr")) */
3330  }
3331  else {
3333  }
3334 
3335  le = gen_nconc(le, generic_logical_units_effects(unit, false));
3336  }
3337  le = gen_nconc(le, l_fp_eff);
3338 
3339  break;
3340  case 'v':
3341  pips_debug(5, "va_list case \n");
3342 
3343  /* we generate a read and a write effect on the va_list :
3344  * this is not really correct, since the va_list itself cannot be
3345  * modified, but it's internal fields only. BC.
3346  */
3347 
3349  break;
3350  case 'r':
3351  case 'w':
3352  case 'x':
3353  pips_debug(5, "potential pointer \n");
3354  // le = gen_nconc(le, c_actual_argument_to_may_summary_effects(arg, act));
3355  le = gen_nconc(le, c_intrinsics_actual_argument_to_effects(arg, act));
3356  break;
3357  case 'R':
3358  case 'W':
3359  pips_debug(5, "formatted IOs\n");
3360  /* first check whether the argument is a char *. */
3361  type t = expression_to_type(arg);
3363  if (act == 'W'
3364  ||
3367  && ENDP(variable_dimensions(v))
3369  ||
3370  (char_type_p(t) && (gen_length(variable_dimensions(v)) == 1)))))
3371  {
3372  // le = gen_nconc(le, c_actual_argument_to_may_summary_effects(arg, tolower(act)));
3373  le = gen_nconc(le, c_intrinsics_actual_argument_to_effects(arg, tolower(act)));
3374  }
3375  break;
3376  case 'n':
3377  pips_debug(5, "only effects on actual argument evaluation\n");
3378  break;
3379  default :
3380  pips_internal_error("unknown tag");
3381  break;
3382  }
3383 
3384  return le;
3385 }
3386 
3387 static list
3388 effects_of_iolist(list exprs, tag act)
3389 {
3390  list lep = NIL;
3391  expression exp = EXPRESSION(CAR(exprs));
3392 
3393  pips_debug(5, "begin with exp = %s\n", expression_to_string(exp));
3394 
3396  lep = effects_of_implied_do(exp, act);
3397  else
3398  {
3399  if (act == is_action_write)
3400  {
3402 
3403  pips_debug(6, "is_action_write");
3404  /* pips_assert("effects_of_iolist", syntax_reference_p(s)); */
3405  if(syntax_reference_p(s))
3407  else
3408  {
3409  /* write action on a substring */
3410  if(syntax_call_p(s) &&
3412  SUBSTRING_FUNCTION_NAME) == 0 )
3413  {
3417 
3422  }
3423  else {
3424  pips_internal_error("Impossible memory write effect!");
3425  }
3426  }
3427  }
3428  else {
3429  pips_debug(6, "is_action_read");
3431  }
3432  } /* if (expression_implied_do_p(exp)) */
3433  pips_debug(5, "end\n");
3434 
3435  return lep;
3436 }
3437 
3438 /* an implied do is a call to an intrinsic function named IMPLIED-DO;
3439  * its first argument is the loop index, the second one is a range, and the
3440  * remaining ones are expressions to be written or references to be read,
3441  * or another implied_do (BA).
3442  */
3443 static list
3444 effects_of_implied_do(expression exp, tag act)
3445 {
3446  list le, lep, lr, args;
3447  expression arg1, arg2;
3448  entity index;
3449  range r;
3450  reference ref;
3452  transformer local_context = transformer_undefined;
3453 
3454  pips_assert("effects_of_implied_do", expression_implied_do_p(exp));
3455 
3456  pips_debug(5, "begin\n");
3457 
3459  arg1 = EXPRESSION(CAR(args)); /* loop index */
3460  arg2 = EXPRESSION(CAR(CDR(args))); /* range */
3461 
3462  pips_assert("effects_of_implied_do",
3464 
3465  pips_assert("effects_of_implied_do",
3467 
3469  ref = make_reference(index, NIL);
3470 
3471  r = syntax_range(expression_syntax(arg2));
3472 
3473  /* effects of implied do index
3474  * it is must_written but may read because the implied loop
3475  * might execute no iteration.
3476  */
3477 
3478  le = generic_proper_effects_of_written_reference(ref); /* the loop index is must-written */
3479  /* Read effects are masked by the first write to the implied-do loop variable */
3480 
3481  /* effects of implied-loop bounds and increment */
3483 
3484  /* Do we use context information */
3486  {
3487  transformer tmp_trans;
3488  Psysteme context_sc;
3489 
3490  /* the preconditions of the current statement don't include those
3491  * induced by the implied_do, because they are local to the statement.
3492  * But we need them to properly calculate the regions.
3493  * the solution is to add to the current context the preconditions
3494  * due to the current implied_do (think of nested implied_do).
3495  * Beware: the implied-do index variable may already appear
3496  * in the preconditions. So we have to eliminate it first.
3497  * the regions are calculated, and projected along the index.
3498  * BA, September 27, 1993.
3499  */
3500 
3501  local_context = transformer_dup(context);
3502  /* we first eliminate the implied-do index variable */
3503  context_sc = predicate_system(transformer_relation(local_context));
3504  if(base_contains_variable_p(context_sc->base, (Variable) index))
3505  {
3506  sc_and_base_projection_along_variable_ofl_ctrl(&context_sc,
3507  (Variable) index,
3508  NO_OFL_CTRL);
3509  predicate_system_(transformer_relation(local_context)) =
3510  newgen_Psysteme(context_sc);
3511  }
3512  /* tmp_trans simulates the transformer of the implied-do loop body */
3513  tmp_trans = transformer_identity();
3514  local_context = add_index_range_conditions(local_context, index, r,
3515  tmp_trans);
3516  free_transformer(tmp_trans);
3517  transformer_arguments(local_context) =
3519  entity_to_new_value(index));
3520 
3521 
3522  ifdebug(7) {
3523  pips_debug(7, "local context : \n%s\n",
3524  precondition_to_string(local_context));
3525  }
3526  }
3527  else
3528  local_context = transformer_undefined;
3529 
3530  effects_private_current_context_push(local_context);
3531 
3532  FOREACH(EXPRESSION, expr, CDR(CDR(args))) {
3533  syntax s = expression_syntax(expr);
3534 
3535  if (syntax_reference_p(s))
3536  if (act == is_action_write)
3538  else
3540  else
3541  if (syntax_range_p(s))
3543  else
3544  /* syntax_call_p(s) is true here */
3545  if (expression_implied_do_p(expr))
3546  lep = effects_of_implied_do(expr, act);
3547  else
3549 
3550  /* indices are removed from effects because this is a loop */
3551  lr = NIL;
3552  FOREACH(EFFECT, eff, lep) {
3553  if (effect_entity(eff) != index)
3554  lr = CONS(EFFECT, eff, lr);
3555  else if(act==is_action_write /* This is a read (FI: I do not understand this comment) */
3556  && action_write_p(effect_action(eff))) {
3557  pips_user_error("Index %s in implied DO is read. "
3558  "Standard violation, see Section 12.8.2.3\n",
3559  entity_local_name(index));
3560  }
3561  else
3562  {
3563  debug(5, "effects_of_implied_do", "index removed");
3564  free_effect(eff);
3565  }
3566  }
3567  gen_free_list(lep);
3568  lr = gen_nreverse(lr); /* preserve initial order??? */
3569  le = gen_nconc(le, lr);
3570  }
3571 
3572 
3573  // functions that can be pointed by effects_union_over_range_op:
3574  // effects_union_over_range_nop
3575  // simple_effects_union_over_range
3576  // convex_regions_union_over_range
3577  le = (*effects_union_over_range_op)(le,
3578  index,
3580 
3581  ifdebug(6) {
3582  pips_debug(6, "effects:\n");
3583  (*effects_prettyprint_func)(le);
3584  fprintf(stderr, "\n");
3585  }
3586 
3588  pips_debug(5, "end\n");
3589 
3590  return le;
3591 }
3592 
3593 static
3594 list not_implemented_intrinsics_effects(entity e, list args __attribute__ ((unused)))
3595 {
3596  pips_internal_error("Effects for intrinsic \"%s\" are not implemented.\n",
3597  entity_user_name(e));
3598  return NIL;
3599 }
3600 
3601 /* Add a time effect, that is a read and a write on a particular hidden time variable */
3602 static
3603 list time_effects(entity e __attribute__ ((unused)), list args)
3604 {
3605  // list le = generic_proper_effects_of_expressions(args);
3606  list le = NIL;
3607  FOREACH(EXPRESSION,arg,args) // true for at least gettimeofday, clock and time
3608  le = gen_nconc(le,
3609  c_actual_argument_to_may_summary_effects(arg, 'w')); // may be a must ?
3610 
3612 
3613  pips_assert("private_time_entity is defined",
3614  !entity_undefined_p(private_time_entity));
3615 
3616  reference ref = make_reference(private_time_entity,NIL);
3617 
3620  /* SG: should we free ref? */
3621 
3622  if(get_bool_property("TIME_EFFECTS_USED")) {
3623  /* Barrier effect suggested by Mehdi Amini (Ticket 594) */
3626  le = CONS(EFFECT, re, le);
3627  le = CONS(EFFECT, we, le);
3628  }
3629  return le;
3630 }
3631 
3632 /* Add a time conversion buffer effect, that is a read and a write on a particular hidden buffer (man localtime) */
3633 static
3634 list time_buffer_effects(entity e __attribute__ ((unused)), list args)
3635 {
3637 
3639 
3640  pips_assert("private_time_entity is defined",
3641  !entity_undefined_p(private_time_entity));
3642 
3643  reference ref = make_reference(private_time_entity,NIL);
3644 
3647  /* SG: should we free ref? */
3648 
3649  return le;
3650 }
3651 
3652 /**
3653  handling of variable argument list macros (va_end, va_start and va_copy)
3654  according to ISO/IEC 9899:1999.
3655  va_list parameters are considered as scalar variables. It is unclear
3656  for the moment whether we should use a more precise approach to simulate
3657  the effects of successive calls to va_arg.
3658  va_arg is directly represented in the PIPS internal representation
3659  (see domain syntax).
3660  */
3661 static list va_list_effects(entity e, list args)
3662 {
3663  list le = NIL;
3664  expression first_arg;
3665  pips_debug(5, "begin for function \"%s\"\n", entity_user_name(e));
3666 
3667  /* the first argument is always evaluated (read) and we simulate
3668  the written effects on the depths of the va_list by a write
3669  effect on the va_list itself.
3670  */
3671  first_arg = EXPRESSION(CAR(args));
3672  le = gen_nconc(le, generic_proper_effects_of_expression(first_arg));
3673  le = gen_nconc(le, generic_proper_effects_of_any_lhs(first_arg));
3674 
3675  /* but it is *may* written for va_end */
3676  if (ENTITY_VA_END_P(e))
3677  {
3678  FOREACH(EFFECT, eff, le)
3679  {
3680  if (effect_write_p(eff))
3682  }
3683  }
3684 
3685  if (ENTITY_VA_COPY_P(e))
3686  {
3687  /* the second argument is only read. In fact, in a more precise
3688  approach, we should simulate reads on the depths of the va_list.
3689  */
3690  expression second_arg = EXPRESSION(CAR(CDR(args)));
3691  le = gen_nconc(le, generic_proper_effects_of_expression(second_arg));
3692  }
3693 
3694  ifdebug(5)
3695  {
3696  pips_debug(5, "resulting effects: \n");
3697  (*effects_prettyprint_func)(le);
3698  fprintf(stderr, "\n");
3699  }
3700  pips_debug(5, "end\n");
3701  return le;
3702 }
3703 
3704 /**
3705  compute the effects of a call to a searching or sorting function
3706 
3707  The summary effects of the comparison function should be translated
3708  using the actual argument target array to infer the actual effects
3709  of the search or sort, especially in case of an array of structs for
3710  instance. Currently, conservative effects are generated, which means
3711  effects on all the paths reachable from the array elements.
3712  */
3713 static list search_or_sort_effects(entity e, list args)
3714 {
3715  list le = NIL;
3716  list l_tmp = NIL;
3717  expression base_exp = expression_undefined;
3718  expression nmemb_exp = expression_undefined;
3719  expression size_exp = expression_undefined;
3720  expression compar_func_exp = expression_undefined;
3721 
3723  {
3724  pips_debug(8, "bsearch function\n");
3725  expression key_exp = EXPRESSION(CAR(args));
3726  // the key is passed to the comparison function as an argument.
3727  // so all paths reachable from key may be read.
3728  le = c_actual_argument_to_may_summary_effects(key_exp, 'r');
3729  pips_debug_effects(8, "effects for the key:", le);
3730  POP(args);
3731  }
3732  else if(ENTITY_QSORT_SYSTEM_P(e))
3733  {
3734  pips_debug(8, "qsort function\n");
3735  }
3736  else
3737  pips_internal_error("unexpected searching or sorting function\n");
3738 
3739  base_exp = EXPRESSION(CAR(args));
3740  POP(args);
3741  nmemb_exp = EXPRESSION(CAR(args));
3742  POP(args);
3743  size_exp = EXPRESSION(CAR(args));
3744  POP(args);
3745  compar_func_exp = EXPRESSION(CAR(args));
3746 
3747  // each element of the array is passed to the comparison function
3748  // so all paths reachable from base may be read;
3749  // more precise effects could be generated by taking into account
3750  // the summary effects of the comparison function
3751  l_tmp = c_actual_argument_to_may_summary_effects(base_exp, 'r');
3752  pips_debug_effects(8, "read effects for the base array:", l_tmp);
3753  le = gen_nconc(l_tmp, le);
3754 
3755  // then each element of the array may be written,
3756  // but not beyond struct internal pointers
3757  list l_base_eff = NIL;
3758  list l_base_inter_eff =
3759  generic_proper_effects_of_complex_address_expression(base_exp, &l_base_eff, true);
3760 
3761  l_tmp = NIL;
3762  FOREACH(EFFECT, base_eff, l_base_eff)
3763  {
3764  bool to_be_freed = false;
3765  type base_eff_type = cell_to_type(effect_cell(base_eff), &to_be_freed);
3766  l_tmp = gen_nconc
3767  (l_tmp,
3769  base_eff_type,
3770  'w',
3771  true,
3772  0,
3773  false));
3774  if (to_be_freed) free_type(base_eff_type);
3775  }
3776  pips_debug_effects(8, "write effects for the base array:", l_tmp);
3777  le = gen_nconc(l_tmp, le);
3778  le = gen_nconc(l_base_inter_eff, le);
3779 
3780  //nmemb_exp and size_exp are read
3781  le = gen_nconc(generic_proper_effects_of_expression(nmemb_exp), le);
3782  le = gen_nconc(generic_proper_effects_of_expression(size_exp), le);
3783 
3784  // and the comparison function expression is evaluated
3785  le = gen_nconc(generic_proper_effects_of_expression(compar_func_exp), le);
3786 
3787  pips_debug_effects(8, "final effects:", le);
3788 
3789  return le;
3790 }
3791 
3792 
3793 /**
3794  generate effects for strtod like functions
3795  */
3796 static list strtod_like_effects(entity e __attribute__ ((unused)), list args)
3797 {
3798  list le = NIL;
3799  pips_debug(8, "begin \n");
3800  expression nptr_exp = EXPRESSION(CAR(args));
3801  POP(args);
3802  expression endptr_exp = EXPRESSION(CAR(args));
3803 
3804  /* the first expression must be char * or char[], and all its components may be read */
3805  le = c_actual_argument_to_may_summary_effects(nptr_exp, 'r');
3806  pips_debug_effects(8, "effects on first argument\n", le);
3807 
3808  /* the second expression target is initialized if it is a non-null pointer */
3809  if (expression_address_of_p(endptr_exp))
3810  {
3811  call c = expression_call(endptr_exp);
3812  endptr_exp = EXPRESSION(CAR(call_arguments(c)));
3813  list lme_endptr = NIL;
3814  list le_endptr = generic_proper_effects_of_complex_address_expression(endptr_exp, &lme_endptr, true);
3815  pips_debug_effects(8, "main effects for address of expression\n", lme_endptr);
3816  le = gen_nconc(le, lme_endptr);
3817  le = gen_nconc(le, le_endptr);
3818  }
3819  else if (!expression_null_p(endptr_exp)) /* if its a NULL pointer, it is not assigned */
3820  {
3821  list lme_endptr = NIL;
3822  list le_endptr = generic_proper_effects_of_complex_address_expression(endptr_exp, &lme_endptr, true);
3823  pips_debug_effects(8, "main effects on second argument\n", lme_endptr);
3824 
3825  FOREACH(EFFECT, me, lme_endptr)
3826  {
3827  /* there is a read effect on the main pointer */
3828  // functions that can be pointed by effect_dup_func:
3829  // simple_effect_dup
3830  // region_dup
3831  // copy_effect
3832  effect me_dup = (*effect_dup_func)(me);
3833  effect_to_read_effect(me_dup);
3834  le = gen_nconc(le, effect_to_list(me_dup));
3836  effect_to_may_effect(me); /* well, if its a NULL pointer, it is not assigned, but we may not know it */
3837  }
3838  pips_debug_effects(8, "main effects after adding dereferencing dimension\n", lme_endptr);
3839  le = gen_nconc(le, lme_endptr);
3840  le = gen_nconc(le, le_endptr);
3841  }
3842 
3843  pips_debug_effects(8,"final_effects:", le);
3844  return le;
3845 }
3846 
3847 
3848 
3849 /**
3850  generate effects for strtol like functions
3851  */
3852 static list strtol_like_effects(entity e, list args)
3853 {
3854  pips_debug(8, "begin \n");
3855 
3856  list le = NIL;
3857 
3858  /* the first and second argument are used as in strtod like functions */
3859  le = strtod_like_effects(e, args);
3860 
3861  // don't move this upwards because it modifies args
3862  // expression nptr_exp = EXPRESSION(CAR(args));
3863  POP(args);
3864  // expression endptr_exp = EXPRESSION(CAR(args));
3865  POP(args);
3866  expression base_exp = EXPRESSION(CAR(args));
3867 
3868  /* the third expression is solely read */
3869  le = gen_nconc(le, generic_proper_effects_of_expression(base_exp));
3870 
3871  pips_debug_effects(8,"final_effects:", le);
3872  return le;
3873 }
3874 
3875 
3876 
3877 /**
3878  * Add some Read for the IO on return/exit/abort statement in main function
3879  */
3880 static list generic_end_effects(entity __attribute__ ((__unused__)) e, list args, bool __attribute__ ((__unused__)) return_p) {
3881  list le = NIL; //return list effects
3882  list lse = NIL; //side effects of args
3883  list lio = NIL; //IO effects
3884  //list lr = NIL; //random effects
3885  pips_debug(5, "begin\n");
3886 
3887  //compute side effects
3889 
3890  // NL: add of IO Read are now done by cumulated effects, and it's no more a proper effect
3891 // if (entity_main_module_p(get_current_module_entity())) {
3892 // //compute IO effects
3893 // //see generic_c_io_effects()
3894 // expression unit = make_unbounded_expression();
3895 // lio = generic_logical_units_effects(unit, true);
3896 // // Do we also have to add stdin/stdout/stderr?
3897 // // LUNS[*] should normally be enough
3898 //
3899 // //compute random effects
3900 // //lr = any_rgs_effects(e, args, false, true);
3901 // }
3902 
3903  le = gen_nconc(le, lse);
3904  le = gen_nconc(le, lio);
3905  //le = gen_nconc(le, lr);
3906  pips_debug(5, "end\n");
3907 
3908  return le;
3909 }
3910 
3911 /**
3912  * for return statement
3913  * difference between return and exit/abort are subtle and ambiguous for C
3914  * see https://stackoverflow.com/questions/461449/return-statement-vs-exit-in-main
3915  * or the norm?
3916  * For the moment end_program_effects and end_process_effects done the same thing
3917  */
3918 static list end_program_effects(entity e, list args) {
3919  return generic_end_effects(e, args, true);
3920 }
3921 
3922 /**
3923  * for exit/abort statement
3924  * difference between return and exit/abort are subtle and ambiguous for C
3925  * see https://stackoverflow.com/questions/461449/return-statement-vs-exit-in-main
3926  * or the norm?
3927  * For the moment end_program_effects and end_process_effects done the same thing
3928  */
3929 static list end_process_effects(entity e, list args) {
3930  return generic_end_effects(e, args, false);
3931 }
3932 
3933 /**
3934  * MPI functions Effects
3935  * TODO MPI Effects
3936  */
3937 
3938 /**
3939  * For the moment it is a copy of safe_c_effects
3940  * But it's not good at all.
3941  * For instance, in case of an array it's depend of the count variable (2nd parameter of MPI_Send/Recv) to know how many array cell is read/write
3942  * also have to look the datatype (3nd parameter), if it's a custom hard to predict something
3943  *
3944  * This function is not enough conservative, for array, in the worst case, it must say all the array in read/write
3945  * How to do it?
3946  */
3947 static list
3948 mpi_functions_effects(entity e __attribute__ ((__unused__)), list args)
3949 {
3950  list lw = NIL, lr = NIL;
3951 
3952  pips_debug(5, "begin\n");
3954  FOREACH(EXPRESSION, arg, args)
3955  {
3957  }
3958  pips_debug(5, "end\n");
3959  lr = gen_nconc(lr, lw);
3960  return(lr);
3961 }
3962 
3963 static list
3964 mpi_send_effects(entity e __attribute__ ((__unused__)), list args)
3965 {
3966  list la = NIL, lr = NIL;
3967  //la list of effects on array/variable
3968 
3969  pips_debug(5, "begin\n");
3970 // print_expressions(args);
3972 
3973 // pips_debug(5, "lr effects\n");
3974 // print_memory_effects(lr);
3975 // FOREACH(EXPRESSION, arg, args)
3976 // {
3977 // lw = gen_nconc(lw, c_actual_argument_to_may_summary_effects(arg, 'x'));
3978 // }
3979 //unused// expression earray = EXPRESSION(CAR(args));// (expression) args->car.p;
3980 //unused// expression enbelem = EXPRESSION(CAR(CDR(args)));
3981 //unused// expression edatatype = EXPRESSION(CAR(CDR(CDR(args))));
3982  /*
3983  possible value of edatatype :
3984  OpenMPI : ompi_mpi_double, ompi_mpi_int, ...
3985  MPIch : (MPI_Datatype)0x4c00xxx
3986  */
3987 // TODO
3988 // pips_debug(5, "lw effects\n");
3989 // print_memory_effects(lw);
3990  pips_debug(5, "end\n");
3991  lr = gen_nconc(lr, la);
3992  return(lr);
3993 }
float a2sf[2] __attribute__((aligned(16)))
USER generates a user error (i.e., non fatal) by printing the given MSG according to the FMT.
Definition: 3dnow.h:3
cell make_cell_reference(reference _field_)
Definition: effects.c:293
void free_effect(effect p)
Definition: effects.c:451
void free_cell(cell p)
Definition: effects.c:249
void free_action(action p)
Definition: effects.c:80
approximation make_approximation_may(void)
Definition: effects.c:179
effect make_effect(cell a1, action a2, approximation a3, descriptor a4)
Definition: effects.c:484
descriptor copy_descriptor(descriptor p)
DESCRIPTOR.
Definition: effects.c:389
effect copy_effect(effect p)
EFFECT.
Definition: effects.c:448
void free_approximation(approximation p)
Definition: effects.c:135
void free_transformer(transformer p)
Definition: ri.c:2616
void free_normalized(normalized p)
Definition: ri.c:1407
value make_value_unknown(void)
Definition: ri.c:2847
expression make_expression(syntax a1, normalized a2)
Definition: ri.c:886
type make_type_variable(variable _field_)
Definition: ri.c:2715
storage make_storage(enum storage_utype tag, void *val)
Definition: ri.c:2273
ram make_ram(entity a1, entity a2, intptr_t a3, list a4)
Definition: ri.c:1999
basic make_basic_pointer(type _field_)
Definition: ri.c:179
expression copy_expression(expression p)
EXPRESSION.
Definition: ri.c:850
reference make_reference(entity a1, list a2)
Definition: ri.c:2083
variable make_variable(basic a1, list a2, list a3)
Definition: ri.c:2895
void free_expression(expression p)
Definition: ri.c:853
reference copy_reference(reference p)
REFERENCE.
Definition: ri.c:2047
void free_type(type p)
Definition: ri.c:2658
normalized make_normalized_complex(void)
Definition: ri.c:1453
void free_syntax(syntax p)
Definition: ri.c:2445
syntax make_syntax_range(range _field_)
Definition: ri.c:2497
range make_range(expression a1, expression a2, expression a3)
Definition: ri.c:2041
static reference ref
Current stmt (an integer)
Definition: adg_read_paf.c:163
entity entity_typed_anywhere_locations(type t)
bool cell_typed_anywhere_locations_p(cell c)
test if a cell is the bottom of the lattice
bool entity_all_locations_p(entity e)
test if an entity is the top of the lattice
bool entity_anywhere_locations_p(entity e)
test if an entity is the bottom of the lattice
cons * arguments_add_entity(cons *a, entity e)
Definition: arguments.c:85
void const char const char const int
bool base_contains_variable_p(Pbase b, Variable v)
bool base_contains_variable_p(Pbase b, Variable v): returns true if variable v is one of b's elements...
Definition: base.c:136
transformer transformer_dup(transformer t_in)
transformer package - basic routines
Definition: basic.c:49
transformer transformer_identity()
Allocate an identity transformer.
Definition: basic.c:110
struct IntrinsicDescriptor IntrinsicDescriptor
The following data structure describes an intrinsic function: its name and its arity and its type,...
entity make_phi_entity(int)
#define pips_debug_effects(level, message, l_eff)
@ with_points_to
list make_anywhere_read_write_memory_effects(void)
list generic_proper_effects_of_complex_address_expression(expression, list *, int)
bool effects_private_current_context_empty_p(void)
void effects_to_may_effects(list)
list generic_proper_effects_of_address_expression(expression, int)
effect make_anywhere_effect(action)
transformer effects_private_current_context_head(void)
void effect_add_dereferencing_dimension(effect)
list effects_lhs_expression_to_sinks(expression)
Returns a list of cells corresponding to the value,i.e.
Definition: points_to.c:369
list generic_proper_effects_of_read_reference(reference)
list generic_proper_effects_of_range(range)
list generic_r_proper_effects_of_call(call)
pointer_info_val get_pointer_info_kind(void)
void add_range_information_to_cells(list, expression)
list generic_proper_effects_of_written_reference(reference)
list cells_to_read_effects(list)
Definition: points_to.c:467
expression count_and_offset_expressions_to_range_expression(expression, expression)
void add_precondition_information_to_effects(list)
list generic_proper_effects_of_any_lhs(expression)
effect(* reference_to_effect_func)(reference, action, bool)
expression count_expression_to_range_expression(expression)
effect make_declaration_effect(entity, bool)
void effects_to_proper_approximation(list)
list cells_to_write_effects(list)
Definition: points_to.c:462
void effects_free(list)
bool effects_private_current_context_stack_initialized_p(void)
bool effects_scalars_and_same_action_p(effect, effect)
statement effects_private_current_stmt_head(void)
list effects_expression_to_points_to_sinks(expression)
void effect_to_may_effect(effect)
bool get_constant_paths_p(void)
list cells_to_read_or_write_effects(list, bool)
Definition: points_to.c:377
type simple_effect_reference_type(reference)
list generic_proper_effects_of_expression(expression)
void effect_to_read_effect(effect)
void update_last_reference_subscript(reference, expression)
transformer effects_private_current_context_pop(void)
list c_actual_argument_to_may_summary_effects(expression, tag)
void effects_private_current_context_push(transformer)
list generic_effect_generate_all_accessible_paths_effects_with_level(effect, type, tag, bool, int, bool)
list effect_to_list(effect)
void effect_add_field_dimension(effect, entity)
list effects_lhs_expression_to_sources(expression)
Returns a list of cells corresponding to the possibles values, i.e.
Definition: points_to.c:349
list generic_proper_effects_of_intrinsic(entity, list)
intrinsics.c
list generic_proper_effects_of_expressions(list)
void simple_effect_add_expression_dimension(effect, expression)
#define effect_any_reference(e)
FI: cannot be used as a left hand side.
#define effect_approximation_tag(eff)
#define effect_write_p(eff)
type cell_to_type(cell, bool *)
Definition: type.c:513
type points_to_reference_to_concrete_type(reference)
Definition: type.c:685
reference cell_any_reference(cell)
API for reference.
Definition: effects.c:77
entity effect_entity(effect)
cproto-generated files
Definition: effects.c:52
action make_action_write_memory(void)
To ease the extension of action with action_kind.
Definition: effects.c:1011
bool effect_list_consistent_p(list)
Debugging.
Definition: effects.c:1340
type points_to_expression_to_concrete_type(expression)
The type returned is stored in a hash-table.
Definition: type.c:617
bool anywhere_effect_p(effect)
Is it an anywhere effect? ANYMMODULE:ANYWHERE
Definition: effects.c:346
bool std_file_effect_p(effect)
Definition: effects.c:519
action make_action_read_memory(void)
Definition: effects.c:1017
#define effect_undefined_p(x)
Definition: effects.h:615
#define effect_action(x)
Definition: effects.h:642
#define effect_undefined
Definition: effects.h:614
#define approximation_may_p(x)
Definition: effects.h:363
#define action_write_p(x)
Definition: effects.h:314
#define CELL(x)
CELL.
Definition: effects.h:424
#define descriptor_convex_p(x)
Definition: effects.h:599
#define effect_descriptor(x)
Definition: effects.h:646
#define descriptor_undefined
Definition: effects.h:559
@ is_action_write
Definition: effects.h:293
@ is_action_read
Definition: effects.h:292
@ is_approximation_may
Definition: effects.h:341
@ is_approximation_exact
Definition: effects.h:343
#define effect_approximation(x)
Definition: effects.h:644
#define newgen_Psysteme(p)
Definition: effects.h:47
#define EFFECT(x)
EFFECT.
Definition: effects.h:608
#define effect_cell(x)
Definition: effects.h:640
bool get_bool_property(const string)
FC 2015-07-20: yuk, moved out to prevent an include cycle dependency include "properties....
#define call_constant_p(C)
Definition: flint_check.c:51
void gen_full_free_list(list l)
Definition: genClib.c:1023
if(!(yy_init))
Definition: genread_lex.c:1029
#define ENDP(l)
Test if a list is empty.
Definition: newgen_list.h:66
list gen_nreverse(list cp)
reverse a list in place
Definition: list.c:304
#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
#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
void gen_free_list(list l)
free the spine of the list
Definition: list.c:327
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
#define MAP(_map_CASTER, _map_item, _map_code, _map_list)
Apply/map an instruction block on all the elements of a list (old fashioned)
Definition: newgen_list.h:226
static list indices
Definition: icm.c:204
#define STDOUT_FILENO
Definition: unistd.in.h:211
#define STDERR_FILENO
Definition: unistd.in.h:214
#define STDIN_FILENO
NetBSD 5.0 mis-defines NULL.
Definition: unistd.in.h:208
#define pips_debug
these macros use the GNU extensions that allow variadic macros, including with an empty list.
Definition: misc-local.h:145
#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 pips_user_error
Definition: misc-local.h:147
#define pips_user_irrecoverable_error
Definition: misc-local.h:148
void debug(const int the_expected_debug_level, const char *calling_function_name, const char *a_message_format,...)
ARARGS0.
Definition: debug.c:189
struct IoElementDescriptor IoElementDescriptor
{{ banner
static IoElementDescriptor IoElementDescriptorUndefined
Definition: myintrinsics.c:48
static IoElementDescriptor IoElementDescriptorTable[]
Definition: myintrinsics.c:50
#define LIST_DIRECTED_FORMAT_NAME
Definition: naming-local.h:97
#define TOP_LEVEL_MODULE_NAME
Module containing the global variables in Fortran and C.
Definition: naming-local.h:101
#define STATIC_AREA_LOCAL_NAME
Definition: naming-local.h:70
#define same_string_p(s1, s2)
int tag
TAG.
Definition: newgen_types.h:92
#define false
Definition: newgen_types.h:80
int unit
UNIT.
Definition: newgen_types.h:97
struct cons * list
Definition: newgen_types.h:106
int f(int off1, int off2, int n, float r[n], float a[n], float b[n])
Definition: offsets.c:15
string expression_to_string(expression e)
Definition: expression.c:77
void print_reference(reference r)
Definition: expression.c:142
#define UNBOUNDED_DIMENSION_NAME
Definition: ri-util-local.h:74
#define GETS_FUNCTION_NAME
#define ERFCL_OPERATOR_NAME
#define ERFC_OPERATOR_NAME
#define BITWISE_OR_OPERATOR_NAME
#define FREAD_FUNCTION_NAME
#define SYNCFS_FUNCTION_NAME
#define ALLOCA_FUNCTION_NAME
#define ENTITY_STRCMP_SYSTEM_P(e)
include <string.h>
#define NINT_CONVERSION_NAME
#define ATAN2_OPERATOR_NAME
#define SGCONVERT_OPERATOR_NAME
#define FWSCANF_FUNCTION_NAME
#define LDEXPL_OPERATOR_NAME
#define QECONVERT_OPERATOR_NAME
#define CREALF_OPERATOR_NAME
#define FESETEXCEPTFLAG_FUNCTION_NAME
#define VFPRINTF_FUNCTION_NAME
#define EXPM1L_OPERATOR_NAME
#define C_TANH_OPERATOR_NAME
#define CTANHF_OPERATOR_NAME
#define LABS_FUNCTION_NAME
#define FUNC_TO_DECIMAL_OPERATOR_NAME
#define C_WRITE_FUNCTION_NAME
#define DREAL_GENERIC_CONVERSION_NAME
#define TGAMMAL_OPERATOR_NAME
#define GETPGRP_FUNCTION_NAME
#define BUILTIN_VA_END
vararg stuff.
#define SRAND_FUNCTION_NAME
#define CASINL_OPERATOR_NAME
#define MAX_OPERATOR_NAME
#define POWER_OPERATOR_NAME
#define GET_CURRENT_DIR_NAME_FUNCTION_NAME
#define SETEUID_FUNCTION_NAME
#define ATOI_FUNCTION_NAME
#define LLE_OPERATOR_NAME
#define DECIMAL_TO_SINGLE_OPERATOR_NAME
#define _TOLOWER_OPERATOR_NAME
#define ATANL_OPERATOR_NAME
#define CABS_OPERATOR_NAME
#define REALLOC_FUNCTION_NAME
#define LOGB_OPERATOR_NAME
#define CPROJ_OPERATOR_NAME
#define WCSTOMBS_FUNCTION_NAME
#define FGETC_FUNCTION_NAME
#define GETLOGIN_FUNCTION_NAME
#define GETDATE_R_FUNCTION_NAME
#define LOG1P_OPERATOR_NAME
#define STRLEN_FUNCTION_NAME
#define LCHOWN_FUNCTION_NAME
#define TOWUPPER_OPERATOR_NAME
#define POST_DECREMENT_OPERATOR_NAME
Definition: ri-util-local.h:98
#define CPU_TIME_FUNCTION_NAME
#define DTIME_FUNCTION_NAME
#define NEXTAFTERF_OPERATOR_NAME
#define SYSCONF_FUNCTION_NAME
#define STAT_FUNCTION_NAME
#define MEMSET_FUNCTION_NAME
#define CEXP_OPERATOR_NAME
#define CPOWL_OPERATOR_NAME
#define RECV_FUNCTION_NAME
#define FDATASYNC_FUNCTION_NAME
#define IDNINT_CONVERSION_NAME
#define FWRITE_FUNCTION_NAME
#define FTRUNCATE_FUNCTION_NAME
#define IO_EFFECTS_PTR_NAME
To express C IO intrinsics effects.
#define LINKAT_FUNCTION_NAME
#define MBTOWC_FUNCTION_NAME
#define MEMALIGN_FUNCTION_NAME
#define FLOAT_GENERIC_CONVERSION_NAME
#define ISOC99_VFSCANF_FUNCTION_NAME
#define TTYNAME_FUNCTION_NAME
#define RAND_GEN_EFFECTS_NAME
variable name for random unit
#define TOLOWER_OPERATOR_NAME
#define BITWISE_XOR_OPERATOR_NAME
#define STRSPN_FUNCTION_NAME
#define DUP_FUNCTION_NAME
#define GETRESUID_FUNCTION_NAME
#define FGETPOS_FUNCTION_NAME
#define C_LESS_OR_EQUAL_OPERATOR_NAME
#define NANL_OPERATOR_NAME
#define ENTITY_PUTCHAR_P(e)
#define SEED48_FUNCTION_NAME
#define TANH_OPERATOR_NAME
#define REMAINDERF_OPERATOR_NAME
#define IMAXDIV_FUNCTION_NAME
#define FMINF_OPERATOR_NAME
#define STRCMP_FUNCTION_NAME
#define CACOSH_OPERATOR_NAME
#define NEARBYINTF_OPERATOR_NAME
#define STRPTIME_L_FUNCTION_NAME
#define RAND_EFFECTS_PACKAGE_NAME
package name for random routines
#define COS_OPERATOR_NAME
#define __FILBUF_FUNCTION_NAME
#define C_EXP_OPERATOR_NAME
#define CDABS_OPERATOR_NAME
#define DSIGN_OPERATOR_NAME
#define TIMELOCAL_FUNCTION_NAME
#define SCANF_FUNCTION_NAME
#define TIME_EFFECTS_PACKAGE_NAME
package name for time routines
#define COPYSIGNF_OPERATOR_NAME
#define ISWALNUM_OPERATOR_NAME
include <wctype.h>
#define MRAND48_FUNCTION_NAME
#define FSYNC_FUNCTION_NAME
fcntl is declared with fcntl.h
#define FTELLO64_FUNCTION_NAME
#define DOUBLE_MODULO_OPERATOR_NAME
#define READ_FUNCTION_NAME
#define ISLOWER_OPERATOR_NAME
#define STRNCPY_FUNCTION_NAME
#define C_ACOSH_OPERATOR_NAME
#define LSEEK64_FUNCTION_NAME
#define CTANHL_OPERATOR_NAME
#define FDIML_OPERATOR_NAME
#define SETLOGIN_FUNCTION_NAME
#define WARNX_FUNCTION_NAME
#define TIMER_SETTIME_FUNCTION_NAME
#define C_AND_OPERATOR_NAME
#define CONFSTR_FUNCTION_NAME
#define GREATER_THAN_OPERATOR_NAME
#define CTANF_OPERATOR_NAME
#define ENDFILE_FUNCTION_NAME
#define DIV_FUNCTION_NAME
#define FREOPEN64_FUNCTION_NAME
#define TOWLOWER_OPERATOR_NAME
#define C_GREATER_OR_EQUAL_OPERATOR_NAME
#define FCHOWNAT_FUNCTION_NAME
#define SIGN_OPERATOR_NAME
#define ATANF_OPERATOR_NAME
#define ENTITY_SCANF_P(e)
#define ISWXDIGIT_OPERATOR_NAME
#define DMIN1_OPERATOR_NAME
#define C_LOG10_OPERATOR_NAME
#define FDIMF_OPERATOR_NAME
#define LOGF_OPERATOR_NAME
#define SETSID_FUNCTION_NAME
#define ATAN2F_OPERATOR_NAME
#define CACOS_OPERATOR_NAME
include <complex.h>
#define STRSTR_FUNCTION_NAME
#define BUILTIN_VA_COPY
#define GETPPID_FUNCTION_NAME
#define PREAD_FUNCTION_NAME
#define CTIME_FUNCTION_NAME
#define SBRK_FUNCTION_NAME
#define BITWISE_OR_UPDATE_OPERATOR_NAME
#define EXECLP_FUNCTION_NAME
#define ABS_OPERATOR_NAME
#define DECIMAL_TO_QUADRUPLE_OPERATOR_NAME
#define TOWCTRANS_OPERATOR_NAME
#define SETUID_FUNCTION_NAME
#define C_REWIND_FUNCTION_NAME
#define STRFTIME_L_FUNCTION_NAME
#define GCC_CIMAG_OPERATOR_NAME
#define LLROUNDF_OPERATOR_NAME
#define CTIME_R_FUNCTION_NAME
#define ENTITY_STRNCMP_SYSTEM_P(e)
#define NEXTTOWARDF_OPERATOR_NAME
#define DBLE_GENERIC_CONVERSION_NAME
#define SYSTEM_FUNCTION_NAME
#define FEGETROUND_FUNCTION_NAME
#define IO_EFFECTS_PACKAGE_NAME
Implicit variables to handle IO effetcs.
#define SUBSTRING_FUNCTION_NAME
#define COSHL_OPERATOR_NAME
#define GETC_FUNCTION_NAME
#define ISOC99_FSCANF_FUNCTION_NAME
#define DACOS_OPERATOR_NAME
#define ISHFT_OPERATOR_NAME
Bit manipulation functions.
#define TOASCII_OPERATOR_NAME
#define MALLOC_FUNCTION_NAME
#define ASSERT_FUNCTION_NAME
Here are C intrinsics arranged in the order of the standard ISO/IEC 9899:TC2.
#define LLROUND_OPERATOR_NAME
#define GROUP_MEMBER_FUNCTION_NAME
#define PIPS_IO_BARRIER_OPERATOR_NAME
#define CRYPT_FUNCTION_NAME
#define CLEARERR_FUNCTION_NAME
#define LOCALTIME_R_FUNCTION_NAME
#define TIME_FUNCTION_NAME
include<time.h>
#define CSINL_OPERATOR_NAME
#define COSH_OPERATOR_NAME
#define ISUPPER_OPERATOR_NAME
#define ISALNUM_OPERATOR_NAME
include <ctype.h>
#define VERR_FUNCTION_NAME
#define BUFFERIN_FUNCTION_NAME
#define DAEMON_FUNCTION_NAME
#define EOLE_FMA_OPERATOR_NAME
These operators are used within the optimize transformation in order to manipulate operators such as ...
#define REVOKE_FUNCTION_NAME
#define IEOR_OPERATOR_NAME
#define LRAND48_FUNCTION_NAME
#define LLRINT_OPERATOR_NAME
#define ACOSHL_OPERATOR_NAME
#define ISPUNCT_OPERATOR_NAME
#define STRERROR_R_FUNCTION_NAME
#define NEXTTOWARDL_OPERATOR_NAME
#define ERR_FUNCTION_NAME
F2008.
#define C_GREATER_THAN_OPERATOR_NAME
#define CPOW_OPERATOR_NAME
#define DSQRT_OPERATOR_NAME
#define MPI_IBSEND_FUNCTION_NAME
#define FPATHCONF_FUNCTION_NAME
#define VFORK_FUNCTION_NAME
#define C_CCOS_OPERATOR_NAME
#define SSCANF_FUNCTION_NAME
#define SINF_OPERATOR_NAME
#define C_MODULO_OPERATOR_NAME
#define MPI_RSEND_FUNCTION_NAME
#define ISDIGIT_OPERATOR_NAME
#define COPYSIGNL_OPERATOR_NAME
#define CACOSHL_OPERATOR_NAME
#define STRCPY_FUNCTION_NAME
#define MINUS_OPERATOR_NAME
#define IDIM_OPERATOR_NAME
#define CSINHF_OPERATOR_NAME
#define SETREUID_FUNCTION_NAME
#define CHOWN_FUNCTION_NAME
#define C_COSH_OPERATOR_NAME
#define DUP2_FUNCTION_NAME
#define FEXECVE_FUNCTION_NAME
#define _TOUPPER_OPERATOR_NAME
#define EXP2L_OPERATOR_NAME
#define GMTIME_FUNCTION_NAME
#define LGAMMAF_OPERATOR_NAME
#define ATOF_FUNCTION_NAME
random functions of <stdlib.h>
#define ETIME_FUNCTION_NAME
#define ILOGBF_OPERATOR_NAME
#define AINT_CONVERSION_NAME
#define STRTOUL_FUNCTION_NAME
#define LESS_THAN_OPERATOR_NAME
#define DCMPLX_GENERIC_CONVERSION_NAME
#define DNINT_CONVERSION_NAME
#define PUTC_FUNCTION_NAME
#define ISFINITE_OPERATOR_NAME
#define CCOSH_OPERATOR_NAME
#define CLOG_OPERATOR_NAME
#define VSSCANF_FUNCTION_NAME
#define DINT_CONVERSION_NAME
#define ENTITY_VPRINTF_P(e)
#define IABS_OPERATOR_NAME
#define FLOORF_OPERATOR_NAME
#define ERRX_FUNCTION_NAME
#define EQUIV_OPERATOR_NAME
#define STRTOL_FUNCTION_NAME
#define CLOGF_OPERATOR_NAME
#define NRAND48_FUNCTION_NAME
#define SCALBLNL_OPERATOR_NAME
#define CTAN_OPERATOR_NAME
#define ASM_FUNCTION_NAME
__asm function
#define Y0_OPERATOR_NAME
#define DIVIDE_UPDATE_OPERATOR_NAME
#define WSCANF_FUNCTION_NAME
#define RAISE_FUNCTION_NAME
#define CEILF_OPERATOR_NAME
#define FSEEK_FUNCTION_NAME
#define ISGREATER_OPERATOR_NAME
#define FORK_FUNCTION_NAME
#define C_SQRT_OPERATOR_NAME
#define MPI_IRSEND_FUNCTION_NAME
#define USLEEP_FUNCTION_NAME
#define STRCHR_FUNCTION_NAME
#define MODF_OPERATOR_NAME
#define GETOPT_FUNCTION_NAME
#define CBRT_OPERATOR_NAME
#define ENTITY_DEREFERENCING_P(e)
#define PREAD64_FUNCTION_NAME
#define ATOLL_FUNCTION_NAME
#define ISATTY_FUNCTION_NAME
#define COMMA_OPERATOR_NAME
#define MODULO_UPDATE_OPERATOR_NAME
#define POINT_TO_OPERATOR_NAME
Definition: ri-util-local.h:92
#define CSQRTF_OPERATOR_NAME
#define _IO_GETC_FUNCTION_NAME
#define TCSETPGRP_FUNCTION_NAME
#define ISWLOWER_OPERATOR_NAME
#define PUTCHAR_FUNCTION_NAME
#define EXECVP_FUNCTION_NAME
#define PLUS_OPERATOR_NAME
#define LOG10_OPERATOR_NAME
#define VPRINTF_FUNCTION_NAME
#define LENGTH_OPERATOR_NAME
#define CATAN_OPERATOR_NAME
#define TIME_EFFECTS_BUFFER_NAME
#define FTRUNCATE64_FUNCTION_NAME
#define LOG2F_OPERATOR_NAME
#define SWAB_FUNCTION_NAME
#define SIGNAL_OPERATOR_NAME
signal.h
#define STRTOK_FUNCTION_NAME
#define GCC_CREAL_OPERATOR_NAME
#define GETEUID_FUNCTION_NAME
#define DCOSH_OPERATOR_NAME
#define DIM_OPERATOR_NAME
#define LOCALTIME_FUNCTION_NAME
#define IOCTL_FUNCTION_NAME
#define EXPF_OPERATOR_NAME
#define SETRESUID_FUNCTION_NAME
#define LRINTF_OPERATOR_NAME
#define LLRINTL_OPERATOR_NAME
#define _EXIT_FUNCTION_NAME
#define SPRINTF_FUNCTION_NAME
#define TANL_OPERATOR_NAME
#define DIMAG_CONVERSION_NAME
#define MVBITS_OPERATOR_NAME
#define FMAL_OPERATOR_NAME
#define STRPTIME_FUNCTION_NAME
#define LDEXP_OPERATOR_NAME
#define ENTITY_PRINTF_P(e)
o functions: C library and system io.Amira Mensi
#define SIN_OPERATOR_NAME
#define RAND_FUNCTION_NAME
#define SINGLE_TO_DECIMAL_OPERATOR_NAME
#define CHDIR_FUNCTION_NAME
#define RANDOM_FUNCTION_NAME
#define C_COS_OPERATOR_NAME
#define FMAX_OPERATOR_NAME
#define TMPFILE64_FUNCTION_NAME
#define EXPL_OPERATOR_NAME
#define NEARBYINTL_OPERATOR_NAME
#define EQUAL_OPERATOR_NAME
#define CEXPF_OPERATOR_NAME
#define FTELLO_FUNCTION_NAME
#define DUP3_FUNCTION_NAME
#define STRRCHR_FUNCTION_NAME
#define GETPGROUPS_FUNCTION_NAME
#define STRNCAT_FUNCTION_NAME
#define QGCONVERT_OPERATOR_NAME
#define FETESTEXCEPT_FUNCTION_NAME
#define ACCT_FUNCTION_NAME
#define FMODL_OPERATOR_NAME
#define REMAINDER_OPERATOR_NAME
#define WARN_FUNCTION_NAME
#define MEMCMP_FUNCTION_NAME
#define FMIN_OPERATOR_NAME
#define C_CSQRT_OPERATOR_NAME
#define ISWUPPER_OPERATOR_NAME
#define LROUNDL_OPERATOR_NAME
#define UALARM_FUNCTION_NAME
#define IO_EFFECTS_ARRAY_NAME
array of Logical UNits; it is more or less handled as the current file pointer; in C,...
#define ATANHL_OPERATOR_NAME
#define FDOPEN_FUNCTION_NAME
#define EXPM1_OPERATOR_NAME
#define CREALL_OPERATOR_NAME
#define CPROJL_OPERATOR_NAME
#define CLOGL_OPERATOR_NAME
#define IBITS_OPERATOR_NAME
#define ENTITY_GETCHAR_P(e)
#define DLOG10_OPERATOR_NAME
#define DCONJG_OPERATOR_NAME
#define FREOPEN_FUNCTION_NAME
#define CCOSHF_OPERATOR_NAME
#define QSORT_FUNCTION_NAME
#define CALLOC_FUNCTION_NAME
#define TTYNAME_R_FUNCTION_NAME
#define ILOGBL_OPERATOR_NAME
#define CSINHL_OPERATOR_NAME
#define SETREGID_FUNCTION_NAME
#define MAX0_OPERATOR_NAME
#define J1_OPERATOR_NAME
#define make_entity(n, t, s, i)
#define AMIN0_OPERATOR_NAME
#define SETLOCALE_FUNCTION_NAME
include <locale.h>
#define PSELECT_FUNCTION_NAME
#define EXECVPE_FUNCTION_NAME
#define ECONVERT_OPERATOR_NAME
#define ENTITY_PERROR_P(e)
#define CLOCK_FUNCTION_NAME
time.h
#define POWF_OPERATOR_NAME
#define SCALBLN_OPERATOR_NAME
#define FOPEN_FUNCTION_NAME
#define RETURN_FUNCTION_NAME
#define C_ASINH_OPERATOR_NAME
#define MEMMOVE_EFFECTS_PACKAGE_NAME
package name for memmove routines
#define BACKSPACE_FUNCTION_NAME
#define ISOC99_VSSCANF_FUNCTION_NAME
#define CARGL_OPERATOR_NAME
#define DEREFERENCING_OPERATOR_NAME
Definition: ri-util-local.h:93
#define ASCTIME_R_FUNCTION_NAME
#define CEILL_OPERATOR_NAME
#define CASE_FUNCTION_NAME
#define MIN0_OPERATOR_NAME
#define LRINT_OPERATOR_NAME
#define CSINF_OPERATOR_NAME
#define PIPS_C_MAX_OPERATOR_NAME
#define JRAND48_FUNCTION_NAME
#define GETCHAR_FUNCTION_NAME
#define GETSID_FUNCTION_NAME
#define C_CABS_OPERATOR_NAME
#define __ERRNO_LOCATION_OPERATOR_NAME
bits/errno.h
#define UNLINK_FUNCTION_NAME
#define ASINL_OPERATOR_NAME
#define CREAT_FUNCTION_NAME
#define ENTITY_FOPEN_P(e)
#define HYPOTL_OPERATOR_NAME
#define LOG2L_OPERATOR_NAME
#define STRCSPN_FUNCTION_NAME
#define MAX1_OPERATOR_NAME
#define NICE_FUNCTION_NAME
#define FIELD_OPERATOR_NAME
Definition: ri-util-local.h:91
#define SFCONVERT_OPERATOR_NAME
#define ROUNDF_OPERATOR_NAME
#define HYPOT_OPERATOR_NAME
#define SETGID_FUNCTION_NAME
#define CARGF_OPERATOR_NAME
#define NON_EQUIV_OPERATOR_NAME
#define CEIL_OPERATOR_NAME
#define C_CLOG_OPERATOR_NAME
#define LGAMMAL_OPERATOR_NAME
#define ISOC99_SSCANF_FUNCTION_NAME
#define CLOCK_GETCPULOCKID_FUNCTION_NAME
#define WCTRANS_OPERATOR_NAME
#define MATHERR_OPERATOR_NAME
#define CASINH_OPERATOR_NAME
#define FABSL_OPERATOR_NAME
#define LOCKF_FUNCTION_NAME
#define C_NON_EQUAL_OPERATOR_NAME
#define ISWPRINT_OPERATOR_NAME
#define MODFF_OPERATOR_NAME
#define LEFT_SHIFT_UPDATE_OPERATOR_NAME
#define LDEXPF_OPERATOR_NAME
#define ENTITY_VSCANF_P(e)
#define SCALB_OPERATOR_NAME
#define ATOQ_FUNCTION_NAME
#define IMS_OPERATOR_NAME
#define FMINL_OPERATOR_NAME
#define STRTOLD_FUNCTION_NAME
#define MEMCPY_FUNCTION_NAME
include <string.h>
#define DECIMAL_TO_DOUBLE_OPERATOR_NAME
#define REAL_MODULO_OPERATOR_NAME
#define DYSIZE_FUNCTION_NAME
#define SETVBUF_FUNCTION_NAME
#define STDIN_LUN
#define ISBLANK_OPERATOR_NAME
#define STRXFRM_FUNCTION_NAME
#define LLABS_FUNCTION_NAME
#define CCOSHL_OPERATOR_NAME
#define SYSCALL_FUNCTION_NAME
#define ILOGB_OPERATOR_NAME
#define GETW_FUNCTION_NAME
#define VHANGUP_FUNCTION_NAME
#define LOG10L_OPERATOR_NAME
#define NEARBYINT_OPERATOR_NAME
#define CONJG_OPERATOR_NAME
#define ASINHL_OPERATOR_NAME
#define ISOC99_SCANF_FUNCTION_NAME
#define C_TAN_OPERATOR_NAME
#define GCVT_FUNCTION_NAME
#define LOGBL_OPERATOR_NAME
#define C_SIN_OPERATOR_NAME
#define AMAX0_OPERATOR_NAME
#define VFSCANF_FUNCTION_NAME
#define CCOSL_OPERATOR_NAME
#define GETOPT_LONG_ONLY_FUNCTION_NAME
#define FFLUSH_FUNCTION_NAME
#define STRDUP_FUNCTION_NAME
#define ROUNDL_OPERATOR_NAME
#define GETUSERSHELL_FUNCTION_NAME
#define ENTITY_BUFFERIN_P(e)
#define ISWBLANK_OPERATOR_NAME
#define FMAXF_OPERATOR_NAME
#define REWIND_FUNCTION_NAME
#define LROUND_OPERATOR_NAME
#define LLROUNDL_OPERATOR_NAME
#define DMAX1_OPERATOR_NAME
#define RENAME_FUNCTION_NAME
#define IBSET_OPERATOR_NAME
#define BRK_FUNCTION_NAME
#define BUILTIN_VA_START
#define ENTITY_BSEARCH_SYSTEM_P(e)
#define IFIX_GENERIC_CONVERSION_NAME
#define FREE_FUNCTION_NAME
#define ACOS_OPERATOR_NAME
#define EXPM1F_OPERATOR_NAME
#define FPRINTF_FUNCTION_NAME
#define READLINK_FUNCTION_NAME
#define SETHOSTID_FUNCTION_NAME
#define MULTIPLY_UPDATE_OPERATOR_NAME
#define GETSUBOPT_FUNCTION_NAME
#define ENTITY_ISOC99_SCANF_P(e)
#define Y1_OPERATOR_NAME
#define ACOSL_OPERATOR_NAME
#define C_READ_FUNCTION_NAME
#define GETTIMEOFDAY_FUNCTION_NAME
#define C_ACOS_OPERATOR_NAME
#define OPEN_FUNCTION_NAME
#define END_FUNCTION_NAME
#define CCOSF_OPERATOR_NAME
#define ISWPUNCT_OPERATOR_NAME
#define BSEARCH_FUNCTION_NAME
#define MALLOC_EFFECTS_NAME
variable name for heap effects
#define GETPAGESIZE_FUNCTION_NAME
#define GETDTABLESIZE_FUNCTION_NAME
#define ISHFTC_OPERATOR_NAME
#define TMPFILE_FUNCTION_NAME
#define C_ABS_FUNCTION_NAME
#define CLOCK_NANOSLEEP_FUNCTION_NAME
#define ISNAN_OPERATOR_NAME
#define ENCRYPT_FUNCTION_NAME
#define MPI_SEND_FUNCTION_NAME
#define FCVT_FUNCTION_NAME
#define IMPLIED_DO_NAME
Definition: ri-util-local.h:75
#define GETOPT_LONG_FUNCTION_NAME
#define ABORT_FUNCTION_NAME
#define CREAL_OPERATOR_NAME
#define ENTITY_SYMLINK_SYSTEM_P(e)
#define GETHOSTNAME_FUNCTION_NAME
#define INVERSE_OPERATOR_NAME
#define ERFF_OPERATOR_NAME
#define LEFT_SHIFT_OPERATOR_NAME
#define ISXDIGIT_OPERATOR_NAME
#define CONDITIONAL_OPERATOR_NAME
#define BREAK_FUNCTION_NAME
#define LOCKF64_FUNCTION_NAME
#define CPOWF_OPERATOR_NAME
#define SCALBLNF_OPERATOR_NAME
#define STDOUT_LUN
#define TTYSLOT_FUNCTION_NAME
#define ALOG10_OPERATOR_NAME
#define FMODF_OPERATOR_NAME
#define PROFIL_FUNCTION_NAME
#define EXTENDED_TO_DECIMAL_OPERATOR_NAME
#define PIPE2_FUNCTION_NAME
#define MPI_ISEND_FUNCTION_NAME
#define LLT_OPERATOR_NAME
#define VSPRINTF_FUNCTION_NAME
#define SETBUFFER_FUNCTION_NAME
#define C_ASIN_OPERATOR_NAME
#define CLOCK_GETTIME_FUNCTION_NAME
#define EXECVE_FUNCTION_NAME
#define C_RETURN_FUNCTION_NAME
#define FSEEKO_FUNCTION_NAME
#define YN_OPERATOR_NAME
#define GETPASS_FUNCTION_NAME
#define BUFFEROUT_FUNCTION_NAME
#define CCOS_OPERATOR_NAME
#define UNLINKAT_FUNCTION_NAME
#define ROUND_OPERATOR_NAME
#define C_LOC_FUNCTION_NAME
F2003.
#define ISGRAPH_OPERATOR_NAME
#define ENTITY_PUTS_P(e)
#define MPI_INIT_FUNCTION_NAME
PI calls.
#define LCONG48_FUNCTION_NAME
#define DPROD_OPERATOR_NAME
#define GETENV_FUNCTION_NAME
#define GETEGID_FUNCTION_NAME
#define SYMLINKAT_FUNCTION_NAME
#define CUSERID_FUNCTION_NAME
#define EXECLE_FUNCTION_NAME
#define SCALBNF_OPERATOR_NAME
#define LLRINTF_OPERATOR_NAME
#define TIMEGM_FUNCTION_NAME
#define SINHL_OPERATOR_NAME
#define AND_OPERATOR_NAME
FI: intrinsics are defined at a third place after bootstrap and effects! I guess the name should be d...
#define ISNORMAL_OPERATOR_NAME
#define MINUS_UPDATE_OPERATOR_NAME
#define MPI_RECV_FUNCTION_NAME
#define EXECV_FUNCTION_NAME
#define ANINT_CONVERSION_NAME
#define REMOVE_FUNCTION_NAME
#define ENDUSERSHELL_FUNCTION_NAME
#define CPROJF_OPERATOR_NAME
#define TRUNCL_OPERATOR_NAME
#define SIGNBIT_OPERATOR_NAME
#define C_NOT_OPERATOR_NAME
#define CATANHL_OPERATOR_NAME
#define CABSL_OPERATOR_NAME
#define INT_TO_CHAR_CONVERSION_NAME
#define ISWALPHA_OPERATOR_NAME
#define FOPEN64_FUNCTION_NAME
#define ASSERT_FAIL_FUNCTION_NAME
#define CLOCK_GETRES_FUNCTION_NAME
#define GCONVERT_OPERATOR_NAME
#define POW_OPERATOR_NAME
#define LGAMMA_OPERATOR_NAME
#define ENTITY_PSELECT_SYSTEM_P(e)
#define CONTINUE_FUNCTION_NAME
#define ACOSF_OPERATOR_NAME
#define FMAF_OPERATOR_NAME
#define ALLOCATE_FUNCTION_NAME
F95.
#define ISLESS_OPERATOR_NAME
#define FSTAT_FUNCTION_NAME
#define __FILSBUF_FUNCTION_NAME
#define STRTOD_FUNCTION_NAME
#define READLINKAT_FUNCTION_NAME
#define RINT_OPERATOR_NAME
#define LINK_FUNCTION_NAME
#define ISOC99_VSCANF_FUNCTION_NAME
#define POSIX_MEMALIGN_FUNCTION_NAME
#define SNPRINTF_FUNCTION_NAME
#define COPYSIGN_OPERATOR_NAME
#define CSINH_OPERATOR_NAME
#define NEXTAFTERL_OPERATOR_NAME
#define FCHDIR_FUNCTION_NAME
#define COSHF_OPERATOR_NAME
#define COSL_OPERATOR_NAME
#define MEMMOVE_EFFECTS_NAME
variable name for memmove unit
#define ADDRESS_OF_OPERATOR_NAME
#define CMPLX_GENERIC_CONVERSION_NAME
#define FABSF_OPERATOR_NAME
#define DOUBLE_TO_DECIMAL_OPERATOR_NAME
#define ENTITY_VA_END_P(e)
Defined elsewhere: #define ENTITY_ADDRESS_OF_P(e) entity_an_operator_p(e, ADDRESS_OF)
#define PIPS_MEMORY_BARRIER_OPERATOR_NAME
special pips intrinsics with global effects
#define ATOL_FUNCTION_NAME
#define C_ATAN2_OPERATOR_NAME
#define PRE_DECREMENT_OPERATOR_NAME
#define CHAR_TO_INT_CONVERSION_NAME
#define FCNTL_FUNCTION_NAME
include <fcntl.h>
#define GETWD_FUNCTION_NAME
#define SQRT_OPERATOR_NAME
#define MPI_COMM_RANK_FUNCTION_NAME
#define ATAN_OPERATOR_NAME
#define ATANHF_OPERATOR_NAME
#define TCGETPGRP_FUNCTION_NAME
#define ERFL_OPERATOR_NAME
#define ISIGN_OPERATOR_NAME
#define C_CEXP_OPERATOR_NAME
#define STRTOULL_FUNCTION_NAME
#define TGAMMA_OPERATOR_NAME
#define STDERR_LUN
Standard unit numbers depend on the operating system.
#define UNGETC_FUNCTION_NAME
#define STRPBRK_FUNCTION_NAME
#define SRAND48_FUNCTION_NAME
#define GETCWD_FUNCTION_NAME
#define QUADRUPLE_TO_DECIMAL_OPERATOR_NAME
#define INT_GENERIC_CONVERSION_NAME
generic conversion names.
#define C_ATAN_OPERATOR_NAME
#define LSEEK_FUNCTION_NAME
o functions: C library and system IO.
#define MPI_COMM_SIZE_FUNCTION_NAME
#define TRUNCATE64_FUNCTION_NAME
#define EXP2F_OPERATOR_NAME
#define SELECT_FUNCTION_NAME
#define MALLOC_EFFECTS_PACKAGE_NAME
package name for malloc routines (could be libc package)
#define C_CLOSE_FUNCTION_NAME
#define GAMMA_OPERATOR_NAME
#define LGE_OPERATOR_NAME
#define IMPLIED_DCOMPLEX_NAME
Definition: ri-util-local.h:89
#define SWSCANF_FUNCTION_NAME
#define SLEEP_FUNCTION_NAME
#define GETPGID_FUNCTION_NAME
#define TRUNCATE_FUNCTION_NAME
#define NANOSLEEP_FUNCTION_NAME
#define DIVIDE_OPERATOR_NAME
#define MEMCHR_FUNCTION_NAME
#define DRAND48_FUNCTION_NAME
#define BIT_SIZE_OPERATOR_NAME
#define TGAMMAF_OPERATOR_NAME
#define WRITE_FUNCTION_NAME
#define SETLINEBUF_FUNCTION_NAME
#define NAN_OPERATOR_NAME
#define DABS_OPERATOR_NAME
#define PWRITE_FUNCTION_NAME
#define REMAINDERL_OPERATOR_NAME
#define SINL_OPERATOR_NAME
#define FECLEAREXCEPT_FUNCTION_NAME
include <fenv.h>
#define DIFFTIME_FUNCTION_NAME
#define CBRTL_OPERATOR_NAME
#define JN_OPERATOR_NAME
#define CLOSE_FUNCTION_NAME
#define FABS_OPERATOR_NAME
#define SETRESGID_FUNCTION_NAME
#define STRCOLL_FUNCTION_NAME
#define UNARY_MINUS_OPERATOR_NAME
#define MPI_BSEND_FUNCTION_NAME
#define SEND_FUNCTION_NAME
SPIRE API.
#define AMIN1_OPERATOR_NAME
#define LROUNDF_OPERATOR_NAME
#define _IO_PUTC_FUNCTION_NAME
#define MPI_IRECV_FUNCTION_NAME
#define DCOS_OPERATOR_NAME
#define RINTF_OPERATOR_NAME
#define BITWISE_XOR_UPDATE_OPERATOR_NAME
#define FERAISEEXCEPT_FUNCTION_NAME
#define CASINHL_OPERATOR_NAME
#define C_OPEN_FUNCTION_NAME
Not found in unistd.h.
#define MPI_SSEND_FUNCTION_NAME
#define LRINTL_OPERATOR_NAME
#define ISNANL_OPERATOR_NAME
#define QFCONVERT_OPERATOR_NAME
#define STRCAT_FUNCTION_NAME
#define FCHOWN_FUNCTION_NAME
#define ISGREATEREQUAL_OPERATOR_NAME
#define CATANHF_OPERATOR_NAME
#define MKTIME_FUNCTION_NAME
#define TEMPNAM_FUNCTION_NAME
#define CARG_OPERATOR_NAME
#define LLTOSTR_FUNCTION_NAME
#define CONCATENATION_FUNCTION_NAME
#define EXP_OPERATOR_NAME
#define ERAND48_FUNCTION_NAME
#define FMA_OPERATOR_NAME
#define SETHOSTNAME_FUNCTION_NAME
#define EOLE_PROD_OPERATOR_NAME
#define VSCANF_FUNCTION_NAME
#define HYPOTF_OPERATOR_NAME
#define ENTITY_UNLINK_SYSTEM_P(e)
#define IBCLR_OPERATOR_NAME
#define GETPID_FUNCTION_NAME
#define CTANH_OPERATOR_NAME
#define PCLOSE_FUNCTION_NAME
#define SRANDOM_FUNCTION_NAME
#define PIPS_C_MIN_OPERATOR_NAME
PIPS run-time support for C code generation.
#define LDIV_FUNCTION_NAME
#define FSEEKO64_FUNCTION_NAME
#define ATAN2L_OPERATOR_NAME
#define C_LOG_OPERATOR_NAME
#define LOGBF_OPERATOR_NAME
#define IMA_OPERATOR_NAME
Integer Multiply Add and Sub, FC 27/10/2005 for FI.
#define TIMER_DELETE_FUNCTION_NAME
#define ERF_OPERATOR_NAME
#define UNARY_PLUS_OPERATOR_NAME
#define ASINHF_OPERATOR_NAME
#define PIPE_FUNCTION_NAME
#define BRACE_INTRINSIC
Definition: ri-util-local.h:85
#define NANF_OPERATOR_NAME
#define TIMER_CREATE_FUNCTION_NAME
#define LOG_OPERATOR_NAME
#define FDIM_OPERATOR_NAME
#define RIGHT_SHIFT_UPDATE_OPERATOR_NAME
#define POPEN_FUNCTION_NAME
#define ATEXIT_FUNCTION_NAME
#define LOGL_OPERATOR_NAME
#define SECOND_FUNCTION_NAME
#define DSIN_OPERATOR_NAME
#define NEXTAFTER_OPERATOR_NAME
#define RINTL_OPERATOR_NAME
#define FGETS_FUNCTION_NAME
#define ISSPACE_OPERATOR_NAME
#define FEOF_FUNCTION_NAME
#define ENTITY_GETS_P(e)
#define ISLESSGREATER_OPERATOR_NAME
#define FESETROUND_FUNCTION_NAME
#define VERRX_FUNCTION_NAME
#define C_ATANH_OPERATOR_NAME
#define CSQRT_OPERATOR_NAME
#define GETDATE_FUNCTION_NAME
#define ISASCII_OPERATOR_NAME
#define IOR_OPERATOR_NAME
#define C_SINH_OPERATOR_NAME
#define CSQRTL_OPERATOR_NAME
#define SETDOMAINNAME_FUNCTION_NAME
#define ASINF_OPERATOR_NAME
#define C_LESS_THAN_OPERATOR_NAME
#define ACOSHF_OPERATOR_NAME
#define BITWISE_NOT_OPERATOR_NAME
#define __GETPGID_FUNCTION_NAME
#define __H_ERRNO_LOCATION_OPERATOR_NAME
netdb.h
#define CATANL_OPERATOR_NAME
#define CACOSHF_OPERATOR_NAME
#define FLOORL_OPERATOR_NAME
#define GREATER_OR_EQUAL_OPERATOR_NAME
#define SETPGRP_FUNCTION_NAME
#define TAN_OPERATOR_NAME
#define FILE_TO_DECIMAL_OPERATOR_NAME
#define PUTW_FUNCTION_NAME
#define VWARNX_FUNCTION_NAME
#define GMTIME_R_FUNCTION_NAME
#define ERFCF_OPERATOR_NAME
#define FILENO_FUNCTION_NAME
#define STOP_FUNCTION_NAME
#define ASCTIME_FUNCTION_NAME
#define DECIMAL_TO_EXTENDED_OPERATOR_NAME
#define PRE_INCREMENT_OPERATOR_NAME
Definition: ri-util-local.h:99
#define VWARN_FUNCTION_NAME
#define STRING_TO_DECIMAL_OPERATOR_NAME
#define ENTITY_LINK_SYSTEM_P(e)
#define FTELL_FUNCTION_NAME
#define CACOSL_OPERATOR_NAME
#define CIMAG_OPERATOR_NAME
#define EOLE_SUM_OPERATOR_NAME
#define FPUTC_FUNCTION_NAME
#define ENTITY_VA_COPY_P(e)
#define CEXPL_OPERATOR_NAME
#define EXECL_FUNCTION_NAME
#define SETBUF_FUNCTION_NAME
#define C_CSIN_OPERATOR_NAME
#define POST_INCREMENT_OPERATOR_NAME
Definition: ri-util-local.h:97
#define TMPNAM_FUNCTION_NAME
#define DSINH_OPERATOR_NAME
#define SIGFPE_OPERATOR_NAME
#define IAND_OPERATOR_NAME
#define ISWCNTRL_OPERATOR_NAME
#define AIMAG_CONVERSION_NAME
#define EXIT_FUNCTION_NAME
#define PLUS_UPDATE_OPERATOR_NAME
#define SETEGID_FUNCTION_NAME
#define CONJ_OPERATOR_NAME
#define ENTITY_SELECT_SYSTEM_P(e)
#define ENTITY_ISOC99_VSCANF_P(e)
#define SIGNIFICAND_OPERATOR_NAME
#define J0_OPERATOR_NAME
#define LSTAT_FUNCTION_NAME
#define MPI_ISSEND_FUNCTION_NAME
#define INDEX_OPERATOR_NAME
#define ISLESSEQUAL_OPERATOR_NAME
#define ISWGRAPH_OPERATOR_NAME
#define ISNANF_OPERATOR_NAME
#define BTEST_OPERATOR_NAME
#define ENTITY_ADDRESS_OF_P(e)
#define WCTYPE_OPERATOR_NAME
#define TRUNCF_OPERATOR_NAME
#define MBLEN_FUNCTION_NAME
#define ISWDIGIT_OPERATOR_NAME
#define CHROOT_FUNCTION_NAME
#define STIME_FUNCTION_NAME
#define GETLOGIN_R_FUNCTION_NAME
#define PAUSE_FUNCTION_NAME
#define ENTITY_BUFFEROUT_P(e)
#define STRTOF_FUNCTION_NAME
#define FLOOR_OPERATOR_NAME
#define SINHF_OPERATOR_NAME
#define STRTOLL_FUNCTION_NAME
#define COSF_OPERATOR_NAME
#define LOG10F_OPERATOR_NAME
#define GETRESGID_FUNCTION_NAME
#define VSNPRINTF_FUNCTION_NAME
#define FORMAT_FUNCTION_NAME
#define LLDIV_FUNCTION_NAME
#define DATAN2_OPERATOR_NAME
#define DDIM_OPERATOR_NAME
#define TANHF_OPERATOR_NAME
#define FGETPOS64_FUNCTION_NAME
#define SINH_OPERATOR_NAME
#define FPCLASSIFY_OPERATOR_NAME
include <math.h>
#define GETUID_FUNCTION_NAME
#define PERROR_FUNCTION_NAME
#define REAL_GENERIC_CONVERSION_NAME
#define DEFAULT_FUNCTION_NAME
#define WCTOMB_FUNCTION_NAME
#define GETDOMAINNAME_FUNCTION_NAME
#define CACOSF_OPERATOR_NAME
#define TRUNC_OPERATOR_NAME
#define CTERMID_FUNCTION_NAME
#define SQRTF_OPERATOR_NAME
#define ISINF_OPERATOR_NAME
#define ENDDO_FUNCTION_NAME
#define STRNCMP_FUNCTION_NAME
#define ISUNORDERED_OPERATOR_NAME
#define TOUPPER_OPERATOR_NAME
#define MINUS_C_OPERATOR_NAME
#define MULTIPLY_OPERATOR_NAME
#define DEXP_OPERATOR_NAME
#define BITWISE_AND_UPDATE_OPERATOR_NAME
#define DLOG_OPERATOR_NAME
#define LESS_OR_EQUAL_OPERATOR_NAME
#define CBRTF_OPERATOR_NAME
#define GETHOSTID_FUNCTION_NAME
#define C_OR_OPERATOR_NAME
#define STRERROR_FUNCTION_NAME
#define CONJL_OPERATOR_NAME
#define BITWISE_AND_OPERATOR_NAME
#define CSIN_OPERATOR_NAME
#define SNGL_GENERIC_CONVERSION_NAME
#define FMOD_OPERATOR_NAME
#define TIMER_GETTIME_FUNCTION_NAME
#define GETGID_FUNCTION_NAME
#define IMAXABS_FUNCTION_NAME
include <inttypes.h>
#define SCALBNL_OPERATOR_NAME
#define DTANH_OPERATOR_NAME
#define EXP2_OPERATOR_NAME
#define TIME_EFFECTS_VARIABLE_NAME
variable holding time effects
#define DFLOAT_GENERIC_CONVERSION_NAME
#define SQRTL_OPERATOR_NAME
#define FERROR_FUNCTION_NAME
#define TANHL_OPERATOR_NAME
#define PATHCONF_FUNCTION_NAME
#define SYMLINK_FUNCTION_NAME
#define ULLTOSTR_FUNCTION_NAME
#define RIGHT_SHIFT_OPERATOR_NAME
#define CATANF_OPERATOR_NAME
#define CATANH_OPERATOR_NAME
#define ISCNTRL_OPERATOR_NAME
#define ASIN_OPERATOR_NAME
#define AMAX1_OPERATOR_NAME
#define CTANL_OPERATOR_NAME
#define CABSF_OPERATOR_NAME
#define CASINHF_OPERATOR_NAME
#define CONJF_OPERATOR_NAME
#define DEALLOCATE_FUNCTION_NAME
#define CLOCK_SETTIME_FUNCTION_NAME
#define SECONVERT_OPERATOR_NAME
#define DASIN_OPERATOR_NAME
#define TANF_OPERATOR_NAME
#define INQUIRE_FUNCTION_NAME
#define NEXTTOWARD_OPERATOR_NAME
#define PUTS_FUNCTION_NAME
#define IDINT_GENERIC_CONVERSION_NAME
#define MEMMOVE_FUNCTION_NAME
#define NOT_OPERATOR_NAME
#define ENTITY_QSORT_SYSTEM_P(e)
#define POWL_OPERATOR_NAME
#define MPI_FINALIZE_FUNCTION_NAME
#define IMPLIED_COMPLEX_NAME
Definition: ri-util-local.h:88
#define FSCANF_FUNCTION_NAME
#define FCONVERT_OPERATOR_NAME
#define SETUSERSHELL_FUNCTION_NAME
#define LGT_OPERATOR_NAME
#define MIN1_OPERATOR_NAME
#define ISWCTYPE_OPERATOR_NAME
#define CASIN_OPERATOR_NAME
#define LOG1PF_OPERATOR_NAME
#define ASSIGN_SUBSTRING_FUNCTION_NAME
#define OR_OPERATOR_NAME
#define C_PAUSE_FUNCTION_NAME
#define LOG1PL_OPERATOR_NAME
#define FSETPOS64_FUNCTION_NAME
#define CIMAGL_OPERATOR_NAME
#define NON_EQUAL_OPERATOR_NAME
#define DATAN_OPERATOR_NAME
#define DTAN_OPERATOR_NAME
#define C_EQUAL_OPERATOR_NAME
#define ISWSPACE_OPERATOR_NAME
#define PRINTF_FUNCTION_NAME
include<stdio.h>
#define ECVT_FUNCTION_NAME
#define CIMAGF_OPERATOR_NAME
#define RMDIR_FUNCTION_NAME
#define ASSIGN_OPERATOR_NAME
Definition: ri-util-local.h:95
#define ISPRINT_OPERATOR_NAME
#define TZSET_FUNCTION_NAME
#define MODULO_OPERATOR_NAME
#define SCALBN_OPERATOR_NAME
#define TIMER_GETOVERRUN_FUNCTION_NAME
#define SETPGID_FUNCTION_NAME
#define PIPS_C_DIV_OPERATOR_NAME
#define FPUTS_FUNCTION_NAME
#define STRFTIME_FUNCTION_NAME
#define PLUS_C_OPERATOR_NAME
#define MPI_BARRIER_FUNCTION_NAME
#define FCLOSE_FUNCTION_NAME
#define ALOG_OPERATOR_NAME
#define FMAXL_OPERATOR_NAME
#define FREXP_OPERATOR_NAME
#define FSETPOS_FUNCTION_NAME
#define MIN_OPERATOR_NAME
#define MPI_SENDRECV_FUNCTION_NAME
#define CTYPE_B_LOC_OPERATOR_NAME
Part of the binary standard.
#define ISALPHA_OPERATOR_NAME
#define LOG2_OPERATOR_NAME
#define MBSTOWCS_FUNCTION_NAME
#define CASINF_OPERATOR_NAME
const char * entity_user_name(entity e)
Since entity_local_name may contain PIPS special characters such as prefixes (label,...
Definition: entity.c:487
entity FindEntity(const char *package, const char *name)
Retrieve an entity from its package/module name and its local name.
Definition: entity.c:1503
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
char * AddPackageToName(string p, string n)
This function concatenate a package name and a local name to produce a global entity name.
Definition: entity.c:2134
entity get_stderr_entity()
Definition: entity.c:1220
entity entity_intrinsic(const char *name)
FI: I do not understand this function name (see next one!).
Definition: entity.c:1292
entity get_stdin_entity()
Definition: entity.c:1197
entity get_stdout_entity()
Definition: entity.c:1209
bool expression_address_of_p(expression e)
Definition: expression.c:420
bool expression_integer_constant_p(expression e)
Definition: expression.c:2417
bool expression_list_directed_p(e)
Definition: expression.c:844
list make_unbounded_subscripts(int d)
FI: this piece of code must have been duplicated somewhere else in an effect library.
Definition: expression.c:4346
bool zero_expression_p(expression e)
Definition: expression.c:1217
bool expression_call_p(expression e)
Definition: expression.c:415
expression make_unbounded_expression()
Definition: expression.c:4339
bool reference_with_unbounded_subscript_p(reference r)
See if the reference uses the unbounded function '*'.
Definition: expression.c:3085
expression make_call_expression(entity e, list l)
Build an expression that call an function entity with an argument list.
Definition: expression.c:321
expression entity_to_expression(entity e)
if v is a constant, returns a constant call.
Definition: expression.c:165
bool expression_null_p(expression exp)
returns true if the expression is equal to zero or NULL (even if there is a cast before such as in (v...
Definition: expression.c:2611
expression MakeBinaryCall(entity f, expression eg, expression ed)
Creates a call expression to a function with 2 arguments.
Definition: expression.c:354
call expression_call(expression e)
Definition: expression.c:445
expression int_to_expression(_int i)
transform an int into an expression and generate the corresponding entity if necessary; it is not cle...
Definition: expression.c:1188
bool expression_reference_p(expression e)
Test if an expression is a reference.
Definition: expression.c:528
bool unbounded_expression_p(expression e)
Definition: expression.c:4329
reference expression_reference(expression e)
Short cut, meaningful only if expression_reference_p(e) holds.
Definition: expression.c:1832
bool expression_implied_do_p(e)
Definition: expression.c:817
type ultimate_type(type)
Definition: type.c:3466
bool array_type_p(type)
Definition: type.c:2942
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
type type_to_pointed_type(type)
returns t if t is not a pointer type, and the pointed type if t is a pointer type.
Definition: type.c:5265
type entity_basic_concrete_type(entity)
retrieves or computes and then returns the basic concrete type of an entity
Definition: type.c:3677
bool pointer_type_p(type)
Check for scalar pointers.
Definition: type.c:2993
unsigned int array_type_dimension(type)
Definition: type.c:2947
type make_scalar_integer_type(_int)
Definition: type.c:712
list struct_type_to_fields(type)
Definition: type.c:5798
bool struct_type_p(type)
Returns true if t is of type derived and if the derived type is a struct.
Definition: type.c:3121
type array_type_to_element_type(type)
returns the type of the elements of an array type, as a newly allocated type.
Definition: type.c:5700
bool char_type_p(type)
return true whether ‘t’ is a char or an unsigned char
Definition: type.c:2877
#define basic_pointer(x)
Definition: ri.h:637
#define normalized_undefined
Definition: ri.h:1745
#define syntax_reference_p(x)
Definition: ri.h:2728
#define transformer_undefined
Definition: ri.h:2847
#define transformer_undefined_p(x)
Definition: ri.h:2848
#define syntax_reference(x)
Definition: ri.h:2730
#define reference_undefined
Definition: ri.h:2302
#define call_function(x)
Definition: ri.h:709
#define EXPRESSION_(x)
Definition: ri.h:1220
#define reference_variable(x)
Definition: ri.h:2326
#define reference_undefined_p(x)
Definition: ri.h:2303
#define ENTITY(x)
ENTITY.
Definition: ri.h:2755
#define syntax_call_p(x)
Definition: ri.h:2734
#define type_variable(x)
Definition: ri.h:2949
#define basic_pointer_p(x)
Definition: ri.h:635
#define syntax_range(x)
Definition: ri.h:2733
#define EXPRESSION(x)
EXPRESSION.
Definition: ri.h:1217
@ is_storage_ram
Definition: ri.h:2492
#define entity_undefined_p(x)
Definition: ri.h:2762
#define entity_undefined
Definition: ri.h:2761
#define expression_undefined
Definition: ri.h:1223
#define entity_name(x)
Definition: ri.h:2790
#define transformer_relation(x)
Definition: ri.h:2873
#define expression_normalized(x)
Definition: ri.h:1249
#define transformer_arguments(x)
Definition: ri.h:2871
#define variable_undefined
Definition: ri.h:3095
#define reference_indices(x)
Definition: ri.h:2328
#define variable_undefined_p(x)
Definition: ri.h:3096
#define syntax_call(x)
Definition: ri.h:2736
#define expression_undefined_p(x)
Definition: ri.h:1224
#define variable_dimensions(x)
Definition: ri.h:3122
#define predicate_system_(x)
Definition: ri.h:2068
#define syntax_undefined
Definition: ri.h:2676
#define call_arguments(x)
Definition: ri.h:711
#define syntax_range_p(x)
Definition: ri.h:2731
#define entity_type(x)
Definition: ri.h:2792
#define expression_syntax(x)
Definition: ri.h:1247
#define type_variable_p(x)
Definition: ri.h:2947
#define predicate_system(x)
Definition: ri.h:2069
#define variable_basic(x)
Definition: ri.h:3120
int fprintf()
test sc_min : ce test s'appelle par : programme fichier1.data fichier2.data ...
transformer add_index_range_conditions(transformer pre, entity i, range r, transformer tfb)
Definition: loop.c:711
return(s1)
#define ifdebug(n)
Definition: sg.c:47
static int lname(char *s, int look_for_entry)
check for keywords for subprograms return 0 if comment card, 1 if found name and put in arg string.
Definition: split_file.c:283
The following data structure describes an intrinsic function: its name and its arity and its type,...
Pbase base
Definition: sc-local.h:75
The structure used to build lists in NewGen.
Definition: newgen_list.h:41
Definition: delay.c:253
string precondition_to_string(transformer pre)
Definition: prettyprint.c:58
entity entity_to_new_value(entity)
Definition: value.c:859
#define exp
Avoid some warnings from "gcc -Wshadow".
Definition: vasnprintf.c:207
#define NO_OFL_CTRL
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