1 | open Preamble |
---|
2 | |
---|
3 | open String |
---|
4 | |
---|
5 | open Sets |
---|
6 | |
---|
7 | open Listb |
---|
8 | |
---|
9 | open LabelledObjects |
---|
10 | |
---|
11 | open Graphs |
---|
12 | |
---|
13 | open I8051 |
---|
14 | |
---|
15 | open Order |
---|
16 | |
---|
17 | open Registers |
---|
18 | |
---|
19 | open BitVectorTrie |
---|
20 | |
---|
21 | open CostLabel |
---|
22 | |
---|
23 | open Hide |
---|
24 | |
---|
25 | open Proper |
---|
26 | |
---|
27 | open PositiveMap |
---|
28 | |
---|
29 | open Deqsets |
---|
30 | |
---|
31 | open ErrorMessages |
---|
32 | |
---|
33 | open PreIdentifiers |
---|
34 | |
---|
35 | open Errors |
---|
36 | |
---|
37 | open Extralib |
---|
38 | |
---|
39 | open Setoids |
---|
40 | |
---|
41 | open Monad |
---|
42 | |
---|
43 | open Option |
---|
44 | |
---|
45 | open Lists |
---|
46 | |
---|
47 | open Identifiers |
---|
48 | |
---|
49 | open Integers |
---|
50 | |
---|
51 | open AST |
---|
52 | |
---|
53 | open Division |
---|
54 | |
---|
55 | open Exp |
---|
56 | |
---|
57 | open Arithmetic |
---|
58 | |
---|
59 | open Extranat |
---|
60 | |
---|
61 | open Vector |
---|
62 | |
---|
63 | open Div_and_mod |
---|
64 | |
---|
65 | open Jmeq |
---|
66 | |
---|
67 | open Russell |
---|
68 | |
---|
69 | open List |
---|
70 | |
---|
71 | open Util |
---|
72 | |
---|
73 | open FoldStuff |
---|
74 | |
---|
75 | open BitVector |
---|
76 | |
---|
77 | open Types |
---|
78 | |
---|
79 | open Bool |
---|
80 | |
---|
81 | open Relations |
---|
82 | |
---|
83 | open Nat |
---|
84 | |
---|
85 | open Hints_declaration |
---|
86 | |
---|
87 | open Core_notation |
---|
88 | |
---|
89 | open Pts |
---|
90 | |
---|
91 | open Logic |
---|
92 | |
---|
93 | open Positive |
---|
94 | |
---|
95 | open Z |
---|
96 | |
---|
97 | open BitVectorZ |
---|
98 | |
---|
99 | open Pointers |
---|
100 | |
---|
101 | open ByteValues |
---|
102 | |
---|
103 | open BackEndOps |
---|
104 | |
---|
105 | open Joint |
---|
106 | |
---|
107 | open State |
---|
108 | |
---|
109 | open Bind_new |
---|
110 | |
---|
111 | open BindLists |
---|
112 | |
---|
113 | open Blocks |
---|
114 | |
---|
115 | open Deqsets |
---|
116 | |
---|
117 | val fresh_label : |
---|
118 | Joint.params -> AST.ident List.list -> Graphs.label |
---|
119 | Monad.smax_def__o__monad |
---|
120 | |
---|
121 | val fresh_register : |
---|
122 | Joint.params -> AST.ident List.list -> Registers.register |
---|
123 | Monad.smax_def__o__monad |
---|
124 | |
---|
125 | val adds_graph_pre : |
---|
126 | Joint.graph_params -> AST.ident List.list -> (Graphs.label -> 'a1 -> |
---|
127 | Joint.joint_seq) -> 'a1 List.list -> Graphs.label -> Graphs.label |
---|
128 | Monad.smax_def__o__monad |
---|
129 | |
---|
130 | val adds_graph_post : |
---|
131 | Joint.graph_params -> AST.ident List.list -> Joint.joint_seq List.list -> |
---|
132 | Graphs.label -> Graphs.label Monad.smax_def__o__monad |
---|
133 | |
---|
134 | val adds_graph : |
---|
135 | Joint.graph_params -> AST.ident List.list -> Blocks.step_block -> |
---|
136 | Graphs.label -> Graphs.label -> Joint.joint_internal_function -> |
---|
137 | Joint.joint_internal_function |
---|
138 | |
---|
139 | val fin_adds_graph : |
---|
140 | Joint.graph_params -> AST.ident List.list -> Blocks.fin_block -> |
---|
141 | Graphs.label -> Joint.joint_internal_function -> |
---|
142 | Joint.joint_internal_function |
---|
143 | |
---|
144 | val append_seq_list : |
---|
145 | Joint.params -> AST.ident List.list -> Blocks.bind_step_block -> |
---|
146 | (Registers.register, Joint.joint_seq List.list) Bind_new.bind_new -> |
---|
147 | Blocks.bind_step_block |
---|
148 | |
---|
149 | val b_adds_graph : |
---|
150 | Joint.graph_params -> AST.ident List.list -> Blocks.bind_step_block -> |
---|
151 | Graphs.label -> Graphs.label -> Joint.joint_internal_function -> |
---|
152 | Joint.joint_internal_function |
---|
153 | |
---|
154 | val b_fin_adds_graph : |
---|
155 | Joint.graph_params -> AST.ident List.list -> Blocks.bind_fin_block -> |
---|
156 | Graphs.label -> Joint.joint_internal_function -> |
---|
157 | Joint.joint_internal_function |
---|
158 | |
---|
159 | type b_graph_translate_data = { init_ret : __; init_params : __; |
---|
160 | init_stack_size : Nat.nat; |
---|
161 | added_prologue : Joint.joint_seq List.list; |
---|
162 | f_step : (Graphs.label -> Joint.joint_step -> |
---|
163 | Blocks.bind_step_block); |
---|
164 | f_fin : (Graphs.label -> Joint.joint_fin_step |
---|
165 | -> Blocks.bind_fin_block) } |
---|
166 | |
---|
167 | val b_graph_translate_data_rect_Type4 : |
---|
168 | Joint.graph_params -> Joint.graph_params -> AST.ident List.list -> (__ -> |
---|
169 | __ -> Nat.nat -> Joint.joint_seq List.list -> (Graphs.label -> |
---|
170 | Joint.joint_step -> Blocks.bind_step_block) -> (Graphs.label -> |
---|
171 | Joint.joint_fin_step -> Blocks.bind_fin_block) -> __ -> __ -> __ -> 'a1) -> |
---|
172 | b_graph_translate_data -> 'a1 |
---|
173 | |
---|
174 | val b_graph_translate_data_rect_Type5 : |
---|
175 | Joint.graph_params -> Joint.graph_params -> AST.ident List.list -> (__ -> |
---|
176 | __ -> Nat.nat -> Joint.joint_seq List.list -> (Graphs.label -> |
---|
177 | Joint.joint_step -> Blocks.bind_step_block) -> (Graphs.label -> |
---|
178 | Joint.joint_fin_step -> Blocks.bind_fin_block) -> __ -> __ -> __ -> 'a1) -> |
---|
179 | b_graph_translate_data -> 'a1 |
---|
180 | |
---|
181 | val b_graph_translate_data_rect_Type3 : |
---|
182 | Joint.graph_params -> Joint.graph_params -> AST.ident List.list -> (__ -> |
---|
183 | __ -> Nat.nat -> Joint.joint_seq List.list -> (Graphs.label -> |
---|
184 | Joint.joint_step -> Blocks.bind_step_block) -> (Graphs.label -> |
---|
185 | Joint.joint_fin_step -> Blocks.bind_fin_block) -> __ -> __ -> __ -> 'a1) -> |
---|
186 | b_graph_translate_data -> 'a1 |
---|
187 | |
---|
188 | val b_graph_translate_data_rect_Type2 : |
---|
189 | Joint.graph_params -> Joint.graph_params -> AST.ident List.list -> (__ -> |
---|
190 | __ -> Nat.nat -> Joint.joint_seq List.list -> (Graphs.label -> |
---|
191 | Joint.joint_step -> Blocks.bind_step_block) -> (Graphs.label -> |
---|
192 | Joint.joint_fin_step -> Blocks.bind_fin_block) -> __ -> __ -> __ -> 'a1) -> |
---|
193 | b_graph_translate_data -> 'a1 |
---|
194 | |
---|
195 | val b_graph_translate_data_rect_Type1 : |
---|
196 | Joint.graph_params -> Joint.graph_params -> AST.ident List.list -> (__ -> |
---|
197 | __ -> Nat.nat -> Joint.joint_seq List.list -> (Graphs.label -> |
---|
198 | Joint.joint_step -> Blocks.bind_step_block) -> (Graphs.label -> |
---|
199 | Joint.joint_fin_step -> Blocks.bind_fin_block) -> __ -> __ -> __ -> 'a1) -> |
---|
200 | b_graph_translate_data -> 'a1 |
---|
201 | |
---|
202 | val b_graph_translate_data_rect_Type0 : |
---|
203 | Joint.graph_params -> Joint.graph_params -> AST.ident List.list -> (__ -> |
---|
204 | __ -> Nat.nat -> Joint.joint_seq List.list -> (Graphs.label -> |
---|
205 | Joint.joint_step -> Blocks.bind_step_block) -> (Graphs.label -> |
---|
206 | Joint.joint_fin_step -> Blocks.bind_fin_block) -> __ -> __ -> __ -> 'a1) -> |
---|
207 | b_graph_translate_data -> 'a1 |
---|
208 | |
---|
209 | val init_ret : |
---|
210 | Joint.graph_params -> Joint.graph_params -> AST.ident List.list -> |
---|
211 | b_graph_translate_data -> __ |
---|
212 | |
---|
213 | val init_params : |
---|
214 | Joint.graph_params -> Joint.graph_params -> AST.ident List.list -> |
---|
215 | b_graph_translate_data -> __ |
---|
216 | |
---|
217 | val init_stack_size : |
---|
218 | Joint.graph_params -> Joint.graph_params -> AST.ident List.list -> |
---|
219 | b_graph_translate_data -> Nat.nat |
---|
220 | |
---|
221 | val added_prologue : |
---|
222 | Joint.graph_params -> Joint.graph_params -> AST.ident List.list -> |
---|
223 | b_graph_translate_data -> Joint.joint_seq List.list |
---|
224 | |
---|
225 | val f_step : |
---|
226 | Joint.graph_params -> Joint.graph_params -> AST.ident List.list -> |
---|
227 | b_graph_translate_data -> Graphs.label -> Joint.joint_step -> |
---|
228 | Blocks.bind_step_block |
---|
229 | |
---|
230 | val f_fin : |
---|
231 | Joint.graph_params -> Joint.graph_params -> AST.ident List.list -> |
---|
232 | b_graph_translate_data -> Graphs.label -> Joint.joint_fin_step -> |
---|
233 | Blocks.bind_fin_block |
---|
234 | |
---|
235 | val b_graph_translate_data_inv_rect_Type4 : |
---|
236 | Joint.graph_params -> Joint.graph_params -> AST.ident List.list -> |
---|
237 | b_graph_translate_data -> (__ -> __ -> Nat.nat -> Joint.joint_seq List.list |
---|
238 | -> (Graphs.label -> Joint.joint_step -> Blocks.bind_step_block) -> |
---|
239 | (Graphs.label -> Joint.joint_fin_step -> Blocks.bind_fin_block) -> __ -> __ |
---|
240 | -> __ -> __ -> 'a1) -> 'a1 |
---|
241 | |
---|
242 | val b_graph_translate_data_inv_rect_Type3 : |
---|
243 | Joint.graph_params -> Joint.graph_params -> AST.ident List.list -> |
---|
244 | b_graph_translate_data -> (__ -> __ -> Nat.nat -> Joint.joint_seq List.list |
---|
245 | -> (Graphs.label -> Joint.joint_step -> Blocks.bind_step_block) -> |
---|
246 | (Graphs.label -> Joint.joint_fin_step -> Blocks.bind_fin_block) -> __ -> __ |
---|
247 | -> __ -> __ -> 'a1) -> 'a1 |
---|
248 | |
---|
249 | val b_graph_translate_data_inv_rect_Type2 : |
---|
250 | Joint.graph_params -> Joint.graph_params -> AST.ident List.list -> |
---|
251 | b_graph_translate_data -> (__ -> __ -> Nat.nat -> Joint.joint_seq List.list |
---|
252 | -> (Graphs.label -> Joint.joint_step -> Blocks.bind_step_block) -> |
---|
253 | (Graphs.label -> Joint.joint_fin_step -> Blocks.bind_fin_block) -> __ -> __ |
---|
254 | -> __ -> __ -> 'a1) -> 'a1 |
---|
255 | |
---|
256 | val b_graph_translate_data_inv_rect_Type1 : |
---|
257 | Joint.graph_params -> Joint.graph_params -> AST.ident List.list -> |
---|
258 | b_graph_translate_data -> (__ -> __ -> Nat.nat -> Joint.joint_seq List.list |
---|
259 | -> (Graphs.label -> Joint.joint_step -> Blocks.bind_step_block) -> |
---|
260 | (Graphs.label -> Joint.joint_fin_step -> Blocks.bind_fin_block) -> __ -> __ |
---|
261 | -> __ -> __ -> 'a1) -> 'a1 |
---|
262 | |
---|
263 | val b_graph_translate_data_inv_rect_Type0 : |
---|
264 | Joint.graph_params -> Joint.graph_params -> AST.ident List.list -> |
---|
265 | b_graph_translate_data -> (__ -> __ -> Nat.nat -> Joint.joint_seq List.list |
---|
266 | -> (Graphs.label -> Joint.joint_step -> Blocks.bind_step_block) -> |
---|
267 | (Graphs.label -> Joint.joint_fin_step -> Blocks.bind_fin_block) -> __ -> __ |
---|
268 | -> __ -> __ -> 'a1) -> 'a1 |
---|
269 | |
---|
270 | val b_graph_translate_data_jmdiscr : |
---|
271 | Joint.graph_params -> Joint.graph_params -> AST.ident List.list -> |
---|
272 | b_graph_translate_data -> b_graph_translate_data -> __ |
---|
273 | |
---|
274 | val get_first_costlabel : |
---|
275 | Joint.params -> AST.ident List.list -> Joint.joint_closed_internal_function |
---|
276 | -> (CostLabel.costlabel, __) Types.prod |
---|
277 | |
---|
278 | val b_graph_translate_props_rect_Type4 : |
---|
279 | Joint.graph_params -> Joint.graph_params -> AST.ident List.list -> |
---|
280 | b_graph_translate_data -> Registers.register List.list -> |
---|
281 | Joint.joint_closed_internal_function -> |
---|
282 | Joint.joint_closed_internal_function -> (Graphs.label -> Graphs.label |
---|
283 | List.list Types.option) -> (Graphs.label -> Registers.register List.list |
---|
284 | Types.option) -> (__ -> __ -> __ -> __ -> __ -> __ -> __ -> __ -> __ -> __ |
---|
285 | -> __ -> 'a1) -> 'a1 |
---|
286 | |
---|
287 | val b_graph_translate_props_rect_Type5 : |
---|
288 | Joint.graph_params -> Joint.graph_params -> AST.ident List.list -> |
---|
289 | b_graph_translate_data -> Registers.register List.list -> |
---|
290 | Joint.joint_closed_internal_function -> |
---|
291 | Joint.joint_closed_internal_function -> (Graphs.label -> Graphs.label |
---|
292 | List.list Types.option) -> (Graphs.label -> Registers.register List.list |
---|
293 | Types.option) -> (__ -> __ -> __ -> __ -> __ -> __ -> __ -> __ -> __ -> __ |
---|
294 | -> __ -> 'a1) -> 'a1 |
---|
295 | |
---|
296 | val b_graph_translate_props_rect_Type3 : |
---|
297 | Joint.graph_params -> Joint.graph_params -> AST.ident List.list -> |
---|
298 | b_graph_translate_data -> Registers.register List.list -> |
---|
299 | Joint.joint_closed_internal_function -> |
---|
300 | Joint.joint_closed_internal_function -> (Graphs.label -> Graphs.label |
---|
301 | List.list Types.option) -> (Graphs.label -> Registers.register List.list |
---|
302 | Types.option) -> (__ -> __ -> __ -> __ -> __ -> __ -> __ -> __ -> __ -> __ |
---|
303 | -> __ -> 'a1) -> 'a1 |
---|
304 | |
---|
305 | val b_graph_translate_props_rect_Type2 : |
---|
306 | Joint.graph_params -> Joint.graph_params -> AST.ident List.list -> |
---|
307 | b_graph_translate_data -> Registers.register List.list -> |
---|
308 | Joint.joint_closed_internal_function -> |
---|
309 | Joint.joint_closed_internal_function -> (Graphs.label -> Graphs.label |
---|
310 | List.list Types.option) -> (Graphs.label -> Registers.register List.list |
---|
311 | Types.option) -> (__ -> __ -> __ -> __ -> __ -> __ -> __ -> __ -> __ -> __ |
---|
312 | -> __ -> 'a1) -> 'a1 |
---|
313 | |
---|
314 | val b_graph_translate_props_rect_Type1 : |
---|
315 | Joint.graph_params -> Joint.graph_params -> AST.ident List.list -> |
---|
316 | b_graph_translate_data -> Registers.register List.list -> |
---|
317 | Joint.joint_closed_internal_function -> |
---|
318 | Joint.joint_closed_internal_function -> (Graphs.label -> Graphs.label |
---|
319 | List.list Types.option) -> (Graphs.label -> Registers.register List.list |
---|
320 | Types.option) -> (__ -> __ -> __ -> __ -> __ -> __ -> __ -> __ -> __ -> __ |
---|
321 | -> __ -> 'a1) -> 'a1 |
---|
322 | |
---|
323 | val b_graph_translate_props_rect_Type0 : |
---|
324 | Joint.graph_params -> Joint.graph_params -> AST.ident List.list -> |
---|
325 | b_graph_translate_data -> Registers.register List.list -> |
---|
326 | Joint.joint_closed_internal_function -> |
---|
327 | Joint.joint_closed_internal_function -> (Graphs.label -> Graphs.label |
---|
328 | List.list Types.option) -> (Graphs.label -> Registers.register List.list |
---|
329 | Types.option) -> (__ -> __ -> __ -> __ -> __ -> __ -> __ -> __ -> __ -> __ |
---|
330 | -> __ -> 'a1) -> 'a1 |
---|
331 | |
---|
332 | val b_graph_translate_props_inv_rect_Type4 : |
---|
333 | Joint.graph_params -> Joint.graph_params -> AST.ident List.list -> |
---|
334 | b_graph_translate_data -> Registers.register List.list -> |
---|
335 | Joint.joint_closed_internal_function -> |
---|
336 | Joint.joint_closed_internal_function -> (Graphs.label -> Graphs.label |
---|
337 | List.list Types.option) -> (Graphs.label -> Registers.register List.list |
---|
338 | Types.option) -> (__ -> __ -> __ -> __ -> __ -> __ -> __ -> __ -> __ -> __ |
---|
339 | -> __ -> __ -> 'a1) -> 'a1 |
---|
340 | |
---|
341 | val b_graph_translate_props_inv_rect_Type3 : |
---|
342 | Joint.graph_params -> Joint.graph_params -> AST.ident List.list -> |
---|
343 | b_graph_translate_data -> Registers.register List.list -> |
---|
344 | Joint.joint_closed_internal_function -> |
---|
345 | Joint.joint_closed_internal_function -> (Graphs.label -> Graphs.label |
---|
346 | List.list Types.option) -> (Graphs.label -> Registers.register List.list |
---|
347 | Types.option) -> (__ -> __ -> __ -> __ -> __ -> __ -> __ -> __ -> __ -> __ |
---|
348 | -> __ -> __ -> 'a1) -> 'a1 |
---|
349 | |
---|
350 | val b_graph_translate_props_inv_rect_Type2 : |
---|
351 | Joint.graph_params -> Joint.graph_params -> AST.ident List.list -> |
---|
352 | b_graph_translate_data -> Registers.register List.list -> |
---|
353 | Joint.joint_closed_internal_function -> |
---|
354 | Joint.joint_closed_internal_function -> (Graphs.label -> Graphs.label |
---|
355 | List.list Types.option) -> (Graphs.label -> Registers.register List.list |
---|
356 | Types.option) -> (__ -> __ -> __ -> __ -> __ -> __ -> __ -> __ -> __ -> __ |
---|
357 | -> __ -> __ -> 'a1) -> 'a1 |
---|
358 | |
---|
359 | val b_graph_translate_props_inv_rect_Type1 : |
---|
360 | Joint.graph_params -> Joint.graph_params -> AST.ident List.list -> |
---|
361 | b_graph_translate_data -> Registers.register List.list -> |
---|
362 | Joint.joint_closed_internal_function -> |
---|
363 | Joint.joint_closed_internal_function -> (Graphs.label -> Graphs.label |
---|
364 | List.list Types.option) -> (Graphs.label -> Registers.register List.list |
---|
365 | Types.option) -> (__ -> __ -> __ -> __ -> __ -> __ -> __ -> __ -> __ -> __ |
---|
366 | -> __ -> __ -> 'a1) -> 'a1 |
---|
367 | |
---|
368 | val b_graph_translate_props_inv_rect_Type0 : |
---|
369 | Joint.graph_params -> Joint.graph_params -> AST.ident List.list -> |
---|
370 | b_graph_translate_data -> Registers.register List.list -> |
---|
371 | Joint.joint_closed_internal_function -> |
---|
372 | Joint.joint_closed_internal_function -> (Graphs.label -> Graphs.label |
---|
373 | List.list Types.option) -> (Graphs.label -> Registers.register List.list |
---|
374 | Types.option) -> (__ -> __ -> __ -> __ -> __ -> __ -> __ -> __ -> __ -> __ |
---|
375 | -> __ -> __ -> 'a1) -> 'a1 |
---|
376 | |
---|
377 | val b_graph_translate_props_jmdiscr : |
---|
378 | Joint.graph_params -> Joint.graph_params -> AST.ident List.list -> |
---|
379 | b_graph_translate_data -> Registers.register List.list -> |
---|
380 | Joint.joint_closed_internal_function -> |
---|
381 | Joint.joint_closed_internal_function -> (Graphs.label -> Graphs.label |
---|
382 | List.list Types.option) -> (Graphs.label -> Registers.register List.list |
---|
383 | Types.option) -> __ |
---|
384 | |
---|
385 | val pair_swap : ('a1, 'a2) Types.prod -> ('a2, 'a1) Types.prod |
---|
386 | |
---|
387 | val b_graph_translate : |
---|
388 | Joint.graph_params -> Joint.graph_params -> AST.ident List.list -> |
---|
389 | (Registers.register, b_graph_translate_data) Bind_new.bind_new -> |
---|
390 | Joint.joint_closed_internal_function -> |
---|
391 | Joint.joint_closed_internal_function Types.sig0 |
---|
392 | |
---|
393 | val b_graph_transform_program : |
---|
394 | Joint.graph_params -> Joint.graph_params -> (AST.ident List.list -> |
---|
395 | Joint.joint_closed_internal_function -> (Registers.register, |
---|
396 | b_graph_translate_data) Bind_new.bind_new) -> Joint.joint_program -> |
---|
397 | Joint.joint_program |
---|
398 | |
---|
399 | val added_registers : |
---|
400 | Joint.graph_params -> AST.ident List.list -> Joint.joint_internal_function |
---|
401 | -> (Graphs.label -> Registers.register List.list Types.option) -> |
---|
402 | Registers.register List.list |
---|
403 | |
---|