Skip to content

Commit afdc9f8

Browse files
changed the implementation to keep the alists and commented out the sptrees implementation
1 parent 7a24fb2 commit afdc9f8

File tree

5 files changed

+20
-41
lines changed

5 files changed

+20
-41
lines changed

hol/policy_to_table/bdd_cake_trans/apply_trans_to_IOLib.sig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ signature apply_trans_to_IOLib =
22
sig
33
include Abbrev
44

5-
val sptrees_gen_bdds_policy_and_table : term * term * term -> (term * term * term)
5+
val gen_bdds_policy_and_table_cake : term * term * term -> (term * term * term)
66
val time_stage : string * Timer.cpu_timer * Timer.real_timer -> {sys: Time.time, usr: Time.time} * Time.time
77

88
end

hol/policy_to_table/bdd_cake_trans/apply_trans_to_IOLib.sml

Lines changed: 5 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -4,23 +4,19 @@ structure apply_trans_to_IOLib :> apply_trans_to_IOLib = struct
44
open HolKernel Parse boolLib bossLib;
55
open optionTheory bdd_sptrees_genTheory pairTheory bdd_genTheory tables_specTheory tables_spec_oldTheory policy_specTheory pred_specTheory;
66

7-
open sptrees_bdd_trans_ProgTheory;
8-
(* open bdd_trans_ProgTheory; *)
7+
open bdd_trans_ProgTheory;
98
open preamble basis ml_translatorLib ;
109

1110
open miscTheory ;
1211
open fromSexpTheory;
1312

1413

15-
val _ = translation_extends "sptrees_bdd_trans_Prog";
16-
(* val _ = translation_extends "bdd_trans_Prog"; *)
14+
val _ = translation_extends "bdd_trans_Prog";
1715

1816

1917

2018
val _ = type_abbrev("action_policy_type", “:((string# num list) action_expr) policy”);
2119

22-
23-
2420
fun time_stage (stage_name, timer_cpu, timer_real) =
2521
let
2622
val cpu_time = Timer.checkCPUTimer timer_cpu
@@ -34,10 +30,7 @@ fun time_stage (stage_name, timer_cpu, timer_real) =
3430
end
3531

3632

37-
38-
39-
40-
fun sptrees_gen_bdds_policy_and_table (var_policy, policy_order, policy_full_order) =
33+
fun gen_bdds_policy_and_table_cake (var_policy, policy_order, policy_full_order) =
4134

4235
let
4336

@@ -61,21 +54,10 @@ End
6154
val r = translate policy_content_test_def;
6255

6356

64-
6557
Definition policy_main_hol4_def:
66-
policy_main_hol4 =
67-
case sp_mk_BDD_policy policy_content_test policy_order_test of
68-
| NONE => NONE
69-
| SOME (r,sp_edges,sp_labels) => SOME (r,
70-
((toSortedAList sp_edges):edges),
71-
((toSortedAList sp_labels): (((string#num list) action_expr) policy, (string#num list) action_expr) labelings) )
72-
End
73-
74-
75-
(* Definition policy_main_hol4_def:
7658
policy_main_hol4 =
7759
mk_BDDPred_opt (policy_structure) (0,[],[(0, non_termn (NONE, policy_content_test))]) [] (policy_order_test) 1n
78-
End *)
60+
End
7961

8062
val r = translate policy_main_hol4_def;
8163

@@ -224,21 +206,10 @@ End
224206
val r = translate table_content_test_def;
225207

226208

227-
Definition table_main_hol4_def:
228-
table_main_hol4 =
229-
case sp_mk_BDD_table table_content_test policy_order_test of
230-
| NONE => NONE
231-
| SOME (r,sp_edges,sp_labels) => SOME (r,
232-
((toSortedAList sp_edges):edges),
233-
((toSortedAList sp_labels): (action_table_type, (string#num list) action_expr) labelings) )
234-
End
235-
236-
237-
(*
238209
Definition table_main_hol4_def:
239210
table_main_hol4 =
240211
mk_BDDPred_opt (table_structure) (0,[],[(0, non_termn (NONE, table_content_test))]) [] (policy_order_test) 1n
241-
End *)
212+
End
242213

243214

244215
val r = translate table_main_hol4_def;

hol/policy_to_table/bdd_cake_trans/sptrees_fwd_proofLib.sig renamed to hol/policy_to_table/bdd_cake_trans/fwd_proof_cakeLib.sig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
signature sptrees_fwd_proofLib =
1+
signature fwd_proof_cakeLib =
22
sig
33
include Abbrev
44

55

6-
val sptrees_convert_arith_policy_to_interval_tables : term * term * term * term * term -> thm
6+
val convert_arith_policy_to_interval_tables_cake : term * term * term * term * term -> thm
77
val time_stage : string * Timer.cpu_timer * Timer.real_timer -> {sys: Time.time, usr: Time.time} * Time.time
88

99

hol/policy_to_table/bdd_cake_trans/sptrees_fwd_proofLib.sml renamed to hol/policy_to_table/bdd_cake_trans/fwd_proof_cakeLib.sml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
structure sptrees_fwd_proofLib :> sptrees_fwd_proofLib = struct
1+
structure fwd_proof_cakeLib :> fwd_proof_cakeLib = struct
22

33

44
open HolKernel boolLib liteLib simpLib Parse bossLib pairLib;
@@ -57,7 +57,7 @@ open apply_trans_to_IOLib;
5757

5858

5959

60-
fun sptrees_convert_arith_policy_to_interval_tables (arith_policy, policy_me, test_pd_type, policy_full_order, policy_order) =
60+
fun convert_arith_policy_to_interval_tables_cake (arith_policy, policy_me, test_pd_type, policy_full_order, policy_order) =
6161

6262
let
6363

@@ -94,7 +94,7 @@ open apply_trans_to_IOLib;
9494
val start_real_total_stage2 = Timer.startRealTimer ();
9595

9696
val (final_policy_bdd, tbl, final_table_bdd) =
97-
apply_trans_to_IOLib.sptrees_gen_bdds_policy_and_table (var_policy, policy_order, policy_full_order);
97+
apply_trans_to_IOLib.gen_bdds_policy_and_table_cake (var_policy, policy_order, policy_full_order);
9898

9999
val _ = time_stage ("Stage 2 TOTAL BEFORE PROOF", start_cpu_total, start_real_total)
100100

hol/policy_to_table/bdd_cake_trans/sptrees_bdd_trans_ProgScript.sml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,18 @@
11
open HolKernel Parse boolLib bossLib;
2+
(*
23
open optionTheory bdd_sptrees_genTheory pairTheory bdd_genTheory tables_specTheory tables_spec_oldTheory policy_specTheory pred_specTheory;
34
open preamble basis ml_translatorLib ;
45
56
open miscTheory ml_translatorTheory ListProgTheory ;
67
open fromSexpTheory;
7-
8+
*)
89

910

1011
val _ = new_theory "sptrees_bdd_trans_Prog";
1112

13+
(*
14+
15+
1216
(*)
1317
val _ = ml_prog_update (open_module "cake_sptrees_bdd_trans_Prog");
1418
*)
@@ -756,6 +760,10 @@ end;
756760
val _ = ml_prog_update (close_module NONE);
757761
*)
758762
763+
764+
765+
*)
766+
759767
val _ = export_theory ();
760768

761769

0 commit comments

Comments
 (0)