equal
deleted
inserted
replaced
31 include SIGN_THEORY |
31 include SIGN_THEORY |
32 val begin_theory: string -> theory list -> theory |
32 val begin_theory: string -> theory list -> theory |
33 val end_theory: theory -> theory |
33 val end_theory: theory -> theory |
34 val checkpoint: theory -> theory |
34 val checkpoint: theory -> theory |
35 val copy: theory -> theory |
35 val copy: theory -> theory |
36 val init: theory -> theory |
36 val init_data: theory -> theory |
37 val axiom_space: theory -> NameSpace.T |
37 val axiom_space: theory -> NameSpace.T |
38 val oracle_space: theory -> NameSpace.T |
38 val oracle_space: theory -> NameSpace.T |
39 val axioms_of: theory -> (string * term) list |
39 val axioms_of: theory -> (string * term) list |
40 val all_axioms_of: theory -> (string * term) list |
40 val all_axioms_of: theory -> (string * term) list |
41 val self_ref: theory -> theory_ref |
41 val self_ref: theory -> theory_ref |
133 fun err_dup_axms dups = error ("Duplicate axiom(s): " ^ commas_quote dups); |
133 fun err_dup_axms dups = error ("Duplicate axiom(s): " ^ commas_quote dups); |
134 fun err_dup_oras dups = error ("Duplicate oracle(s): " ^ commas_quote dups); |
134 fun err_dup_oras dups = error ("Duplicate oracle(s): " ^ commas_quote dups); |
135 |
135 |
136 structure ThyData = TheoryDataFun |
136 structure ThyData = TheoryDataFun |
137 (struct |
137 (struct |
138 val name = "Pure/thy"; |
138 val name = "Pure/theory"; |
139 type T = thy; |
139 type T = thy; |
140 val empty = make_thy (NameSpace.empty_table, Defs.empty, NameSpace.empty_table); |
140 val empty = make_thy (NameSpace.empty_table, Defs.empty, NameSpace.empty_table); |
141 val copy = I; |
141 val copy = I; |
142 |
142 |
143 fun extend (Thy {axioms, defs, oracles}) = make_thy (NameSpace.empty_table, defs, oracles); |
143 fun extend (Thy {axioms, defs, oracles}) = make_thy (NameSpace.empty_table, defs, oracles); |
156 in make_thy (axioms, defs, oracles) end; |
156 in make_thy (axioms, defs, oracles) end; |
157 |
157 |
158 fun print _ _ = (); |
158 fun print _ _ = (); |
159 end); |
159 end); |
160 |
160 |
161 val init = ThyData.init; |
161 val init_data = ThyData.init; |
162 |
162 |
163 fun rep_theory thy = ThyData.get thy |> (fn Thy args => args); |
163 fun rep_theory thy = ThyData.get thy |> (fn Thy args => args); |
164 |
164 |
165 fun map_thy f = ThyData.map (fn (Thy {axioms, defs, oracles}) => |
165 fun map_thy f = ThyData.map (fn (Thy {axioms, defs, oracles}) => |
166 make_thy (f (axioms, defs, oracles))); |
166 make_thy (f (axioms, defs, oracles))); |