forked from CakeML/cakeml
-
Notifications
You must be signed in to change notification settings - Fork 0
/
nonlin2ProgCompScript.sml
54 lines (47 loc) · 1.3 KB
/
nonlin2ProgCompScript.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
(*
Auto-generated by Daisy (https://gitlab.mpi-sws.org/AVA/daisy
*)
(* INCLUDES, do not change those *)
open exampleLib;
val _ = new_theory "nonlin2ProgComp";
val _ = translation_extends "cfSupport";
Definition theAST_pre_def:
theAST_pre = \ (x:(string, string) id).
if x = Short "x" then (((1001)/(1000), (2)/(1)):real#real)
else if x = Short "y" then (((1001)/(1000), (2)/(1)):real#real)
else (0,0)
End
Definition theAST_def:
theAST =
[ Dlet unknown_loc (Pvar "nonlin2")
(Fun "x"(Fun "y"
(FpOptimise Opt
(Let (SOME "t")
(App (FP_bop FP_Mul)
[
Var (Short "x");
Var (Short "y")
])
((App (FP_bop FP_Div)
[
(App (FP_bop FP_Sub)
[
Var (Short "t");
(App FpFromWord [Lit (Word64 (4607182418800017408w:word64))])
]);
(App (FP_bop FP_Sub)
[
(App (FP_bop FP_Mul)
[
Var (Short "t");
Var (Short "t")
]);
(App FpFromWord [Lit (Word64 (4607182418800017408w:word64))])
])
]))))))]
End
Definition theErrBound_def:
theErrBound = inv (2 pow (5))
End
val x = define_benchmark theAST_def theAST_pre_def true;
val _ = export_theory()