-
Notifications
You must be signed in to change notification settings - Fork 85
/
Copy pathhimmilbeauProgCompScript.sml
72 lines (65 loc) · 1.79 KB
/
himmilbeauProgCompScript.sml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
(*
Auto-generated by Daisy (https://gitlab.mpi-sws.org/AVA/daisy
*)
(* INCLUDES, do not change those *)
open exampleLib;
val _ = new_theory "himmilbeauProgComp";
val _ = translation_extends "cfSupport";
Definition theAST_pre_def:
theAST_pre = \ (x:(string, string) id).
if x = Short "x1" then (((-5)/(1), (5)/(1)):real#real)
else if x = Short "x2" then (((-5)/(1), (5)/(1)):real#real)
else (0,0)
End
Definition theAST_def:
theAST =
[ Dlet unknown_loc (Pvar "himmilbeau")
(Fun "x1"(Fun "x2"
(FpOptimise Opt
(Let (SOME "a")
(App (FP_bop FP_Sub)
[
(App (FP_bop FP_Add)
[
(App (FP_bop FP_Mul)
[
Var (Short "x1");
Var (Short "x1")
]);
Var (Short "x2")
]);
(App FpFromWord [Lit (Word64 (4622382067542392832w:word64))])
])
( (Let (SOME "b")
(App (FP_bop FP_Sub)
[
(App (FP_bop FP_Add)
[
Var (Short "x1");
(App (FP_bop FP_Mul)
[
Var (Short "x2");
Var (Short "x2")
])
]);
(App FpFromWord [Lit (Word64 (4619567317775286272w:word64))])
])
((App (FP_bop FP_Add)
[
(App (FP_bop FP_Mul)
[
Var (Short "a");
Var (Short "a")
]);
(App (FP_bop FP_Mul)
[
Var (Short "b");
Var (Short "b")
])
]))))))))]
End
Definition theErrBound_def:
theErrBound = inv (2 pow (5))
End
val x = define_benchmark theAST_def theAST_pre_def true;
val _ = export_theory()