Clan  0.8.1
symbol.h
Go to the documentation of this file.
1 
2  /*+------- <| --------------------------------------------------------**
3  ** A Clan **
4  **--- /.\ -----------------------------------------------------**
5  ** <| [""M# symbol.h **
6  **- A | # -----------------------------------------------------**
7  ** /.\ [""M# First version: 01/05/2008 **
8  **- [""M# | # U"U#U -----------------------------------------------**
9  | # | # \ .:/
10  | # | #___| #
11  ****** | "--' .-" ******************************************************
12  * |"-"-"-"-"-#-#-## Clan : the Chunky Loop Analyzer (experimental) *
13  **** | # ## ###### *****************************************************
14  * \ .::::'/ *
15  * \ ::::'/ Copyright (C) 2008 University Paris-Sud 11 *
16  * :8a| # # ## *
17  * ::88a ### This is free software; you can redistribute it *
18  * ::::888a 8a ##::. and/or modify it under the terms of the GNU Lesser *
19  * ::::::::888a88a[]::: General Public License as published by the Free *
20  *::8:::::::::SUNDOGa8a::. Software Foundation, either version 2.1 of the *
21  *::::::::8::::888:Y8888:: License, or (at your option) any later version. *
22  *::::':::88::::888::Y88a::::::::::::... *
23  *::'::.. . ..... .. ... . *
24  * This software is distributed in the hope that it will be useful, but *
25  * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY *
26  * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License *
27  * for more details. *
28  * *
29  * You should have received a copy of the GNU Lesser General Public License *
30  * along with software; if not, write to the Free Software Foundation, Inc., *
31  * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
32  * *
33  * Clan, the Chunky Loop Analyzer *
34  * Written by Cedric Bastoul, Cedric.Bastoul@u-psud.fr *
35  * *
36  ******************************************************************************/
37 
38 
39 #ifndef CLAN_SYMBOL_H
40 # define CLAN_SYMBOL_H
41 
42 # if defined(__cplusplus)
43 extern "C"
44  {
45 # endif
46 
47 struct osl_strings;
48 struct osl_generic;
49 struct osl_relation_list;
50 
55 {
56  int key;
57  char* identifier;
58  int type;
59  int rank;
60  struct clan_symbol* next;
61 };
62 typedef struct clan_symbol clan_symbol_t;
63 typedef struct clan_symbol* clan_symbol_p;
64 
65 
66 /*+****************************************************************************
67  * Structure display function *
68  ******************************************************************************/
69 void clan_symbol_print_structure(FILE*, clan_symbol_p, int);
70 void clan_symbol_print(FILE*, clan_symbol_p);
71 
72 
73 /*+****************************************************************************
74  * Memory allocation/deallocation function *
75  ******************************************************************************/
76 clan_symbol_p clan_symbol_malloc();
77 void clan_symbol_free(clan_symbol_p);
78 
79 
80 /*+****************************************************************************
81  * Processing functions *
82  ******************************************************************************/
83 clan_symbol_p clan_symbol_lookup(clan_symbol_p, char*);
84 clan_symbol_p clan_symbol_lookup_by_key(clan_symbol_p, int);
85 void clan_symbol_push_at_end(clan_symbol_p*, clan_symbol_p);
86 clan_symbol_p clan_symbol_add(clan_symbol_p*, char*, int);
87 int clan_symbol_get_rank(clan_symbol_p, char*);
88 int clan_symbol_get_type(clan_symbol_p, char*);
89 struct osl_strings* clan_symbol_array_to_strings(clan_symbol_p*,
90  int, int*, int*);
91 int clan_symbol_nb_of_type(clan_symbol_p, int);
92 struct osl_generic* clan_symbol_to_strings(clan_symbol_p, int);
93 clan_symbol_p clan_symbol_clone_one(clan_symbol_p);
94 struct osl_generic* clan_symbol_to_arrays(clan_symbol_p);
95 int clan_symbol_new_iterator(clan_symbol_p*, clan_symbol_p*,
96  char*, int);
97 int clan_symbol_update_type(clan_symbol_p,
98  struct osl_relation_list*, int);
99 
100 # if defined(__cplusplus)
101  }
102 # endif
103 #endif /* define CLAN_SYMBOL_H */
clan_symbol_p clan_symbol_malloc()
Definition: symbol.c:195
clan_symbol_p clan_symbol_clone_one(clan_symbol_p)
Definition: symbol.c:513
struct clan_symbol * next
Definition: symbol.h:60
int rank
Definition: symbol.h:59
struct osl_generic * clan_symbol_to_arrays(clan_symbol_p)
Definition: symbol.c:533
struct osl_generic * clan_symbol_to_strings(clan_symbol_p, int)
Definition: symbol.c:483
clan_symbol_p clan_symbol_add(clan_symbol_p *, char *, int)
Definition: symbol.c:323
int clan_symbol_nb_of_type(clan_symbol_p, int)
Definition: symbol.c:458
int clan_symbol_new_iterator(clan_symbol_p *, clan_symbol_p *, char *, int)
Definition: symbol.c:581
clan_symbol_p clan_symbol_lookup(clan_symbol_p, char *)
Definition: symbol.c:240
clan_symbol_p clan_symbol_lookup_by_key(clan_symbol_p, int)
Definition: symbol.c:260
void clan_symbol_print(FILE *, clan_symbol_p)
Definition: symbol.c:178
int clan_symbol_get_type(clan_symbol_p, char *)
Definition: symbol.c:394
int type
Definition: symbol.h:58
void clan_symbol_free(clan_symbol_p)
Definition: symbol.c:214
void clan_symbol_print_structure(FILE *, clan_symbol_p, int)
Definition: symbol.c:73
struct clan_symbol * clan_symbol_p
Definition: symbol.h:63
int clan_symbol_get_rank(clan_symbol_p, char *)
Definition: symbol.c:374
char * identifier
Definition: symbol.h:57
struct osl_strings * clan_symbol_array_to_strings(clan_symbol_p *, int, int *, int *)
Definition: symbol.c:417
int key
Definition: symbol.h:56
int clan_symbol_update_type(clan_symbol_p, struct osl_relation_list *, int)
void clan_symbol_push_at_end(clan_symbol_p *, clan_symbol_p)
Definition: symbol.c:298