25 #include "pips_config.h"
61 string filename, localfilename, dir;
111 strdup(print_graph_p ? DBR_GRAPH_PRINTED_FILE
113 : DBR_PRINTED_FILE));
136 : PREDICAT_FORTRAN_EXT,
137 print_graph_p ? GRAPH_FILE_EXT :
"",
143 print_graph_p ? GRAPH_FILE_EXT :
"",
149 print_graph_p ? GRAPH_FILE_EXT :
"",
174 debug_on(
"PRETTYPRINT_DEBUG_LEVEL");
203 const char* mod_name,
226 debug_on(
"PRETTYPRINT_DEBUG_LEVEL");
235 DBR_PARALLELPRINTED_FILE,
236 PARALLEL_FORTRAN_EXT,
241 DBR_PARALLELPRINTED_FILE,
247 DBR_PARALLELPRINTED_FILE,
248 PARALLEL_FORTRAN95_EXT,
304 #define all_priv "PRETTYPRINT_ALL_PRIVATE_VARIABLES"
321 #include "pips-libs.h"
323 #ifdef HAVE_PIPS_effects_util_LIBRARY
327 #ifdef HAVE_PIPS_effects_generic_LIBRARY
331 #ifdef HAVE_PIPS_effects_simple_LIBRARY
334 #define print_effects(e) \
335 pips_internal_error("print_effects function not available")
336 #define print_effect(e) \
337 pips_internal_error("print_effect function not available")
340 #ifdef HAVE_PIPS_effects_convex_LIBRARY
343 #define print_region(x) \
344 pips_internal_error("print_region function not available")
347 #ifdef HAVE_PIPS_semantics_LIBRARY
351 #ifdef HAVE_PIPS_transformer_LIBRARY
354 #define transformer_with_temporary_values_p(t) ((t) != NULL)
355 #define dump_transformer(t) \
356 pips_internal_error("dump_transformer function not available")
357 #define print_transformer(t) \
358 pips_internal_error("print_transformer function not available")
361 #ifdef HAVE_PIPS_points_to_LIBRARY
366 #ifndef points_to_domain
367 #define points_to_domain (-1)
369 #ifndef points_to_list_domain
370 #define points_to_list_domain (-1)
372 #ifndef points_to_graph_domain
373 #define points_to_graph_domain (-1)
375 #define print_points_to(x) \
376 pips_internal_error("print_points_to function not available")
377 #define print_points_to_cell(x) \
378 pips_internal_error("print_points_to_cell function not available")
379 #define print_points_to_cells(x) \
380 pips_internal_error("print_points_to_cells function not available")
381 #define print_points_to_list(x) \
382 pips_internal_error("print_points_to_list function not available")
383 #define print_points_to_graph(x) \
384 pips_internal_error("print_points_to_graph function not available")
385 #define print_points_to_relations(x) \
386 pips_internal_error("print_points_to_relations function not available")
394 debug_on(
"PRETTYPRINT_DEBUG_LEVEL");
396 (void)
fprintf(stderr,
"UNDEFINED NEWGEN OBJECT\n");
398 (void)
fprintf(stderr,
"EMPTY LIST\n");
402 (void)
fprintf(stderr,
"PROBABLY AN EMPTY LIST\n");
404 (
void)
fprintf(stderr,
"UNDEFINED NEWGEN OBJECT\n");
476 else if(0<=ot && ot<1000)
477 (void)
fprintf(stderr,
"Unprocessed Newgen Object with tag %d\n", ot);
478 else if(ot>1000 || ot<=0) {
482 (void)
fprintf(stderr,
"NOT A NEWGEN OBJECT. MAYBE A LIST\n");
535 (
void)
fprintf(stderr,
"If a list, a list of unknown objects: tag=%d\n", (
int) cot);
void begin_attachment_prettyprint(void)
The translation functions between unique names and objects:
void end_attachment_prettyprint(void)
Clean the things related with the attachment of properties:
void write_an_attachment_file(string file_name)
Add the attachment in Emacs mode by creating a twin file that is decorated with Emacs properties:
struct _newgen_struct_qualifier_ * qualifier
struct _newgen_struct_statement_ * statement
#define cell_domain
newgen_cell_interpretation_domain_defined
#define effects_domain
newgen_effects_classes_domain_defined
#define effect_descriptor(x)
#define effects_effects(x)
#define descriptor_none_p(x)
#define effect_domain
newgen_descriptor_domain_defined
const char * module_name(const char *s)
Return the module part of an entity name.
FILE * safe_fopen(const char *filename, const char *what)
char * get_string_property(const char *)
int safe_fclose(FILE *stream, const char *filename)
bool get_bool_property(const string)
FC 2015-07-20: yuk, moved out to prevent an include cycle dependency include "properties....
void reset_current_module_entity(void)
Reset the current module entity.
void reset_current_module_statement(void)
Reset the current module statement.
statement set_current_module_statement(statement)
Set the current module statement.
entity set_current_module_entity(entity)
static.c
entity get_current_module_entity(void)
Get the entity of the current module.
#define NIL
The empty list (nil in Lisp)
#define CAR(pcons)
Get the value of the first element of a list.
#define FOREACH(_fe_CASTER, _fe_item, _fe_list)
Apply/map an instruction block on all the elements of a list.
string db_get_memory_resource(const char *rname, const char *oname, bool pure)
Return the pointer to the resource, whatever it is.
#define DB_PUT_FILE_RESOURCE
Put a file resource into the current workspace database.
static statement mod_stat
We want to keep track of the current statement inside the recurse.
void set_prettyprint_language_from_property(enum language_utype native)
set the prettyprint language according to the property PRETTYPRINT_LANGUAGE @description If the prope...
enum language_utype get_prettyprint_language_tag()
string db_build_file_resource_name(const char *rname, const char *oname, const char *suffix)
returns an allocated file name for a file resource.
#define pips_user_warning
#define pips_internal_error
#define MODULE_SEP_STRING
string concatenate(const char *,...)
Return the concatenation of the given strings.
string db_get_current_workspace_directory(void)
void print_references(list rl)
void print_expressions(list le)
void print_expression(expression e)
no file descriptor is passed to make is easier to use in a debugging stage.
void print_reference(reference r)
text empty_text(entity __attribute__((unused)) e, int __attribute__((unused)) m, statement __attribute__((unused)) s)
void close_prettyprint()
because some prettyprint functions may be used for debug, so the last hook set by somebody may have s...
void init_prettyprint(text(*hook)(entity, int, statement))
checks that the prettyprint hook was actually reset...
bool print_parallelizedHPF_code(const string module_name)
bool print_parallelized_code(const string mod_name)
#define transformer_with_temporary_values_p(t)
bool print_source(const string mod_name)
static bool print_parallelized_code_common(const char *mod_name, const char *style)
Build a textual resource for a parallel code using a string optional parallel style (dialect such as ...
bool print_code_or_source(string mod_name)
Generic function to prettyprint some sequential or parallel code, or even user view for the given mod...
#define points_to_list_domain
bool print_parallelized77_code(const string mod_name)
#define print_points_to_relations(x)
bool print_parallelized90_code(const string mod_name)
bool make_text_resource(const char *mod_name, const char *res_name, const char *file_ext, text texte)
Main C functions to print code, sequential or parallel.
#define print_points_to_graph(x)
#define print_points_to_cells(x)
#define points_to_graph_domain
void dprint(expression x)
For debugging: prettyprint many different kinds of newgen objects FC: type should be gen_chunk....
#define print_points_to_list(x)
bool print_code(const string mod_name)
bool make_text_resource_and_free(const char *mod_name, const char *res_name, const char *file_ext, text t)
#define dump_transformer(t)
bool print_parallelizedMPI_code(const string mod_name)
#define print_points_to_cell(x)
#define print_points_to(x)
bool user_view_p()
print_code or print_source
bool print_parallelizedOMP_code(const string mod_name)
text text_module(entity, statement)
void print_type(type)
For debugging.
void print_qualifiers(list)
void print_qualifier(qualifier)
void print_statements(list)
string basic_to_string(basic)
void print_types(list)
Very basic and crude debugging function.
void print_statement(statement)
Print a statement on stderr.
void set_string_property(const char *, const char *)
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...
entity module_name_to_entity(const char *mn)
This is an alias for local_name_to_top_level_entity.
const char * entity_module_name(entity e)
See comments about module_name().
#define expression_domain
newgen_execution_domain_defined
#define TRANSFORMER(x)
TRANSFORMER.
struct _newgen_struct_dimension_ * dimension
#define transformer_domain
newgen_test_domain_defined
#define dimension_lower(x)
#define statement_domain
newgen_sizeofexpression_domain_defined
#define EXPRESSION(x)
EXPRESSION.
#define entity_undefined_p(x)
#define reference_domain
newgen_range_domain_defined
#define basic_domain
newgen_area_domain_defined
#define dimension_upper(x)
#define dimension_domain
newgen_control_domain_defined
#define type_domain
newgen_transformer_domain_defined
#define expression_undefined_p(x)
struct _newgen_struct_transformer_ * transformer
#define qualifier_domain
newgen_preference_domain_defined
#define entity_domain
newgen_syntax_domain_defined
#define entity_initial(x)
#define expression_domain_number(x)
int fprintf()
test sc_min : ce test s'appelle par : programme fichier1.data fichier2.data ...
The structure used to build lists in NewGen.
#define MERGE_TEXTS(r, t)
void print_text(FILE *fd, text t)
#define text_domain
newgen_sentence_domain_defined