PIPS
word_attachment.c
Go to the documentation of this file.
1 /*
2  * THIS FILE HAS BEEN AUTOMATICALLY GENERATED BY NEWGEN.
3  *
4  * PLEASE DO NOT MODIFY IT.
5  */
6 
7 typedef void * void_star;
8 
9 #include <stdio.h>
10 #include <stdlib.h>
11 #include <string.h>
12 #include "genC.h"
13 #include "word_attachment.h"
14 
15 
16 /* ATTACHEE
17  */
19  return (attachee) gen_copy_tree((gen_chunk*) p);
20 }
22  gen_free((gen_chunk*) p);
23 }
26 }
28  check_attachee(p);
29  return gen_consistent_p((gen_chunk*) p);
30 }
32  return gen_defined_p((gen_chunk*) p);
33 }
36 }
38  check_attachee(r);
39  check_attachee(v);
40  message_assert("defined references to domain attachee",
42  memcpy(r, v, sizeof(struct _newgen_struct_attachee_));
43 }
45  // should clear up contents...
46  free(p);
47 }
48 void write_attachee(FILE* f, attachee p) {
49  gen_write(f, (gen_chunk*) p);
50 }
52  return (attachee) gen_read(f);
53 }
55  switch (tag) {
56  case is_attachee_statement_line_number: return "statement_line_number";
57  case is_attachee_reference: return "reference";
58  case is_attachee_call: return "call";
59  case is_attachee_declaration: return "declaration";
60  case is_attachee_type: return "type";
61  case is_attachee_loop: return "loop";
62  case is_attachee_module_head: return "module_head";
63  case is_attachee_complementary_sections: return "complementary_sections";
64  case is_attachee_complexities: return "complexities";
65  case is_attachee_continuation_conditions: return "continuation_conditions";
66  case is_attachee_cumulated_effects: return "cumulated_effects";
67  case is_attachee_out_regions: return "out_regions";
68  case is_attachee_preconditions: return "preconditions";
69  case is_attachee_privatized_regions: return "privatized_regions";
70  case is_attachee_proper_effects: return "proper_effects";
71  case is_attachee_proper_regions: return "proper_regions";
72  case is_attachee_regions: return "regions";
73  case is_attachee_static_control: return "static_control";
74  case is_attachee_transformers: return "transformers";
75  case is_attachee_decoration: return "decoration";
76  case is_attachee_comment: return "comment";
77  default: return string_undefined;
78  }
79 }
81  return (attachee) gen_alloc(3*sizeof(gen_chunk), GEN_CHECK_ALLOC, attachee_domain, tag, val);
82 }
85 }
87  return make_attachee(is_attachee_reference, (void*)(intptr_t) _field_);
88 }
90  return make_attachee(is_attachee_call, (void*)(intptr_t) _field_);
91 }
93  return make_attachee(is_attachee_declaration, (void*)(intptr_t) _field_);
94 }
95 attachee make_attachee_type(string _field_) {
96  return make_attachee(is_attachee_type, (void*)(intptr_t) _field_);
97 }
99  return make_attachee(is_attachee_loop, (void*)(intptr_t) _field_);
100 }
102  return make_attachee(is_attachee_module_head, (void*)(intptr_t) _field_);
103 }
106 }
109 }
112 }
115 }
118 }
121 }
124 }
127 }
130 }
133 }
136 }
139 }
142 }
145 }
146 
147 /* ATTACHMENT
148  */
150  return (attachment) gen_copy_tree((gen_chunk*) p);
151 }
153  gen_free((gen_chunk*) p);
154 }
157 }
159  check_attachment(p);
160  return gen_consistent_p((gen_chunk*) p);
161 }
163  return gen_defined_p((gen_chunk*) p);
164 }
167 }
169  check_attachment(r);
170  check_attachment(v);
171  message_assert("defined references to domain attachment",
173  memcpy(r, v, sizeof(struct _newgen_struct_attachment_));
174 }
176  // should clear up contents...
177  free(p);
178 }
179 void write_attachment(FILE* f, attachment p) {
180  gen_write(f, (gen_chunk*) p);
181 }
183  return (attachment) gen_read(f);
184 }
186  return (attachment) gen_alloc(4*sizeof(gen_chunk), GEN_CHECK_ALLOC, attachment_domain, a1, a2, a3);
187 }
188 
189 /* ATTACHMENTS
190  */
192  return (attachments) gen_copy_tree((gen_chunk*) p);
193 }
195  gen_free((gen_chunk*) p);
196 }
199 }
202  return gen_consistent_p((gen_chunk*) p);
203 }
205  return gen_defined_p((gen_chunk*) p);
206 }
209 }
213  message_assert("defined references to domain attachments",
215  memcpy(r, v, sizeof(struct _newgen_struct_attachments_));
216 }
218  // should clear up contents...
219  free(p);
220 }
222  gen_write(f, (gen_chunk*) p);
223 }
225  return (attachments) gen_read(f);
226 }
229 }
230 
231 /* WORD_TO_ATTACHMENTS
232  */
235 }
237  gen_free((gen_chunk*) p);
238 }
241 }
244  return gen_consistent_p((gen_chunk*) p);
245 }
247  return gen_defined_p((gen_chunk*) p);
248 }
251 }
255  message_assert("defined references to domain word_to_attachments",
257  memcpy(r, v, sizeof(struct _newgen_struct_word_to_attachments_));
258 }
260  // should clear up contents...
261  free(p);
262 }
264  gen_write(f, (gen_chunk*) p);
265 }
267  return (word_to_attachments) gen_read(f);
268 }
271 }
274 }
277 }
280 }
283 }
286 }
287 
attachment copy_attachment(attachment p)
ATTACHMENT.
attachee make_attachee_declaration(entity _field_)
attachee make_attachee_proper_regions(void)
attachee make_attachee_out_regions(void)
attachee make_attachee_module_head(entity _field_)
void free_word_to_attachments(word_to_attachments p)
void attachments_assign_contents(attachments r, attachments v)
attachee make_attachee_transformers(void)
bool attachments_defined_p(attachments p)
word_to_attachments make_word_to_attachments(void)
list gen_word_to_attachments_cons(word_to_attachments p, list l)
list gen_attachment_cons(attachment p, list l)
list gen_attachee_cons(attachee p, list l)
attachments copy_attachments(attachments p)
ATTACHMENTS.
void free_attachment(attachment p)
void attachee_assign_contents(attachee r, attachee v)
attachee make_attachee_continuation_conditions(void)
word_to_attachments copy_word_to_attachments(word_to_attachments p)
WORD_TO_ATTACHMENTS.
void update_word_to_attachments(word_to_attachments f, void_star k, attachments v)
bool word_to_attachments_consistent_p(word_to_attachments p)
void extend_word_to_attachments(word_to_attachments f, void_star k, attachments v)
word_to_attachments check_word_to_attachments(word_to_attachments p)
attachee make_attachee_call(call _field_)
attachee copy_attachee(attachee p)
ATTACHEE.
void write_attachment(FILE *f, attachment p)
bool attachment_defined_p(attachment p)
void attachments_non_recursive_free(attachments p)
attachments apply_word_to_attachments(word_to_attachments f, void_star k)
list gen_attachments_cons(attachments p, list l)
bool attachee_defined_p(attachee p)
void word_to_attachments_non_recursive_free(word_to_attachments p)
attachments check_attachments(attachments p)
attachee check_attachee(attachee p)
string attachee_tag_as_string(enum attachee_utype tag)
void free_attachee(attachee p)
attachee make_attachee_type(string _field_)
void attachee_non_recursive_free(attachee p)
void word_to_attachments_assign_contents(word_to_attachments r, word_to_attachments v)
bool attachee_consistent_p(attachee p)
attachee make_attachee_preconditions(void)
attachee read_attachee(FILE *f)
attachee make_attachee_loop(loop _field_)
attachments delete_word_to_attachments(word_to_attachments f, void_star k)
void attachment_non_recursive_free(attachment p)
attachee make_attachee_statement_line_number(intptr_t _field_)
attachee make_attachee_comment(void)
bool attachments_consistent_p(attachments p)
attachee make_attachee_decoration(void)
attachee make_attachee_complementary_sections(void)
attachee make_attachee_complexities(void)
attachments read_attachments(FILE *f)
bool attachment_consistent_p(attachment p)
bool word_to_attachments_defined_p(word_to_attachments p)
void write_attachee(FILE *f, attachee p)
attachments make_attachments(list a)
attachee make_attachee_proper_effects(void)
attachment make_attachment(attachee a1, intptr_t a2, intptr_t a3)
void attachment_assign_contents(attachment r, attachment v)
attachee make_attachee_static_control(void)
attachment read_attachment(FILE *f)
void write_attachments(FILE *f, attachments p)
attachee make_attachee(enum attachee_utype tag, void *val)
attachee make_attachee_cumulated_effects(void)
void * void_star
attachment check_attachment(attachment p)
attachee make_attachee_privatized_regions(void)
void free_attachments(attachments p)
void write_word_to_attachments(FILE *f, word_to_attachments p)
attachee make_attachee_regions(void)
attachee make_attachee_reference(reference _field_)
word_to_attachments read_word_to_attachments(FILE *f)
bool bound_word_to_attachments_p(word_to_attachments f, void_star k)
#define GEN_CHECK_ALLOC
Definition: genC.h:307
void gen_free(gen_chunk *obj)
version without shared_pointers.
Definition: genClib.c:992
gen_chunk * gen_alloc(int size, int gen_check_p, int dom,...)
allocates something in newgen.
Definition: genClib.c:298
int gen_consistent_p(gen_chunk *obj)
GEN_CONSISTENT_P dynamically checks the type correctness of OBJ.
Definition: genClib.c:2398
int gen_defined_p(gen_chunk *obj)
Definition: genClib.c:2438
gen_chunk * gen_check(gen_chunk *obj, int t)
GEN_CHECK checks that the gen_chunk received OBJ is of the appropriate TYPE.
Definition: genClib.c:2356
gen_chunk * gen_read(FILE *file)
GEN_READ reads any object from the FILE stream.
Definition: genClib.c:2323
gen_chunk * gen_copy_tree(gen_chunk *obj)
Definition: genClib.c:1429
void gen_write(FILE *fd, gen_chunk *obj)
GEN_WRITE writes the OBJect on the stream FD.
Definition: genClib.c:1745
void free(void *)
list gen_typed_cons(_int type, const void *item, const list next)
CONS a list with minimal type checking this cannot be done within the CONS macro because possible fun...
Definition: list.c:900
void * void_star
Definition: newgen.c:33
#define message_assert(msg, ex)
Definition: newgen_assert.h:47
#define HASH_GET(start, image, h, k)
Definition: newgen_map.h:30
#define HASH_EXTEND(start, image, h, k, v)
Definition: newgen_map.h:36
#define HASH_DELETE(start, image, h, k)
Definition: newgen_map.h:38
#define HASH_UPDATE(start, image, h, k, v)
Definition: newgen_map.h:34
#define HASH_BOUND_P(start, image, h, k)
Definition: newgen_map.h:32
int tag
TAG.
Definition: newgen_types.h:92
#define string_undefined
Definition: newgen_types.h:40
#define UU
Definition: newgen_types.h:98
int f(int off1, int off2, int n, float r[n], float a[n], float b[n])
Definition: offsets.c:15
#define intptr_t
Definition: stdint.in.h:294
The structure used to build lists in NewGen.
Definition: newgen_list.h:41
A gen_chunk is used to store every object.
Definition: genC.h:58
attachee_utype
@ is_attachee_regions
@ is_attachee_preconditions
@ is_attachee_statement_line_number
@ is_attachee_transformers
@ is_attachee_module_head
@ is_attachee_call
@ is_attachee_privatized_regions
@ is_attachee_loop
@ is_attachee_comment
@ is_attachee_continuation_conditions
@ is_attachee_complementary_sections
@ is_attachee_declaration
@ is_attachee_cumulated_effects
@ is_attachee_decoration
@ is_attachee_type
@ is_attachee_proper_effects
@ is_attachee_static_control
@ is_attachee_reference
@ is_attachee_proper_regions
@ is_attachee_complexities
@ is_attachee_out_regions
#define ATTACHMENT_NEWGEN_DOMAIN
#define ATTACHMENTS_NEWGEN_DOMAIN
#define attachment_domain
newgen_attachee_domain_defined
#define attachments_domain
newgen_attachment_domain_defined
#define word_to_attachments_hash_table(x)
#define ATTACHEE_NEWGEN_DOMAIN
#define WORD_TO_ATTACHMENTS_NEWGEN_DOMAIN
#define attachee_domain
newgen_void_star_domain_defined
#define word_to_attachments_domain
newgen_attachments_domain_defined