PIPS
|
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include "linear.h"
#include "genC.h"
#include "text.h"
#include "text-util.h"
#include "top-level.h"
#include "ri.h"
#include "effects.h"
#include "ri-util.h"
#include "effects-util.h"
#include "database.h"
#include "pipsdbm.h"
#include "resources.h"
#include "misc.h"
#include "properties.h"
#include "prettyprint.h"
#include "transformer.h"
#include "effects-generic.h"
#include "semantics.h"
#include "continuation.h"
Go to the source code of this file.
Macros | |
#define | PREC_FORESYS_PREFIX "C$PREC" |
package continuation : Be'atrice Creusillet, 1996 More... | |
#define | TRAN_FORESYS_PREFIX "C$TRAN" |
#define | continuation get_comment_continuation() |
#define | append(s) add_to_current_line(crt_line, s, continuation, txt) |
Functions | |
static int | is_inferior_pvarval (Pvecteur *pvarval1, Pvecteur *pvarval2) |
The strange argument type is required by qsort(), deep down in the calls. More... | |
static text | text_continuation (transformer cont, bool is_must) |
text text_continuation(transformer tran) input : a transformer representing a transformer or a precondition output : a text containing commentaries representing the transformer modifies : nothing. More... | |
static text | text_continuation_conditions (transformer must_cont_t, transformer may_cont_t) |
static text | text_statement_continuation_conditions (entity module, int margin, statement stat) |
static text | get_continuation_condition_text (const char *module_name, bool give_code_p) |
static bool | print_continuation_conditions (const char *module_name) |
bool | print_code_continuation_conditions (const string module_name) |
prettyprint.c More... | |
bool | print_source_continuation_conditions (const string module_name) |
Variables | |
static bool | is_user_view_p |
static hash_table | nts = hash_table_undefined |
#define append | ( | s | ) | add_to_current_line(crt_line, s, continuation, txt) |
Definition at line 103 of file prettyprint.c.
#define continuation get_comment_continuation() |
Definition at line 102 of file prettyprint.c.
#define PREC_FORESYS_PREFIX "C$PREC" |
package continuation : Be'atrice Creusillet, 1996
This File contains the functions to prettyprint continuation conditions of a module (over- and under-approximations.
Definition at line 67 of file prettyprint.c.
#define TRAN_FORESYS_PREFIX "C$TRAN" |
Definition at line 68 of file prettyprint.c.
To set up the hash table to translate value into value names
prepare the prettyprinting
summary information first
then code with regions, using text_statement_continuation_conditions
Definition at line 228 of file prettyprint.c.
References allocate_number_to_statement(), build_number_to_statement(), close_prettyprint(), db_get_memory_resource(), debug_off, debug_on, free_value_mappings(), get_current_module_entity(), get_current_module_statement(), hash_table_free(), hash_table_undefined, ifdebug, init_prettyprint(), is_user_view_p, local_name_to_top_level_entity(), make_text(), may_sum_cont_t, MERGE_TEXTS, module, module_name(), module_to_value_mappings(), must_sum_cont_t, NIL, nts, print_number_to_statement(), reset_cumulated_rw_effects(), reset_current_module_entity(), reset_current_module_statement(), reset_may_continuation_map(), reset_must_continuation_map(), set_cumulated_rw_effects(), set_current_module_entity(), set_current_module_statement(), set_may_continuation_map(), set_must_continuation_map(), statement_undefined, text_continuation(), text_module(), and text_statement_continuation_conditions().
Referenced by print_continuation_conditions().
The strange argument type is required by qsort(), deep down in the calls.
The constant term is given the highest weight to push constant terms at the end of the constraints and to make those easy to compare. If not, constant 0 will be handled differently from other constants. However, it would be nice to give constant terms the lowest weight to print simple constraints first...
Either I define two comparison functions, or I cheat somewhere else. Let's cheat?
Definition at line 75 of file prettyprint.c.
References pips_user_value_name(), term_cst, and vecteur_var.
Referenced by text_continuation().
prettyprint.c
module_name | odule_name |
Definition at line 331 of file prettyprint.c.
References is_user_view_p, module_name(), and print_continuation_conditions().
|
static |
Definition at line 305 of file prettyprint.c.
References concatenate(), file_name, free(), get_bool_property(), get_continuation_condition_text(), is_user_view_p, make_text_resource_and_free(), module_name(), and strdup().
Referenced by print_code_continuation_conditions(), and print_source_continuation_conditions().
module_name | odule_name |
Definition at line 338 of file prettyprint.c.
References is_user_view_p, module_name(), and print_continuation_conditions().
|
static |
text text_continuation(transformer tran) input : a transformer representing a transformer or a precondition output : a text containing commentaries representing the transformer modifies : nothing.
Modification: AP, Nov 10th, 1995. Instead of building a (very long) string, I directly use the transformer to build the prettyprint in text format. This is to avoid the problem occuring when the buffer used in transformer[precondition]_to_string() is too small. I also use a static buffer to build each constraint; we are restricted to constraints of lengths smaller than the line length.
else an empty text is returned.
Definition at line 118 of file prettyprint.c.
References append, close_current_line(), continuation, get_comment_sentinel(), HASH_UNDEFINED_VALUE, is_inferior_pvarval(), make_text(), MAX_LINE_LENGTH, NIL, pips_user_value_name(), predicate_system, sc_lexicographic_sort(), system_text_format(), transformer_relation, and transformer_undefined.
Referenced by get_continuation_condition_text(), and text_continuation_conditions().
|
static |
First: must continuation conditions
Then: may continuation conditions
Definition at line 153 of file prettyprint.c.
References ADD_SENTENCE_TO_TEXT, get_bool_property(), HASH_UNDEFINED_VALUE, is_sentence_formatted, make_sentence(), make_text(), MERGE_TEXTS, NIL, strdup(), and text_continuation().
Referenced by text_statement_continuation_conditions().
|
static |
Definition at line 192 of file prettyprint.c.
References hash_get(), HASH_UNDEFINED_VALUE, is_user_view_p, load_statement_may_continuation(), load_statement_must_continuation(), module, nts, pips_assert, statement_number, and text_continuation_conditions().
Referenced by get_continuation_condition_text().
|
static |
Definition at line 70 of file prettyprint.c.
Referenced by get_continuation_condition_text(), print_code_continuation_conditions(), print_continuation_conditions(), print_source_continuation_conditions(), and text_statement_continuation_conditions().
|
static |
Definition at line 71 of file prettyprint.c.
Referenced by get_continuation_condition_text(), and text_statement_continuation_conditions().