source: extracted/eRTLptr.ml @ 2717

Last change on this file since 2717 was 2717, checked in by sacerdot, 7 years ago

Extracted code for the whole compiler.
The space cost model is not there yet.

I have fixed by hand the few extraction problems
(i.e. composed coercions not extracted and type
definitions with wrong syntax).

I have also changed all axioms to be implemented
so that they do not fail at initialization time.

File size: 6.3 KB
RevLine 
[2717]1open Preamble
2
3open String
4
5open Sets
6
7open Listb
8
9open LabelledObjects
10
11open Graphs
12
13open I8051
14
15open Order
16
17open Registers
18
19open BitVectorTrie
20
21open CostLabel
22
23open Hide
24
25open Proper
26
27open PositiveMap
28
29open Deqsets
30
31open ErrorMessages
32
33open PreIdentifiers
34
35open Errors
36
37open Extralib
38
39open Setoids
40
41open Monad
42
43open Option
44
45open Lists
46
47open Identifiers
48
49open Integers
50
51open AST
52
53open Division
54
55open Exp
56
57open Arithmetic
58
59open Extranat
60
61open Vector
62
63open Div_and_mod
64
65open Jmeq
66
67open Russell
68
69open List
70
71open Util
72
73open FoldStuff
74
75open BitVector
76
77open Types
78
79open Bool
80
81open Relations
82
83open Nat
84
85open Hints_declaration
86
87open Core_notation
88
89open Pts
90
91open Logic
92
93open Positive
94
95open Z
96
97open BitVectorZ
98
99open Pointers
100
101open ByteValues
102
103open BackEndOps
104
105open Joint
106
107open ERTL
108
109type ertlptr_seq =
110| Ertlptr_ertl of ERTL.ertl_seq
111| LOW_ADDRESS of Registers.register * Graphs.label
112| HIGH_ADDRESS of Registers.register * Graphs.label
113
114(** val ertlptr_seq_rect_Type4 :
115    (ERTL.ertl_seq -> 'a1) -> (Registers.register -> Graphs.label -> 'a1) ->
116    (Registers.register -> Graphs.label -> 'a1) -> ertlptr_seq -> 'a1 **)
117let rec ertlptr_seq_rect_Type4 h_ertlptr_ertl h_LOW_ADDRESS h_HIGH_ADDRESS = function
118| Ertlptr_ertl x_17955 -> h_ertlptr_ertl x_17955
119| LOW_ADDRESS (x_17957, x_17956) -> h_LOW_ADDRESS x_17957 x_17956
120| HIGH_ADDRESS (x_17959, x_17958) -> h_HIGH_ADDRESS x_17959 x_17958
121
122(** val ertlptr_seq_rect_Type5 :
123    (ERTL.ertl_seq -> 'a1) -> (Registers.register -> Graphs.label -> 'a1) ->
124    (Registers.register -> Graphs.label -> 'a1) -> ertlptr_seq -> 'a1 **)
125let rec ertlptr_seq_rect_Type5 h_ertlptr_ertl h_LOW_ADDRESS h_HIGH_ADDRESS = function
126| Ertlptr_ertl x_17964 -> h_ertlptr_ertl x_17964
127| LOW_ADDRESS (x_17966, x_17965) -> h_LOW_ADDRESS x_17966 x_17965
128| HIGH_ADDRESS (x_17968, x_17967) -> h_HIGH_ADDRESS x_17968 x_17967
129
130(** val ertlptr_seq_rect_Type3 :
131    (ERTL.ertl_seq -> 'a1) -> (Registers.register -> Graphs.label -> 'a1) ->
132    (Registers.register -> Graphs.label -> 'a1) -> ertlptr_seq -> 'a1 **)
133let rec ertlptr_seq_rect_Type3 h_ertlptr_ertl h_LOW_ADDRESS h_HIGH_ADDRESS = function
134| Ertlptr_ertl x_17973 -> h_ertlptr_ertl x_17973
135| LOW_ADDRESS (x_17975, x_17974) -> h_LOW_ADDRESS x_17975 x_17974
136| HIGH_ADDRESS (x_17977, x_17976) -> h_HIGH_ADDRESS x_17977 x_17976
137
138(** val ertlptr_seq_rect_Type2 :
139    (ERTL.ertl_seq -> 'a1) -> (Registers.register -> Graphs.label -> 'a1) ->
140    (Registers.register -> Graphs.label -> 'a1) -> ertlptr_seq -> 'a1 **)
141let rec ertlptr_seq_rect_Type2 h_ertlptr_ertl h_LOW_ADDRESS h_HIGH_ADDRESS = function
142| Ertlptr_ertl x_17982 -> h_ertlptr_ertl x_17982
143| LOW_ADDRESS (x_17984, x_17983) -> h_LOW_ADDRESS x_17984 x_17983
144| HIGH_ADDRESS (x_17986, x_17985) -> h_HIGH_ADDRESS x_17986 x_17985
145
146(** val ertlptr_seq_rect_Type1 :
147    (ERTL.ertl_seq -> 'a1) -> (Registers.register -> Graphs.label -> 'a1) ->
148    (Registers.register -> Graphs.label -> 'a1) -> ertlptr_seq -> 'a1 **)
149let rec ertlptr_seq_rect_Type1 h_ertlptr_ertl h_LOW_ADDRESS h_HIGH_ADDRESS = function
150| Ertlptr_ertl x_17991 -> h_ertlptr_ertl x_17991
151| LOW_ADDRESS (x_17993, x_17992) -> h_LOW_ADDRESS x_17993 x_17992
152| HIGH_ADDRESS (x_17995, x_17994) -> h_HIGH_ADDRESS x_17995 x_17994
153
154(** val ertlptr_seq_rect_Type0 :
155    (ERTL.ertl_seq -> 'a1) -> (Registers.register -> Graphs.label -> 'a1) ->
156    (Registers.register -> Graphs.label -> 'a1) -> ertlptr_seq -> 'a1 **)
157let rec ertlptr_seq_rect_Type0 h_ertlptr_ertl h_LOW_ADDRESS h_HIGH_ADDRESS = function
158| Ertlptr_ertl x_18000 -> h_ertlptr_ertl x_18000
159| LOW_ADDRESS (x_18002, x_18001) -> h_LOW_ADDRESS x_18002 x_18001
160| HIGH_ADDRESS (x_18004, x_18003) -> h_HIGH_ADDRESS x_18004 x_18003
161
162(** val ertlptr_seq_inv_rect_Type4 :
163    ertlptr_seq -> (ERTL.ertl_seq -> __ -> 'a1) -> (Registers.register ->
164    Graphs.label -> __ -> 'a1) -> (Registers.register -> Graphs.label -> __
165    -> 'a1) -> 'a1 **)
166let ertlptr_seq_inv_rect_Type4 hterm h1 h2 h3 =
167  let hcut = ertlptr_seq_rect_Type4 h1 h2 h3 hterm in hcut __
168
169(** val ertlptr_seq_inv_rect_Type3 :
170    ertlptr_seq -> (ERTL.ertl_seq -> __ -> 'a1) -> (Registers.register ->
171    Graphs.label -> __ -> 'a1) -> (Registers.register -> Graphs.label -> __
172    -> 'a1) -> 'a1 **)
173let ertlptr_seq_inv_rect_Type3 hterm h1 h2 h3 =
174  let hcut = ertlptr_seq_rect_Type3 h1 h2 h3 hterm in hcut __
175
176(** val ertlptr_seq_inv_rect_Type2 :
177    ertlptr_seq -> (ERTL.ertl_seq -> __ -> 'a1) -> (Registers.register ->
178    Graphs.label -> __ -> 'a1) -> (Registers.register -> Graphs.label -> __
179    -> 'a1) -> 'a1 **)
180let ertlptr_seq_inv_rect_Type2 hterm h1 h2 h3 =
181  let hcut = ertlptr_seq_rect_Type2 h1 h2 h3 hterm in hcut __
182
183(** val ertlptr_seq_inv_rect_Type1 :
184    ertlptr_seq -> (ERTL.ertl_seq -> __ -> 'a1) -> (Registers.register ->
185    Graphs.label -> __ -> 'a1) -> (Registers.register -> Graphs.label -> __
186    -> 'a1) -> 'a1 **)
187let ertlptr_seq_inv_rect_Type1 hterm h1 h2 h3 =
188  let hcut = ertlptr_seq_rect_Type1 h1 h2 h3 hterm in hcut __
189
190(** val ertlptr_seq_inv_rect_Type0 :
191    ertlptr_seq -> (ERTL.ertl_seq -> __ -> 'a1) -> (Registers.register ->
192    Graphs.label -> __ -> 'a1) -> (Registers.register -> Graphs.label -> __
193    -> 'a1) -> 'a1 **)
194let ertlptr_seq_inv_rect_Type0 hterm h1 h2 h3 =
195  let hcut = ertlptr_seq_rect_Type0 h1 h2 h3 hterm in hcut __
196
197(** val ertlptr_seq_discr : ertlptr_seq -> ertlptr_seq -> __ **)
198let ertlptr_seq_discr x y =
199  Logic.eq_rect_Type2 x
200    (match x with
201     | Ertlptr_ertl a0 -> Obj.magic (fun _ dH -> dH __)
202     | LOW_ADDRESS (a0, a1) -> Obj.magic (fun _ dH -> dH __ __)
203     | HIGH_ADDRESS (a0, a1) -> Obj.magic (fun _ dH -> dH __ __)) y
204
205(** val ertlptr_seq_jmdiscr : ertlptr_seq -> ertlptr_seq -> __ **)
206let ertlptr_seq_jmdiscr x y =
207  Logic.eq_rect_Type2 x
208    (match x with
209     | Ertlptr_ertl a0 -> Obj.magic (fun _ dH -> dH __)
210     | LOW_ADDRESS (a0, a1) -> Obj.magic (fun _ dH -> dH __ __)
211     | HIGH_ADDRESS (a0, a1) -> Obj.magic (fun _ dH -> dH __ __)) y
212
213(** val eRTLptr_uns : Joint.unserialized_params **)
214let eRTLptr_uns =
215  { Joint.ext_seq_labels = (fun s ->
216    match Obj.magic s with
217    | Ertlptr_ertl x -> List.Nil
218    | LOW_ADDRESS (x, l) -> List.Cons (l, List.Nil)
219    | HIGH_ADDRESS (x, l) -> List.Cons (l, List.Nil)); Joint.has_tailcalls =
220    Bool.False }
221
222(** val eRTLptr : Joint.graph_params **)
223let eRTLptr =
224  eRTLptr_uns
225
226type ertlptr_program = Joint.joint_program
227
228(** val ertlptr_seq_joint : AST.ident List.list -> __ -> Joint.joint_seq **)
229let ertlptr_seq_joint =
230  Obj.magic (fun _ x -> Joint.Extension_seq x)
231
Note: See TracBrowser for help on using the repository browser.