PIPS
pointer_values-local.h
Go to the documentation of this file.
1 /*
2 
3  $Id: pointer_values-local.h 23065 2016-03-02 09:05:50Z coelho $
4 
5  Copyright 1989-2016 MINES ParisTech
6  Copyright 2010 HPC Project
7 
8  This file is part of PIPS.
9 
10  PIPS is free software: you can redistribute it and/or modify it
11  under the terms of the GNU General Public License as published by
12  the Free Software Foundation, either version 3 of the License, or
13  any later version.
14 
15  PIPS is distributed in the hope that it will be useful, but WITHOUT ANY
16  WARRANTY; without even the implied warranty of MERCHANTABILITY or
17  FITNESS FOR A PARTICULAR PURPOSE.
18 
19  See the GNU General Public License for more details.
20 
21  You should have received a copy of the GNU General Public License
22  along with PIPS. If not, see <http://www.gnu.org/licenses/>.
23 
24 */
25 
26 /* pv_context is a structure holding the methods to use during
27  pointer values analyses */
28 typedef struct {
29 
30  /* ANALYSIS CONTROL */
31  bool initial_pointer_values_p; /* set to true for an initial module analysis */
32 
33  /* PIPSDEBM INTERFACES */
34  statement_cell_relations (*db_get_pv_func)(const char *);
35  void (*db_put_pv_func)(const char * , statement_cell_relations);
36  list (*db_get_in_pv_func)(const char *);
37  void (*db_put_in_pv_func)(const char * , list);
38  list (*db_get_out_pv_func)(const char *);
39  void (*db_put_out_pv_func)(const char * , list);
40  list (*db_get_initial_pv_func)(const char *);
41  void (*db_put_initial_pv_func)(const char * , list);
42  list (*db_get_program_pv_func)();
43  void (*db_put_program_pv_func)(list);
44 
45 /* statement_cell_relations (*db_get_gen_pv_func)(char *); */
46 /* void (*db_put_gen_pv_func)(char * , statement_cell_relations); */
47 /* statement_effects (*db_get_kill_pv_func)(char *); */
48 /* void (*db_put_kill_pv_func)(char * , statement_effects); */
49 
50  list (*make_pv_from_effects_func)(effect, effect, cell_interpretation, list);
51 
52  /* COMPARISON OPERATORS */
54  cell, descriptor ,
55  transformer, bool, bool *);
56 
57  /* TRANSLATION OPERATORS */
58  void (*cell_reference_with_value_of_cell_reference_translation_func)
60  void (*cell_reference_with_address_of_cell_reference_translation_func)
62 
63  /* UNARY OPERATORS */
64  cell_relation (*pv_composition_with_transformer_func)(cell_relation, transformer );
65 
66  /* BINARY OPERATORS */
67  list (*pvs_must_union_func)(list, list);
68  list (*pvs_may_union_func)(list, list);
69  bool (*pvs_equal_p_func)(list, list);
70 
71  /* STACKS */
73 } pv_context;
74 
75 /* pv_results is a structure holding the different results of an expression pointer values analysis */
76 typedef struct {
77  list l_out; /* resulting pointer_values */
78  list result_paths; /* resulting pointer path of the expression evaluation */
79  list result_paths_interpretations; /* interpretation of the resulting pointer path */
80 
81 } pv_results;
82 
83 #define pips_debug_pv_results(level, message, pv_res) \
84  ifdebug(level) { pips_debug(level, "%s\n", message); \
85  print_pv_results(pv_res);}
void const char const char const int
struct _newgen_struct_reference_ * reference
Definition: compsec.h:14
struct _newgen_struct_effect_ * effect
Definition: dg.h:21
bool(* cell_preceding_p_func)(cell, descriptor, cell, descriptor, bool, bool *)
struct _newgen_struct_cell_relation_ * cell_relation
Definition: effects.h:98
struct _newgen_struct_cell_ * cell
Definition: effects.h:90
struct _newgen_struct_cell_interpretation_ * cell_interpretation
Definition: effects.h:82
struct _newgen_struct_descriptor_ * descriptor
Definition: effects.h:114
struct _newgen_struct_statement_cell_relations_ * statement_cell_relations
Definition: effects.h:202
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
struct cons * list
Definition: newgen_types.h:106
struct _newgen_struct_transformer_ * transformer
Definition: ri.h:431
the stack head
Definition: stack.c:62
The structure used to build lists in NewGen.
Definition: newgen_list.h:41
pv_context is a structure holding the methods to use during pointer values analyses
stack stmt_stack
STACKS.
bool initial_pointer_values_p
ANALYSIS CONTROL.
pv_results is a structure holding the different results of an expression pointer values analysis
list result_paths_interpretations
resulting pointer path of the expression evaluation
list result_paths
resulting pointer_values