-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathAutoCorresAttributes.thy
78 lines (65 loc) · 2.35 KB
/
AutoCorresAttributes.thy
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
(*
* Copyright 2014, NICTA
*
* This software may be distributed and modified according to the terms of
* the BSD 2-Clause license. Note that NO WARRANTY is provided.
* See "LICENSE_BSD2.txt" for details.
*
* @TAG(NICTA_BSD)
*)
theory AutoCorresAttributes
imports "~~/src/HOL/Main"
begin
ML_file "attributes.ML"
attribute_setup L1opt = {*
Attrib.add_del
(Thm.declaration_attribute L1PeepholeThms.add_thm)
(Thm.declaration_attribute L1PeepholeThms.del_thm) *}
"Peephole optimisations carried out after L1 SIMPL to monadic conversion."
attribute_setup L1unfold = {*
Attrib.add_del
(Thm.declaration_attribute L1UnfoldThms.add_thm)
(Thm.declaration_attribute L1UnfoldThms.del_thm) *}
"Definitions unfolded prior to L1 SIMPL to monadic conversion."
attribute_setup L1except = {*
Attrib.add_del
(Thm.declaration_attribute L1ExceptionThms.add_thm)
(Thm.declaration_attribute L1ExceptionThms.del_thm) *}
"Definitions used to rewrite control flow to reduce exception usage."
attribute_setup L2opt = {*
Attrib.add_del
(Thm.declaration_attribute L2PeepholeThms.add_thm)
(Thm.declaration_attribute L2PeepholeThms.del_thm) *}
"Peephole optimisations carried out after L2 monadic conversion."
attribute_setup L2unfold = {*
Attrib.add_del
(Thm.declaration_attribute L2UnfoldThms.add_thm)
(Thm.declaration_attribute L2UnfoldThms.del_thm) *}
"Definitions unfolded prior to L2 monadic conversion from L1."
attribute_setup heap_abs = {*
Attrib.add_del
(Thm.declaration_attribute HeapAbsThms.add_thm)
(Thm.declaration_attribute HeapAbsThms.del_thm) *}
"Heap abstraction rules."
attribute_setup heap_abs_fo = {*
Attrib.add_del
(Thm.declaration_attribute HeapAbsFOThms.add_thm)
(Thm.declaration_attribute HeapAbsFOThms.del_thm) *}
"First-order Heap abstraction rules."
attribute_setup word_abs = {*
Attrib.add_del
(Thm.declaration_attribute WordAbsThms.add_thm)
(Thm.declaration_attribute WordAbsThms.del_thm) *}
"Word abstraction rules."
attribute_setup polish = {*
Attrib.add_del
(Thm.declaration_attribute PolishSimps.add_thm)
(Thm.declaration_attribute PolishSimps.del_thm) *}
"Final simplification rules."
(* Set up the ts_rule attribute. *)
ML_file "monad_types.ML"
setup {*
Attrib.setup (Binding.name "ts_rule") Monad_Types.ts_attrib
"AutoCorres type strengthening rule"
*}
end