-
Notifications
You must be signed in to change notification settings - Fork 86
/
n_bodyZmodifiedProgCompScript.sml
101 lines (94 loc) · 3.1 KB
/
n_bodyZmodifiedProgCompScript.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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
(*
Auto-generated by Daisy (https://gitlab.mpi-sws.org/AVA/daisy
*)
(* INCLUDES, do not change those *)
open exampleLib;
val _ = new_theory "n_bodyZmodifiedProgComp";
val _ = translation_extends "cfSupport";
Definition theAST_pre_def:
theAST_pre = \ (x:(string, string) id).
if x = Short "z0" then (((1)/(1000), (1)/(5)):real#real)
else if x = Short "y0" then (((1)/(1000), (6)/(1)):real#real)
else if x = Short "x0" then (((1)/(1000), (6)/(1)):real#real)
else if x = Short "vz0" then (((-1)/(10), (1)/(10)):real#real)
else (0,0)
End
Definition theAST_def:
theAST =
[ Dlet unknown_loc (Pvar "n_bodyZmodified")
(Fun "x0"(Fun "y0"(Fun "z0"(Fun "vz0"
(FpOptimise Opt
(Let (SOME "dt")
(App FpFromWord [Lit (Word64 (4591870180066957722w:word64))])
( (Let (SOME "solarMass")
(App FpFromWord [Lit (Word64 (4630752910647379422w:word64))])
( (Let (SOME "distance")
(App (FP_uop FP_Sqrt)
[
(App (FP_bop FP_Add)
[
(App (FP_bop FP_Add)
[
(App (FP_bop FP_Mul)
[
Var (Short "x0");
Var (Short "x0")
]);
(App (FP_bop FP_Mul)
[
Var (Short "y0");
Var (Short "y0")
])
]);
(App (FP_bop FP_Mul)
[
Var (Short "z0");
Var (Short "z0")
])
])
])
( (Let (SOME "mag")
(App (FP_bop FP_Div)
[
Var (Short "dt");
(App (FP_bop FP_Mul)
[
(App (FP_bop FP_Mul)
[
Var (Short "distance");
Var (Short "distance")
]);
Var (Short "distance")
])
])
( (Let (SOME "vzNew")
(App (FP_bop FP_Sub)
[
Var (Short "vz0");
(App (FP_bop FP_Mul)
[
(App (FP_bop FP_Mul)
[
Var (Short "z0");
Var (Short "solarMass")
]);
Var (Short "mag")
])
])
( (Let (SOME "z_2")
(App (FP_bop FP_Add)
[
Var (Short "z0");
(App (FP_bop FP_Mul)
[
Var (Short "dt");
Var (Short "vzNew")
])
])
(Var (Short "z_2"))))))))))))))))))]
End
Definition theErrBound_def:
theErrBound = inv (2 pow (5))
End
val x = define_benchmark theAST_def theAST_pre_def false;
val _ = export_theory()