PIPS
|
#include <stdio.h>
#include "genC.h"
#include "boolean.h"
#include "arithmetique.h"
#include "vecteur.h"
#include "contrainte.h"
#include "ray_dte.h"
#include "sommet.h"
#include "sg.h"
#include "sc.h"
#include "polyedre.h"
#include "matrice.h"
#include "matrix.h"
#include "linear.h"
#include "ri.h"
#include "ri-util.h"
#include "workspace-util.h"
#include "prettyprint.h"
#include "constants.h"
#include "misc.h"
#include "paf_ri.h"
#include "graph.h"
#include "text.h"
#include "text-util.h"
#include "paf-util.h"
Go to the source code of this file.
Macros | |
#define | IS_INEG 0 |
Macro functions. More... | |
#define | IS_EG 1 |
#define | IS_VEC 2 |
#define | INDENT_FACTOR 2 |
Typedefs | |
typedef dfg_arc_label | arc_label |
Name : print.c Package : paf-util Author : Alexis Platonoff Date : july 1993. More... | |
typedef dfg_vertex_label | vertex_label |
Functions | |
static void | pu_contrainte_fprint (FILE *fp, Pcontrainte c, int is_what, const char *(*variable_name)(entity)) |
Used in imprime_quast() for correct indentation. More... | |
void | pu_inegalite_fprint (FILE *fp, Pcontrainte ineg, const char *(*variable_name)(entity)) |
=========================================================================== More... | |
void | pu_egalite_fprint (FILE *fp, Pcontrainte eg, const char *(*variable_name)(entity)) |
=========================================================================== More... | |
void | vecteur_fprint (FILE *fp, Pcontrainte vec, const char *(*variable_name)(entity)) |
=========================================================================== More... | |
void | fprint_dataflow (FILE *fp, int stmt, dataflow df) |
=========================================================================== More... | |
void | fprint_pred (FILE *fp, predicate pred) |
=========================================================================== More... | |
void | fprint_psysteme (FILE *fp, Psysteme ps) |
=========================================================================== More... | |
void | fprint_sc_pvecteur (FILE *fp, Psysteme ps) |
=========================================================================== More... | |
void | fprint_bdt (FILE *fp, bdt obj) |
=========================================================================== More... | |
const char * | pu_variable_name (Variable v) |
package mapping : Alexis Platonoff, april 1993 More... | |
bool | pu_is_inferior_var (Variable v1 __attribute__((unused)), Variable v2 __attribute__((unused))) |
=========================================================================== More... | |
void | pu_vect_fprint (FILE *fp, Pvecteur v) |
=========================================================================== More... | |
void | fprint_indent (FILE *fp, int indent) |
=========================================================================== More... | |
void | imprime_quast (FILE *fp, quast qu) |
=========================================================================== More... | |
Variables | |
static int | quast_depth = 0 |
Global variables More... | |
typedef dfg_arc_label arc_label |
Name : print.c Package : paf-util Author : Alexis Platonoff Date : july 1993.
Historic :
Documents: Comments : This file contains the functions used for printing the data structures of paf_ri. Ansi includes
Newgen includes C3 includes
Pips includes
typedef dfg_vertex_label vertex_label |
void fprint_bdt | ( | FILE * | fp, |
bdt | obj | ||
) |
===========================================================================
Mod by AP, oct 6th 199595: the number of the instruction is the vertex number minus BASE_NODE_NUMBER.
fp | p |
obj | bj |
Definition at line 352 of file print.c.
References BASE_NODE_NUMBER, bdt_schedules, bdt_undefined, CAR, CDR, crt_stmt, Ssysteme::egalites, entity_local_name(), exp, EXPRESSION, expression_to_string(), fprintf(), Ssysteme::inegalites, NIL, predicate_system, predicate_undefined, pu_egalite_fprint(), pu_inegalite_fprint(), SCHEDULE, schedule_dims, schedule_predicate, schedule_statement, and Scontrainte::succ.
Referenced by analyze_quast(), build_bdt_null(), prgm_mapping(), print_bdt(), print_parallelizedCMF_code(), print_parallelizedCRAFT_code(), reindexing(), and search_scc_bdt().
===========================================================================
void fprint_dataflow(FILE *fp, int stmt, dataflow df)
Prints in the file "fp" the dataflow "df" with a sink statement "stmt".
printf(fp, "\t\t Communication general \n");
fp | p |
stmt | tmt |
df | f |
Definition at line 229 of file print.c.
References communication_broadcast, communication_reduction, communication_shift, communication_undefined, dataflow_communication, dataflow_governing_pred, dataflow_reference, dataflow_transformation, fprint_list_of_exp(), fprint_pred(), fprint_sc_pvecteur(), fprintf(), gov_pred, predicate_system, predicate_undefined, ref, reference_to_string(), and trans_l.
Referenced by broadcast_conditions(), build_third_comb(), compatible_pc_p(), count_dataflows_on_ref(), edge_weight(), fprint_dfg(), fprint_sccs(), plc_fprint_dfs(), plc_fprint_distance(), plc_make_distance(), and prgm_mapping().
void fprint_indent | ( | FILE * | fp, |
int | indent | ||
) |
===========================================================================
fp | p |
indent | ndent |
Definition at line 502 of file print.c.
References fprintf(), and INDENT_FACTOR.
Referenced by imprime_quast().
void fprint_pred | ( | FILE * | fp, |
predicate | pred | ||
) |
===========================================================================
void fprint_pred(FILE *fp, predicate pred): prints in the file "fp" the predicate "pred".
fp | p |
pred | red |
Definition at line 287 of file print.c.
References fprint_psysteme(), and predicate_system.
Referenced by broadcast_conditions(), fprint_dataflow(), fprint_dfg(), and predicate_to_expression().
void fprint_psysteme | ( | FILE * | fp, |
Psysteme | ps | ||
) |
===========================================================================
void fprint_psysteme(FILE *fp, Psysteme ps): prints in the file "fp" the Psysteme "ps". Each constraint is printed either with pu_inegalite_fprint() or pu_egalite_fprint(), both redefined above. See pu_contrainte_fprint() for details.
fp | p |
ps | s |
Definition at line 302 of file print.c.
References Ssysteme::egalites, entity_local_name(), fprintf(), Ssysteme::inegalites, pu_egalite_fprint(), pu_inegalite_fprint(), and Scontrainte::succ.
Referenced by adg_dataflowgraph(), adg_dataflowgraph_with_extremities(), analyze_quast(), better_elim_var_with_eg(), broadcast_conditions(), build_list_of_min(), build_third_comb(), compatible_pc_p(), constraint_to_bound(), cutting_conditions(), dataflows_on_reference(), edge_weight(), fprint_l_psysteme(), fprint_mytest(), fprint_pred(), fprint_sys_list(), get_bounds_expression(), imprime_quast(), imprime_special_quast(), include_trans_on_LC_in_ref(), make_bounds(), make_causal_external(), make_primal(), make_reindex(), mapping_on_broadcast(), matrix_to_system(), my_substitute_var_with_vec(), new_elim_var_with_eg(), nullify_factors(), partial_broadcast_coefficients(), pip_solve(), pip_solve_min_with_big(), plc_elim_var_with_eg(), plc_make_distance(), prepare_reindexing(), prgm_mapping(), prototype_dimension(), sc_to_tableau(), search_scc_bdt(), simplify_bdt(), substitute_var_with_vec(), and valuer().
void fprint_sc_pvecteur | ( | FILE * | fp, |
Psysteme | ps | ||
) |
===========================================================================
void fprint_sc_pvecteur(FILE *fp, Psysteme ps): prints in the file "fp" the Psysteme "ps" as a list of vectors. Each constraint is printed with vecteur_fprint() defined above. See pu_contrainte_fprint() for details.
fp | p |
ps | s |
Definition at line 329 of file print.c.
References Ssysteme::egalites, entity_local_name(), fprintf(), Ssysteme::inegalites, Scontrainte::succ, and vecteur_fprint().
Referenced by fprint_dataflow().
void imprime_quast | ( | FILE * | fp, |
quast | qu | ||
) |
===========================================================================
fp | p |
qu | u |
Definition at line 514 of file print.c.
References CAR, CDR, conditional_false_quast, conditional_predicate, conditional_true_quast, EXPRESSION, expression_to_string(), fprint_indent(), fprint_psysteme(), fprintf(), imprime_quast(), is_quast_value_conditional, is_quast_value_quast_leaf, leaf_label_depth, leaf_label_statement, leaf_label_undefined, NIL, ordering_to_statement(), predicate_system, predicate_undefined, quast_depth, quast_leaf_leaf_label, quast_leaf_solution, quast_leaf_undefined, quast_quast_value, quast_undefined, quast_value_conditional, quast_value_quast_leaf, quast_value_tag, quast_value_undefined, and statement_number.
Referenced by analyze_quast(), imprime_quast(), pip_solve(), pip_solve_min_with_big(), search_scc_bdt(), and valuer().
|
static |
Used in imprime_quast() for correct indentation.
Local defines Moved higher because of Newgen's static typing =========================================================================== static void pu_contrainte_fprint(FILE *fp, Pcontrainte c, int is_what, char *(*variable_name)()):
prints in the file "fp" the constraint "c", of type equality, inequality or vector according to the value of the integer argument "is_what", using the function "variable_name" for the name of the variables.
The function contrainte_fprint() exists, it is defined in contrainte.c (C3 library). We redefine this function because:
1. we want the constant term in the left hand side 2. we want a third type of contrainte (vector) which does not print the inequality or equality symbol. 3. we do not want a line feed at the end of the constraint
We consider that CONTRAINTE_UNDEFINED => CONTRAINTE_NULLE
Results for a constraint containing the following Pvecteur (2*I) (-J) (-4):
equality: 2 * I - J - 4 = 0 inequality: 2 * I - J - 4 <= 0 vector: 2 * I - J - 4 GRRRR this function is already/also in array_dfg... FC
on admet plusieurs occurences du terme constant!?!
sign
value
trail
IS_VEC
Definition at line 123 of file print.c.
References CONTRAINTE_UNDEFINED_P, contrainte_vecteur, fprint_Value(), fprintf(), IS_EG, IS_INEG, pips_internal_error, Svecteur::succ, TCST, Svecteur::val, value_addto, value_neg_p, value_notzero_p, value_one_p, value_oppose, value_pos_p, VALUE_ZERO, Svecteur::var, variable_name(), vect_check(), VECTEUR_NUL, and VECTEUR_NUL_P.
Referenced by pu_egalite_fprint(), pu_inegalite_fprint(), and vecteur_fprint().
void pu_egalite_fprint | ( | FILE * | fp, |
Pcontrainte | eg, | ||
const char *(*)(entity) | variable_name | ||
) |
===========================================================================
void pu_egalite_fprint(FILE *fp, Pcontraint eg, char *(*variable_name)()): Redefinition of egalite_fprint(). See pu_contrainte_fprint() for details.
Definition at line 205 of file print.c.
References IS_EG, pu_contrainte_fprint(), and variable_name().
Referenced by fprint_bdt(), and fprint_psysteme().
void pu_inegalite_fprint | ( | FILE * | fp, |
Pcontrainte | ineg, | ||
const char *(*)(entity) | variable_name | ||
) |
===========================================================================
void pu_inegalite_fprint(FILE *fp, Pcontraint ineg, char *(*variable_name)()): Redefinition of inegalite_fprint(). See pu_contrainte_fprint() for details.
Definition at line 194 of file print.c.
References IS_INEG, pu_contrainte_fprint(), and variable_name().
Referenced by fprint_bdt(), and fprint_psysteme().
===========================================================================
Definition at line 432 of file print.c.
Referenced by fprint_pla_pp_dims(), plc_fprint_distance(), and plc_fprint_proto().
const char* pu_variable_name | ( | Variable | v | ) |
package mapping : Alexis Platonoff, april 1993
===========================================================================
Definition at line 421 of file print.c.
References entity_local_name(), and TCST.
Referenced by calculate_delay(), constraint_to_bound(), fprint_pla_pp_dims(), is_not_trivial_p(), make_reindex(), mapping_on_broadcast(), nullify_factors(), partition_unknowns(), plc_fprint_distance(), plc_make_distance(), prgm_mapping(), prototype_dimension(), solve_system_by_succ_elim(), and valuer().
void pu_vect_fprint | ( | FILE * | fp, |
Pvecteur | v | ||
) |
===========================================================================
void pu_vect_fprint(FILE *fp, Pvecteur v): impression d'un vecteur creux v sur le fichier fp.
There exist a function "vect_fprint" in C3 which takes a third argument. arg, also in array_dfg.
on admet plusieurs occurences du terme constant!?!
fp | p |
Definition at line 446 of file print.c.
References entity_local_name(), fprint_Value(), fprintf(), Svecteur::succ, TCST, Svecteur::val, value_addto, value_notzero_p, value_one_p, value_oppose, value_pos_p, VALUE_ZERO, Svecteur::var, and VECTEUR_NUL_P.
Referenced by adg_dataflowgraph(), adg_dataflowgraph_with_extremities(), analyze_quast(), better_elim_var_with_eg(), build_third_comb(), calculate_delay(), constraint_to_bound(), fprint_coef_list(), fprint_vv(), make_reindex(), mapping_on_broadcast(), new_elim_var_with_eg(), nullify_factors(), plc_elim_var_with_eg(), predicate_to_expression(), prepare_reindexing(), prototype_dimension(), search_scc_bdt(), simplify_dimension(), and solve_system_by_succ_elim().
void vecteur_fprint | ( | FILE * | fp, |
Pcontrainte | vec, | ||
const char *(*)(entity) | variable_name | ||
) |
===========================================================================
void vecteur_fprint(FILE *fp, Pcontraint vec char *(*variable_name)()): See pu_contrainte_fprint() for details.
Definition at line 216 of file print.c.
References IS_VEC, pu_contrainte_fprint(), and variable_name().
Referenced by fprint_sc_pvecteur().
|
static |
Global variables
Internal variables
Definition at line 87 of file print.c.
Referenced by imprime_quast().