PIPS
pypips.c
Go to the documentation of this file.
1 /*
2 
3  $Id: pypips.c 23519 2019-07-01 11:26:08Z coelho $
4 
5  Copyright 1989-2016 MINES ParisTech
6  Copyright 2009-2010 TÉLÉCOM Bretagne
7  Copyright 2009-2010 HPC Project
8 
9  This file is part of PIPS.
10 
11  PIPS is free software: you can redistribute it and/or modify it
12  under the terms of the GNU General Public License as published by
13  the Free Software Foundation, either version 3 of the License, or
14  any later version.
15 
16  PIPS is distributed in the hope that it will be useful, but WITHOUT ANY
17  WARRANTY; without even the implied warranty of MERCHANTABILITY or
18  FITNESS FOR A PARTICULAR PURPOSE.
19 
20  See the GNU General Public License for more details.
21 
22  You should have received a copy of the GNU General Public License
23  along with PIPS. If not, see <http://www.gnu.org/licenses/>.
24 
25 */
26 #ifdef HAVE_CONFIG_H
27  #include "pips_config.h"
28 #endif
29 
30 // nope! ???
31 #ifdef NDEBUG
32 #undef NDEBUG
33 #endif // NDEBUG
34 
35 #include <unistd.h> // getcwd
36 #include <stdlib.h>
37 #include <stdio.h>
38 #include <assert.h>
39 #include <string.h>
40 #include <stdarg.h>
41 
42 /* hmmm... when all header files are not yet generated cproto may silently
43  * fail to generate these headers.
44  * this few declarations allow to generate headers without anything else.
45  */
46 #ifdef CPROTO_IS_PROTOTYPING
47 
48 typedef char * string;
49 typedef void * list;
50 typedef enum { false, true } bool;
51 
52 #define list_undefined 0
53 #define DEFINE_LOCAL_STACK(a, b) /* nope */
54 
55 #else // no CPROTO, real includes
56 
57 #include "linear.h"
58 #include "genC.h"
59 
60 #include "ri.h"
61 #include "database.h"
62 
63 #include "misc.h"
64 
65 #include "ri-util.h" /* ri needed for statement_mapping in pipsdbm... */
66 #include "pipsdbm.h"
67 #include "resources.h"
68 #include "phases.h"
69 #include "properties.h"
70 #include "pipsmake.h"
71 #include "text-util.h" // for words_to_string
72 
73 #include "top-level.h"
74 
75 // from "transformations/util.c":
77 
78 #endif // CPROTO_IS_PROTOTYPING
79 
80 /********************************************************************** LOGS */
81 
82 static FILE * logstream = NULL;
84 
85 static void pyps_log_handler(const char *fmt, va_list *args)
86 {
87  va_list args_copy;
88 
89  // avoid a repeat as pips_log_display called by pips_log_alist
90  // already sent it to stderr
91  if (logstream != stderr)
92  {
93  va_copy (args_copy, *args);
94  vfprintf(logstream, fmt, args_copy);
95  va_end(args_copy);
96  fflush(logstream);
97  }
98 
100  {
101  char* tmp;
102  va_copy (args_copy, *args);
103  vasprintf(&tmp, fmt, args_copy);
104  va_end(args_copy);
105  log_list = CONS(STRING,tmp,log_list);
106  }
107 }
108 
109 char * pyps_last_error = NULL;
110 
111 static void pyps_error_handler(
112  const char * calling_function_name,
113  const char * a_message_format,
114  va_list * args)
115 {
116  // Save pre-existing error message
117  char *old_error = pyps_last_error;
118 
119  char * tmp;
120  va_list acpy;
121  va_copy(acpy, *args);
122  vasprintf(&tmp, a_message_format, acpy);
123  va_end(acpy);
124 
125  asprintf(&pyps_last_error,"in %s: %s",calling_function_name,tmp);
126  free(tmp);
127 
128  // If we already had a message before, we stack it over the new one
129  if(old_error) {
130  char *tmp = pyps_last_error;
131  asprintf(&pyps_last_error,"%s%s",old_error,tmp);
132  free(old_error);
133  free(tmp);
134  }
135 }
136 
138 {
140  {
143  }
144 }
145 
146 void open_log_buffer(void)
147 {
150  log_list = NIL;
151 }
152 
153 char* get_log_buffer(void)
154 {
156  list log_list_tmp=gen_copy_seq(log_list);
157  log_list_tmp = gen_nreverse(log_list_tmp);
158  char* ret = words_to_string(log_list_tmp);
159  gen_free_list(log_list_tmp);
160  return ret;
161 }
162 
163 void verbose(bool on)
164 {
165  if(on) logstream = stderr;
166  else logstream = fopen("/dev/null","w");
167 }
168 
169 /************************************************************ PROPERTY STACK */
170 
171 /* stack of properties, so that the previous value can be reinstated
172  * when going out of a phase.
173  */
175 
176 void set_property(const char* propname, const char* value)
177 {
178  // thank's to rk, this hack is no longer needed
179 #if 0
180  /* nice hack to temporarly redirect stderr */
181  int saved_stderr = dup(STDERR_FILENO);
182  char *buf;
183  freopen("/dev/null","w",stderr);
184  asprintf(&buf, "/dev/fd/%d", saved_stderr);
185 #endif
186  if (!safe_set_property(propname, value)) {
187 #if 0
188  freopen(buf,"w",stderr);
189  free(buf);
190 #endif
191  pips_user_error("error in setting property %s to %s\n",
192  propname, value);
193  }
194 #if 0
195  else {
196  freopen(buf,"w",stderr);
197  free(buf);
198  }
199 #endif
200 }
201 
202 void push_property(const char* name, const char * value)
203 {
204  property p = copy_property(get_property(name,false));
205  set_property(strdup(name),value);
206  properties_push(p);
207 }
208 
209 void pop_property(const char* name)
210 {
211  property p = properties_pop();
212  if(property_bool_p(p))
214  else if(property_string_p(p))
216  else
218 }
219 
220 /******************************************************* PIPS INITIALIZATION */
221 
222 void atinit(void)
223 {
224  /* init various composants */
225  // FIXME
226  set_pips_meta_informations("<unknown>", "<unknown>", "<unknown>");
227 
233  make_properties_stack();
234 }
235 
236 /* create a new workspace...
237  * FC: what about opening an existing one?
238  */
239 void create(char* workspace_name, char ** filenames)
240 {
241  if (workspace_exists_p(workspace_name))
242  pips_user_error("Workspace %s already exists. Delete it!\n",
243  workspace_name);
244  else if (db_get_current_workspace_name()) {
245  pips_user_error("Close current workspace %s before "
246  "creating another one!\n",
248  }
249  else
250  {
251  if (db_create_workspace(workspace_name))
252  {
253  // create the array of arguments
254  gen_array_t filename_list = gen_array_make(0);
255  while(*filenames)
256  {
257  gen_array_append(filename_list,*filenames);
258  filenames++;
259  }
260 
261  bool success = create_workspace(filename_list);
262 
263  gen_array_free(filename_list);
264 
265  if (!success)
266  {
267  db_close_workspace(false);
268  pips_user_error("Could not create workspace %s\n", workspace_name);
269  }
270  }
271  else {
272  pips_user_error("Cannot create directory for workspace, "
273  "check rights!\n");
274  }
275  }
276 }
277 
278 char* info(char * about)
279 {
280  string sinfo = NULL;
281  if (same_string_p(about, "workspace"))
282  {
284  if (sinfo) sinfo = strdup(sinfo);
285  }
286  else if (same_string_p(about, "module"))
287  {
288  sinfo = db_get_current_module_name();
289  if(sinfo) sinfo=strdup(sinfo);
290  }
291  else if (same_string_p(about, "modules") && db_get_current_workspace_name())
292  {
293  gen_array_t modules = db_get_module_list();
294  int n = gen_array_nitems(modules), i;
295 
296  size_t sinfo_size=0;
297  for(i=0; i<n; i++)
298  {
299  string m = gen_array_item(modules, i);
300  sinfo_size+=strlen(m)+1;
301  }
302  sinfo = strdup(string_array_join(modules, " "));
303  if(!sinfo)
304  fprintf(stderr,"not enough memory to hold all module names\n");
305  gen_array_full_free(modules);
306  }
307  else if (same_string_p(about, "directory"))
308  {
309  char pathname[MAXPATHLEN];
310  sinfo = getcwd(pathname, MAXPATHLEN);
311  if(sinfo)
312  sinfo=strdup(sinfo);
313  else
314  fprintf(stderr,"failer to retreive current working directory\n");
315  }
316 
317  if (!sinfo)
318  sinfo = strdup("");
319  return sinfo;
320 }
321 
322 /* apply a transformation on a module
323  */
324 void apply(char * phasename, char * target)
325 {
326  if (!safe_apply(phasename,target)) {
327  if(!pyps_last_error)
328  asprintf(&pyps_last_error, "phase %s on module %s failed" ,
329  phasename, target);
331  }
332 }
333 
334 /* apply a transformation on a set of modules, concurrently
335  */
336 void capply(char * phasename, char ** targets)
337 {
338  // create the array of arguments
339  gen_array_t target_list = gen_array_make(0);
340  while (*targets)
341  {
342  gen_array_append(target_list,*targets);
343  targets++;
344  }
345  bool ok = safe_concurrent_apply(phasename, target_list);
346  gen_array_free(target_list);
347  if(!ok) {
348  if(!pyps_last_error)
350  "capply phase %s failed without setting error message",
351  phasename);
353  }
354 }
355 
356 /* display resource rname about module mname
357  */
358 void display(char *rname, char *mname)
359 {
360  string old_current_module_name = db_get_current_module_name();
361  if(old_current_module_name) {
362  old_current_module_name = strdup(old_current_module_name);
364  }
365 
367  string fname = build_view_file(rname);
369  if(old_current_module_name) {
370  db_set_current_module_name(old_current_module_name);
371  free(old_current_module_name);
372  }
373 
374  if (!fname)
375  {
376  pips_user_error("Cannot build view file %s\n", rname);
377  return;
378  }
379 
380  safe_display(fname);
381  free(fname);
382  return;
383 }
384 
385 /* return the rname[mname] resource,
386  * which must be a string containing a file name
387  */
388 char* show(char * rname, char *mname)
389 {
390  if (!db_resource_p(rname, mname)) {
391  pips_user_warning("no resource %s[%s].\n", rname, mname);
392  return strdup("");
393  }
394 
395  // ensure that it is a filename, hence a string
396  if (!displayable_file_p(rname)) {
397  pips_user_warning("resource %s cannot be displayed.\n", rname);
398  return strdup("");
399  }
400 
401  // now returns the name of the file.
402  return strdup(db_get_memory_resource(rname, mname, true));
403 }
404 
405 /* Returns the list of the modules that call that specific module,
406  * separated by ' '.
407  */
409 {
410  safe_make("CALLERS", module_name);
412  char * callers_string = strdup(string_array_join(callers, " "));
413  gen_array_free(callers);
414  return callers_string;
415 }
416 
417 /* Returns the list of the modules called by that specific module,
418  * separated by ' '.
419  */
421 {
422  safe_make("CALLERS",module_name);
424 
425  char * callees_string = strdup(string_array_join(callees, " "));
426 
428 
429  return callees_string;
430 }
431 
432 /* Returns the list of the modules called by that specific module,
433  * separated by ' '.
434  */
435 char * pyps_get_stubs(void)
436 {
437  gen_array_t stubs = get_stubs();
438  char * stubs_string = strdup(string_array_join(stubs, " "));
439  gen_array_free(stubs);
440  return stubs_string;
441 }
442 
443 /* add an environment variable of a given value
444  */
445 void setenviron(char *name, char *value)
446 {
447  setenv(name, value, 1);
448 }
449 
450 /* get environment variable
451  */
452 char* getenviron(char *name)
453 {
454  return getenv(name);
455 }
456 
457 
458 /* Add a source file to the workspace
459  * We wrap process_user_file() here with a hack
460  * to define the workspace language so that some
461  * pipsmake activate specific to the language
462  * will be defined.
463  * This function will be removed when pipsmake
464  * will be improved to handle multilanguage workspace !
465  */
466 bool add_a_file( string file )
467 {
468  gen_array_t filename_list = gen_array_make(0);
469  gen_array_append(filename_list,file);
471  language l = workspace_language(filename_list);
473  free_language(l);
474  gen_array_free(filename_list);
475  bool process_user_file(string file);
476  if(process_user_file(file)==false) {
477  pips_user_error("Error adding new file.");
478  return false;
479  }
480  return true;
481 }
482 
483 
484 /*
485  * Retrieve the language (string form) for a module
486  */
487 char *get_module_language( string mod_name )
488 {
490 
491  switch(language_tag(l)) {
492  case is_language_fortran: return "fortran";
493  case is_language_fortran95: return "fortran95";
494  case is_language_c: return "c";
495  default: return "unknown";
496  }
497 }
498 
499 
500 // Broker registering python callback to C
501 
502 #include <Python.h>
503 
504 
505 // Store the python object that will provide stub for missing module on the fly
506 static PyObject *stub_broker = NULL;
507 
508 /*
509  * This is the callback interface for PIPS missing module to python
510  * It'll be called by pips to retrieve a file name when a module wasn't found
511  * by PIPS.
512  * The string is allocated and should be freed by the caller.
513  */
514 static string get_stub_from_broker(string str)
515 {
516  string result = NULL;
517 
518  // Assert that a broker is defined !
519  if (stub_broker) {
520 
521  // Get the stub file (implemented in a python method...)
522  PyObject *pyStubFile =
523  PyEval_CallMethod(stub_broker, "stub_file_for_module", "(s)", str);
524 
525  // Sanity check
526  if(pyStubFile) {
527  // Convert to a regular C string
528 #if PY_MAJOR_VERSION >= 3
529  result = strdup(PyUnicode_AsUTF8(pyStubFile));
530 #else // PYTHON 2
531  result = strdup(PyString_AsString(pyStubFile));
532 #endif
533  Py_XDECREF(pyStubFile);
534  } else {
535  // NULL is returned, error managed by the caller
536  fprintf(stderr,"Callback failed !\n");
537  PyErr_Print();
538  }
539  }
540  // else NULL...
541 
542  return result;
543 }
544 
545 
546 /*
547  * Register the workspace (or any other object) as a resolver for missing
548  * modules. Method "stub_file_for_module" will be called and have to be defined
549  */
551 {
552  Py_XDECREF(stub_broker); /* Dispose of previous callback */
553  stub_broker = PyObj; /* Remember new callback */
554  Py_XINCREF(stub_broker); /* Record of new callback */
555 
556  void set_internal_missing_module_resolver_handler(string (*)(string));
558 }
559 
560 /* Read execution mode for a loop */
562  const char* module_name,
563  const char* loop_label)
564 {
565  // prelude
568  ((statement) db_get_memory_resource(DBR_CODE, module_name, true) );
569 
571  if(entity_undefined_p(label))
572  pips_user_error("label '%s' does not exist\n",loop_label);
575  pips_user_error("label '%s' is not on a loop\n",loop_label);
576  bool is_exec_parallel_p =
578 
579  // reset current state
582  return is_exec_parallel_p;
583 }
584 
585 /* Change execution mode for a loop */
587  const char* module_name,
588  const char* loop_label,
589  bool exec_parallel_p)
590 {
591  // prelude
594  ((statement) db_get_memory_resource(DBR_CODE, module_name, true) );
595 
597  if(entity_undefined_p(label))
598  pips_user_error("label '%s' does not exist\n",loop_label);
601  pips_user_error("label '%s' is not on a loop\n",loop_label);
603  = (exec_parallel_p ? is_execution_parallel : is_execution_sequential);
604 
605  // Store the new code
607 
608  // reset current state
611 }
void(* pips_log_handler)(const char *fmt, va_list *args)
USER_LOG is a function that should be called to log the current PIPS request, as soon as it is releva...
Definition: message.c:216
void(* pips_error_handler)(const char *, const char *, va_list *)
PROMPT_USER schould be implemented.
Definition: message.c:455
void set_pips_meta_informations(const char *revs, const char *date, const char *comp)
Definition: message.c:102
property copy_property(property p)
PROPERTY.
Definition: property.c:16
void free_language(language p)
Definition: ri.c:1205
void db_reset_current_module_name(void)
Definition: database.c:1064
bool db_resource_p(const char *rname, const char *oname)
true if exists and in loaded or stored state.
Definition: database.c:524
string db_get_current_module_name(void)
Also used to check whether set...
Definition: database.c:1059
bool db_set_current_module_name(const char *name)
Definition: database.c:1045
void activate_language(language l)
Choose the right combination of activate and setproperty for a given language.
Definition: activate.c:254
@ user_exception_error
#define THROW(what)
void set_exception_callbacks(exception_callback_t, exception_callback_t)
size_t gen_array_nitems(const gen_array_t a)
Definition: array.c:131
void gen_array_full_free(gen_array_t a)
Definition: array.c:77
gen_array_t gen_array_make(size_t size)
declarations...
Definition: array.c:40
string string_array_join(gen_array_t array, string separator)
Join a string array with a string separator.
Definition: array.c:198
void * gen_array_item(const gen_array_t a, size_t i)
Definition: array.c:143
void gen_array_append(gen_array_t a, void *what)
Definition: array.c:105
void gen_array_free(gen_array_t a)
Definition: array.c:70
bool create_workspace(gen_array_t files)
FI: should be called "initialize_workspace()"; a previous call to db_create_workspace() is useful to ...
Definition: dbm.c:180
gen_array_t get_stubs()
Get all stubs.
Definition: dbm.c:433
#define ret(why, what)
true if not a remapping for old.
Definition: dynamic.c:986
const char * module_name(const char *s)
Return the module part of an entity name.
Definition: entity_names.c:296
void push_pips_context(char const *file, char const *function, int line)
exception.c
Definition: exception.c:43
void pop_pips_context(char const *file, char const *function, int line)
Definition: exception.c:50
int safe_display(char *fname)
Display a file through $PIPS_MORE (or $PAGER) if stdout is a TTY, on stdout otherwise.
Definition: file.c:722
#define STRING(x)
Definition: genC.h:87
void free(void *)
bool success
Definition: gpips-local.h:59
void reset_current_module_entity(void)
Reset the current module entity.
Definition: static.c:97
void reset_current_module_statement(void)
Reset the current module statement.
Definition: static.c:221
statement set_current_module_statement(statement)
Set the current module statement.
Definition: static.c:165
statement get_current_module_statement(void)
Get the current module statement.
Definition: static.c:208
entity set_current_module_entity(entity)
static.c
Definition: static.c:66
#define list_undefined_p(c)
Return if a list is undefined.
Definition: newgen_list.h:75
list gen_nreverse(list cp)
reverse a list in place
Definition: list.c:304
#define NIL
The empty list (nil in Lisp)
Definition: newgen_list.h:47
list gen_copy_seq(list l)
Copy a list structure.
Definition: list.c:501
void gen_free_string_list(list ls)
Definition: list.c:564
#define CONS(_t_, _i_, _l_)
List element cell constructor (insert an element at the beginning of a list)
Definition: newgen_list.h:150
void gen_free_list(list l)
free the spine of the list
Definition: list.c:327
#define list_undefined
Undefined list definition :-)
Definition: newgen_list.h:69
string db_get_memory_resource(const char *rname, const char *oname, bool pure)
Return the pointer to the resource, whatever it is.
Definition: database.c:755
gen_array_t db_get_module_list(void)
Get an array of all the modules (functions, procedures and compilation units) of a workspace.
Definition: database.c:1266
#define DB_PUT_MEMORY_RESOURCE(res_name, own_name, res_val)
conform to old interface.
Definition: pipsdbm-local.h:66
loop statement_loop(statement)
Get the loop of a statement.
Definition: statement.c:1374
void set_internal_missing_module_resolver_handler(string(*_internal_resolver)(const char *))
Definition: initializer.c:612
#define STDERR_FILENO
Definition: unistd.in.h:214
bool displayable_file_p(const char *name)
rather approximated.
Definition: lowlevel.c:361
#define pips_user_warning
Definition: misc-local.h:146
#define asprintf
Definition: misc-local.h:225
#define MAXPATHLEN
MAXPATHLEN is defined in <sys/param.h> for SunOS...
Definition: misc-local.h:203
#define pips_user_error
Definition: misc-local.h:147
void initialize_newgen()
cproto-generated files
Definition: newgen.c:48
#define assert(ex)
Definition: newgen_assert.h:41
#define same_string_p(s1, s2)
int bool
we cannot use an enum or stdbool because we need to be compatible with newgen, thus boolean need to h...
Definition: newgen_types.h:78
char * string
STRING.
Definition: newgen_types.h:39
struct cons * list
Definition: newgen_types.h:106
bool workspace_exists_p(const char *)
Definition: workspace.c:266
bool db_close_workspace(bool)
Definition: workspace.c:367
bool db_create_workspace(const char *)
Definition: workspace.c:282
string db_get_current_workspace_name(void)
the function is used to check that there is some current workspace...
Definition: workspace.c:82
gen_array_t get_callers(string module)
Get all the callers of the specified module.
Definition: pipsmake.c:1799
gen_array_t get_callees(string module)
Get all the callers of the specified module.
Definition: pipsmake.c:1816
bool safe_make(const char *res_n, const char *module_n)
Definition: pipsmake.c:1717
bool safe_concurrent_apply(const char *phase_n, gen_array_t modules)
Definition: pipsmake.c:1729
bool safe_set_property(const char *propname, const char *value)
Definition: pipsmake.c:1781
bool safe_apply(const char *phase_n, const char *module_n)
Definition: pipsmake.c:1723
string build_view_file(const char *)
view.c
Definition: view.c:97
bool process_user_file(string)
Definition: source_file.c:1090
language workspace_language(gen_array_t)
Choose a language if all filenames in "files" have the same C or Fortran extensions.
Definition: source_file.c:667
void set_bool_property(const char *, bool)
property get_property(const char *, bool)
void set_int_property(const char *, int)
void set_string_property(const char *, const char *)
#define property_string(x)
Definition: property.h:71
#define property_bool(x)
Definition: property.h:68
#define property_int(x)
Definition: property.h:65
#define property_string_p(x)
Definition: property.h:69
#define property_bool_p(x)
Definition: property.h:66
void close_log_buffer(void)
Definition: pypips.c:137
void create(char *workspace_name, char **filenames)
create a new workspace...
Definition: pypips.c:239
static list log_list
Definition: pypips.c:83
static FILE * logstream
Definition: pypips.c:82
char * pyps_get_stubs(void)
Returns the list of the modules called by that specific module, separated by ' '.
Definition: pypips.c:435
void push_property(const char *name, const char *value)
Definition: pypips.c:202
char * info(char *about)
Definition: pypips.c:278
void display(char *rname, char *mname)
display resource rname about module mname
Definition: pypips.c:358
void capply(char *phasename, char **targets)
apply a transformation on a set of modules, concurrently
Definition: pypips.c:336
char * getenviron(char *name)
get environment variable
Definition: pypips.c:452
void set_property(const char *propname, const char *value)
Definition: pypips.c:176
DEFINE_LOCAL_STACK(properties, property)
stack of properties, so that the previous value can be reinstated when going out of a phase.
char * get_log_buffer(void)
Definition: pypips.c:153
statement find_loop_from_label(statement, entity)
hmmm...
Definition: util.c:218
char * pyps_last_error
Definition: pypips.c:109
void atinit(void)
Definition: pypips.c:222
void setenviron(char *name, char *value)
add an environment variable of a given value
Definition: pypips.c:445
void set_python_missing_module_resolver_handler(PyObject *PyObj)
Definition: pypips.c:550
static string get_stub_from_broker(string str)
Definition: pypips.c:514
void pop_property(const char *name)
Definition: pypips.c:209
char * get_module_language(string mod_name)
Definition: pypips.c:487
char * get_callees_of(char *module_name)
Returns the list of the modules called by that specific module, separated by ' '.
Definition: pypips.c:420
bool add_a_file(string file)
Add a source file to the workspace We wrap process_user_file() here with a hack to define the workspa...
Definition: pypips.c:466
static PyObject * stub_broker
Definition: pypips.c:506
void open_log_buffer(void)
Definition: pypips.c:146
void verbose(bool on)
Definition: pypips.c:163
bool get_loop_execution_parallel(const char *module_name, const char *loop_label)
Read execution mode for a loop.
Definition: pypips.c:561
char * get_callers_of(char *module_name)
Returns the list of the modules that call that specific module, separated by ' '.
Definition: pypips.c:408
void apply(char *phasename, char *target)
apply a transformation on a module
Definition: pypips.c:324
void set_loop_execution_parallel(const char *module_name, const char *loop_label, bool exec_parallel_p)
Change execution mode for a loop.
Definition: pypips.c:586
static void pyps_log_handler(const char *fmt, va_list *args)
Definition: pypips.c:85
char * show(char *rname, char *mname)
return the rname[mname] resource, which must be a string containing a file name
Definition: pypips.c:388
static void pyps_error_handler(const char *calling_function_name, const char *a_message_format, va_list *args)
Definition: pypips.c:111
#define module_language(e)
implemented as a macro to allow lhs
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
entity module_name_to_entity(const char *mn)
This is an alias for local_name_to_top_level_entity.
Definition: entity.c:1479
entity find_label_entity(const char *, const char *)
util.c
Definition: util.c:43
#define execution_tag(x)
Definition: ri.h:1207
#define loop_execution(x)
Definition: ri.h:1648
#define entity_undefined_p(x)
Definition: ri.h:2762
#define loop_label(x)
Definition: ri.h:1646
@ is_execution_parallel
Definition: ri.h:1190
@ is_execution_sequential
Definition: ri.h:1189
#define statement_undefined_p(x)
Definition: ri.h:2420
#define execution_parallel_p(x)
Definition: ri.h:1211
#define language_tag(x)
Definition: ri.h:1590
@ is_language_fortran
Definition: ri.h:1566
@ is_language_fortran95
Definition: ri.h:1568
@ is_language_c
Definition: ri.h:1567
void initialize_sc(char *(*var_to_string)(Variable))
Definition: sc_debug.c:253
int fprintf()
test sc_min : ce test s'appelle par : programme fichier1.data fichier2.data ...
char * strdup()
static bool ok
static char buf[BSZ]
Definition: split_file.c:157
The structure used to build lists in NewGen.
Definition: newgen_list.h:41
Definition: statement.c:54
string words_to_string(cons *lw)
Definition: print.c:211
int vasprintf(char **resultp, const char *format, va_list args)
Formatted output to strings.
Definition: vasprintf.c:33
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