PIPS
gfc2pips-stubs.c
Go to the documentation of this file.
1 /*
2 
3  $Id: gfc2pips-stubs.c 23176 2016-08-30 12:47:13Z coelho $
4 
5  Copyright 1989-2016 MINES ParisTech
6  Copyright 2009-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 #ifdef HAVE_CONFIG_H
27  #include "pips_config.h"
28 #endif
29 
30 #include "gfc2pips-private.h"
31 
32 #include "c_parser_private.h"
33 #include "misc.h"
34 #include "text-util.h"
35 #include <stdio.h>
36 
37 
38 
39 /************************************
40  * STUB FUNCTIONS
41  * They are there to get rid of the whole spaghetti
42  * that is PIPS libraries linking :-(
43  */
44 
45 #define _STUB_MSG_(severity,msg) \
46  pips_debug(0,"@%s(%d) !%s! : %s \n",__FILE__,__LINE__,severity,msg);
47 #define STUB_ERROR_MSG(msg) { _STUB_MSG_("ERROR",msg); exit(1); }
48 #define STUB_WARNING_MSG(msg) _STUB_MSG_("WARNING",msg)
49 #define STUB_ERROR() STUB_ERROR_MSG("")
50 #define STUB_WARNING() STUB_WARNING_MSG("")
51 
52 // Preprocessor
53 #include "preprocessor.h"
54 
55 /*************************************************
56  * PIPSDBM
57  */
58 
59 string db_get_memory_resource( const string rname,
60  const string oname,
61  bool pure ) {
62  STUB_ERROR();
63 }
64 
66  STUB_ERROR();
67 }
68 
69 string db_get_directory_name_for_module( string name ) {
70  STUB_WARNING();
71  return string_undefined;
72 }
73 
75  STUB_WARNING();
76  gen_array_t a = gen_array_make( 0 );
77  return a;
78 }
79 
81  STUB_WARNING();
82  return string_undefined;
83 }
84 
85 bool db_resource_p( string rname, string oname ) {
86  STUB_WARNING();
87  return FALSE;
88 }
89 
91  string oname,
92  void * p,
93  bool update_is_ok ) {
94  STUB_ERROR();
95 }
96 
97 bool db_touch_resource(const char* rname, const char* oname)
98 {
99  STUB_ERROR();
100  return FALSE;
101 }
102 
103 bool db_resource_required_or_available_p(const char* rname, const char* oname)
104 {
105  STUB_ERROR();
106  return FALSE;
107 }
108 
109 string db_build_file_resource_name(const char* r, const char* o, const char* s)
110 {
111  STUB_ERROR();
112  return NULL;
113 }
114 
115 /************************************************
116  * C_Syntax
117  */
118 
120 {
121  STUB_ERROR();
122 }
123 
124 void CParserError( char *msg ) {
125  STUB_ERROR();
126 }
127 
128 /***********************************************
129  * Effects
130  */
132  STUB_ERROR();
133 }
134 
135 /***********************************************
136  * Control
137  */
139  STUB_ERROR();
140 }
141 
142 // FIXME Really unused ??
144  STUB_ERROR();
145 }
147  STUB_ERROR();
148 }
149 
151  STUB_ERROR();
152 }
153 /***********************************************
154  * STEP
155  */
157  STUB_ERROR();
158 }
159 string directive_to_string( void *d, bool close ) {
160  STUB_ERROR();
161 }
162 
163 /**********************************************
164  * BOOTSTRAP
165  */
167  STUB_ERROR();
168 }
169 
170 /**********************************************
171  * PROPERTIES
172  */
173 bool get_bool_property( const string name ) {
174  if ( strcmp( "PRETTYPRINT_LISTS_WITH_SPACES", name ) == 0
175  || strcmp( "PRETTYPRINT_REGENERATE_ALTERNATE_RETURNS", name ) == 0
176  || strcmp( "PRETTYPRINT_C_CODE", name ) == 0
177  || strcmp( "ABORT_ON_USER_ERROR", name ) == 0 ) {
178  return true;
179  }
180  if ( strcmp( "NO_USER_WARNING", name ) == 0 ) {
181  return false;
182  }
183  fprintf( stderr, "***** Property requested : %s ***** ", name );
184  STUB_WARNING();
185  return 0;
186 }
187 string get_string_property( const string name ) {
188  fprintf( stderr, "***** Property requested : %s ***** ", name );
189  STUB_ERROR();
190 }
191 int get_int_property( const string name ) {
192  fprintf( stderr, "***** Property requested : %s ***** ", name );
193  STUB_ERROR();
194 }
195 void set_bool_property( const string name, bool b ) {
196  fprintf( stderr, "***** Property requested : %s ***** ", name );
197  STUB_ERROR();
198 }
199 void set_string_property( const string name, string s ) {
200  fprintf( stderr, "***** Property requested : %s ***** ", name );
201  STUB_ERROR();
202 }
204  STUB_WARNING_MSG("unimplemented in gfc2pips !");
205 }
207  STUB_WARNING_MSG("unimplemented in gfc2pips !");
208  return true;
209 }
210 
211 
212 /*************************************************
213  * PIPSMAKE
214  */
215 bool active_phase_p(const char* phase)
216 {
217  STUB_ERROR();
218 }
219 
220 /********************************************************* PRETTYPRINT STUFF */
221 
223  return t != NULL;
224 }
225 
226 void print_points_to(void * v) {
227  STUB_ERROR();
228 }
229 
230 void print_points_to_cell(void * v)
231 {
232  STUB_ERROR();
233 }
234 
235 void print_points_to_cells(void * v)
236 {
237  STUB_ERROR();
238 }
239 
240 void print_points_to_graph(void * v)
241 {
242  STUB_ERROR();
243 }
244 
245 void print_points_to_list(void * v)
246 {
247  STUB_ERROR();
248 }
249 
251 {
252  STUB_ERROR();
253 }
254 
255 void print_transformer(void * v)
256 {
257  STUB_ERROR();
258 }
259 
260 void dump_transformer(void * v)
261 {
262  STUB_ERROR();
263 }
264 
265 void print_region(void * v)
266 {
267  STUB_ERROR();
268 }
269 
270 void print_effect(void * v)
271 {
272  STUB_ERROR();
273 }
274 
275 void print_effects(void * v)
276 {
277  STUB_ERROR();
278 }
gen_array_t gen_array_make(size_t size)
declarations...
Definition: array.c:40
string db_build_file_resource_name(const char *r, const char *o, const char *s)
returns an allocated file name for a file resource.
bool transformer_with_temporary_values_p(void *t)
bool too_many_property_errors_pending_p(void)
void print_effect(void *v)
void print_points_to(void *v)
void set_string_property(const string name, string s)
void print_points_to_relations(void *v)
int get_int_property(const string name)
bool active_phase_p(const char *phase)
void print_region(void *v)
void print_points_to_cells(void *v)
#define STUB_ERROR()
void print_transformer(void *v)
bool properties_initialized_p(void)
FC 2015-07-20: yuk, moved out to prevent an include cycle dependency include "properties....
void print_points_to_graph(void *v)
void CParserError(char *msg)
void db_put_or_update_memory_resource(string rname, string oname, void *p, bool update_is_ok)
string db_get_current_workspace_directory(void)
bool db_resource_p(string rname, string oname)
string db_get_directory_name_for_module(string name)
bool get_bool_property(const string name)
FC 2015-07-20: yuk, moved out to prevent an include cycle dependency include "properties....
bool db_resource_required_or_available_p(const char *rname, const char *oname)
from now on we must not know about the database internals?
string db_get_meta_data_directory()
The syntax of a property list.
void print_effects(void *v)
bool db_touch_resource(const char *rname, const char *oname)
touch logical time for resource[owner], possibly behind the back of pipsdbm.
void print_points_to_list(void *v)
void unspaghettify_statement(statement mod_stmt)
The real entry point of unspaghettify:
void print_points_to_cell(void *v)
#define STUB_WARNING_MSG(msg)
string get_string_property(const string name)
bool clean_up_sequences(statement s)
Recursively clean up the statement sequences by fusing them if possible and by removing useless one.
#define STUB_WARNING()
void compilation_unit_parser(const char *module)
string db_get_memory_resource(const string rname, const string oname, bool pure)
void set_bool_property(const string name, bool b)
string directive_to_string(void *d, bool close)
void load_global_directives(entity k)
list expression_to_proper_effects(expression e)
bool check_loop_range(range r, hash_table h)
type_checker.c
void dump_transformer(void *v)
unstructured control_graph(statement st)
CONTROL_GRAPH returns the control graph of the statement ST.
statement hcfg(statement st)
Compute the hierarchical control flow graph (HCFG) of a statement.
gen_array_t db_get_module_list(void)
Get an array of all the modules (functions, procedures and compilation units) of a workspace.
#define string_undefined
Definition: newgen_types.h:40
static char * module
Definition: pips.c:74
int fprintf()
test sc_min : ce test s'appelle par : programme fichier1.data fichier2.data ...
The structure used to build lists in NewGen.
Definition: newgen_list.h:41
static Menu_item close
Definition: xv_log.c:66