Walther@60605
|
1 |
(* Title: Specify/pre-conds.sml
|
walther@59960
|
2 |
Author: Walther Neuper 110226
|
Walther@60705
|
3 |
(c) due to copyrigh,t terms
|
walther@59960
|
4 |
*)
|
walther@59960
|
5 |
|
walther@59960
|
6 |
signature PRE_CONDITIONS =
|
walther@59960
|
7 |
sig
|
walther@59963
|
8 |
type T
|
Walther@60605
|
9 |
type unchecked
|
Walther@60741
|
10 |
type unchecked_pos
|
Walther@60705
|
11 |
type checked
|
Walther@60741
|
12 |
type checked_pos
|
Walther@60705
|
13 |
|
Walther@60705
|
14 |
type env_subst
|
Walther@60705
|
15 |
type env_eval
|
Walther@60556
|
16 |
type input
|
Walther@60705
|
17 |
|
Walther@60673
|
18 |
val to_string : Proof.context -> T -> string
|
Walther@60740
|
19 |
val eval: Proof.context -> Rule_Set.T -> bool * term -> bool * term
|
walther@59967
|
20 |
|
Walther@60734
|
21 |
val max_variant: Model_Def.i_model -> Model_Def.variant
|
Walther@60733
|
22 |
val environment_TEST: Model_Pattern.T -> Model_Def.i_model_TEST -> Env.T
|
Walther@60705
|
23 |
|
Walther@60756
|
24 |
val make_environments: Model_Pattern.T -> Model_Def.i_model_TEST -> Env.T * (env_subst * env_eval)
|
Walther@60747
|
25 |
val make_envs_preconds: (Model_Pattern.single * Model_Def.i_model_single_TEST) list ->
|
Walther@60747
|
26 |
((term * term) * (term * term)) list
|
Walther@60740
|
27 |
|
Walther@60741
|
28 |
val check_pos: Proof.context -> Rule_Set.T -> unchecked_pos ->
|
Walther@60741
|
29 |
Model_Pattern.T * Model_Def.i_model_TEST -> checked_pos
|
Walther@60756
|
30 |
val check_internal: Proof.context -> Model_Def.i_model_TEST -> (Pos.pos_ * References_Def.id)
|
Walther@60756
|
31 |
-> checked
|
Walther@60741
|
32 |
val check_envs: Proof.context -> Rule_Set.T -> unchecked -> Env.T * (env_subst * env_eval)
|
Walther@60732
|
33 |
-> checked
|
Walther@60741
|
34 |
val check: Proof.context -> Rule_Set.T -> unchecked ->
|
Walther@60706
|
35 |
Model_Pattern.T * Model_Def.i_model_TEST -> checked
|
Walther@60706
|
36 |
|
Walther@60756
|
37 |
(*/----- from isac_test for Minisubpbl*)
|
Walther@60706
|
38 |
val get_equal_descr: Model_Def.i_model_TEST -> Model_Pattern.single ->
|
Walther@60706
|
39 |
(Model_Pattern.single * Model_Def.i_model_single_TEST) list
|
Walther@60706
|
40 |
val unchecked_OLD_to_TEST: term list -> (term * Position.T) list
|
Walther@60705
|
41 |
|
Walther@60710
|
42 |
val all_lhs_atoms: term list -> bool
|
Walther@60766
|
43 |
val handle_lists: term -> Model_Def.values -> Env.T
|
Walther@60740
|
44 |
val filter_variants': Model_Def.i_model_TEST -> Model_Def.variant -> Model_Def.i_model_TEST
|
Walther@60741
|
45 |
val switch_type: Model_Def.descriptor -> term list -> Model_Def.descriptor;
|
Walther@60728
|
46 |
val discern_feedback: term -> Model_Def.i_model_feedback_TEST ->
|
Walther@60728
|
47 |
((term * term) * (term * term)) list
|
Walther@60766
|
48 |
val discern_typ: term -> Model_Def.descriptor * term list ->
|
Walther@60728
|
49 |
((term * term) * (term * term)) list
|
Walther@60710
|
50 |
|
Walther@60740
|
51 |
val mk_env_model: term -> Model_Def.i_model_feedback_TEST -> Env.T
|
Walther@60740
|
52 |
val make_env_model: (Model_Pattern.single * Model_Def.i_model_single_TEST) list -> Env.T
|
Walther@60740
|
53 |
|
Walther@60767
|
54 |
val get_values: Model_Def.i_model_feedback_TEST -> Model_Def.values
|
Walther@60747
|
55 |
val get_descr_vnt: Model_Def.descriptor -> Model_Def.variants -> Model_Def.i_model_TEST ->
|
Walther@60747
|
56 |
Model_Def.i_model_single_TEST
|
Walther@60747
|
57 |
val get_descr_vnt': Model_Def.i_model_feedback_TEST -> Model_Def.variants -> O_Model.T ->
|
Walther@60749
|
58 |
O_Model.T
|
Walther@60756
|
59 |
(*\----- from isac_test for Minisubpbl*)
|
Walther@60747
|
60 |
|
Walther@60747
|
61 |
\<^isac_test>\<open>
|
Walther@60740
|
62 |
(**)
|
wenzelm@60223
|
63 |
\<close>
|
walther@59960
|
64 |
end
|
Walther@60722
|
65 |
|
walther@59965
|
66 |
(**)
|
walther@59960
|
67 |
structure Pre_Conds(**) : PRE_CONDITIONS(**) =
|
walther@59960
|
68 |
struct
|
walther@59965
|
69 |
(**)
|
Walther@60706
|
70 |
open Model_Def
|
walther@59960
|
71 |
|
Walther@60673
|
72 |
type T = Pre_Conds_Def.T; (*= (bool * term) list;*)
|
Walther@60605
|
73 |
type unchecked = term list
|
Walther@60741
|
74 |
type unchecked_pos = (term * Position.T) list
|
Walther@60705
|
75 |
type checked = bool * (bool * term) list
|
Walther@60741
|
76 |
type checked_pos = bool * ((bool * (term * Position.T)) list)
|
Walther@60705
|
77 |
|
Walther@60715
|
78 |
(*
|
Walther@60715
|
79 |
we have three kinds of Env.T in the specification-phase:
|
Walther@60758
|
80 |
(*1*) Env.T produced by Pre_Conds.make_environments and required to create I_Model.T from
|
Walther@60715
|
81 |
Model_Pattern.T.
|
Walther@60715
|
82 |
Env.T / (Constants, fixes) in Model_Pattern.T
|
Walther@60715
|
83 |
e.g.[(fixes, [r = 7])] |
|
Walther@60722
|
84 |
> (Constants, [<r = 7>]) in O/I_Model.T *)
|
Walther@60715
|
85 |
|
Walther@60715
|
86 |
(*2*) type env_subst = Env.T (* / 0 < fixes in Problem.{where_, ...}
|
Walther@60715
|
87 |
eg. [(fixes, r)] |
|
Walther@60715
|
88 |
> 0 < r *)
|
Walther@60715
|
89 |
(*3*) type env_eval = Env.T (* |
|
Walther@60715
|
90 |
eg. [(r, 7)] |
|
Walther@60715
|
91 |
> 0 < 7 \<longrightarrow> true
|
Walther@60715
|
92 |
|
Walther@60715
|
93 |
(*1*) is required to produce (*2*) and (*3*); thus respective code is shifted to Pre_Conds.
|
Walther@60758
|
94 |
(*2*) and (*3*) are produced from Pre_Conds.make_environments by restricting to "#Given".
|
Walther@60715
|
95 |
|
Walther@60715
|
96 |
There is a typing problem, probably to be solved by a language for Specification in the future:
|
Walther@60715
|
97 |
term <fixes> in (*1*) has type "bool list"
|
Walther@60715
|
98 |
term <fixes> in (*2*) has type "real". So for the transition from (*1*) to (*2..3*)
|
Walther@60715
|
99 |
fun switch_type is required.
|
Walther@60715
|
100 |
The transition requires better modelling by a novel language for Specification.
|
Walther@60715
|
101 |
*)
|
Walther@60715
|
102 |
|
Walther@60605
|
103 |
type input = TermC.as_string list;
|
walther@59963
|
104 |
|
Walther@60756
|
105 |
|
Walther@60740
|
106 |
(** tools **)
|
Walther@60740
|
107 |
|
Walther@60675
|
108 |
fun to_str ctxt (b, t) = pair2str (bool2str b, UnparseC.term ctxt t);
|
Walther@60673
|
109 |
fun to_string ctxt pres = strs2str' (map (linefeed o (to_str ctxt)) pres);
|
walther@59960
|
110 |
|
Walther@60590
|
111 |
fun eval _ _ (false, where_) = (false, where_) (*NOT ALL Free's have been substituted*)
|
Walther@60590
|
112 |
| eval ctxt where_rls (true, where_) =
|
Walther@60590
|
113 |
if Rewrite.eval_true ctxt [where_] where_rls
|
Walther@60706
|
114 |
then (true, where_)
|
Walther@60706
|
115 |
else (false, where_);
|
walther@59960
|
116 |
|
Walther@60712
|
117 |
|
Walther@60740
|
118 |
(** find the maximal variant within an I_Model.T **)
|
Walther@60705
|
119 |
|
Walther@60740
|
120 |
(* old code before I_Model.T_TEST *)
|
Walther@60740
|
121 |
(*ATTENTION: misses variants with equal number of items, etc*)
|
Walther@60705
|
122 |
fun cnt itms v = (v, (length o (filter (curry op = v)) o flat o (map (fn (_, vrs, _, _, _) => vrs))) itms);
|
Walther@60705
|
123 |
fun count_variants vts itms = map (cnt itms) vts;
|
Walther@60705
|
124 |
|
Walther@60734
|
125 |
fun max_list [] = raise ERROR "max_list of []"
|
Walther@60734
|
126 |
| max_list (y :: ys) =
|
Walther@60705
|
127 |
let
|
Walther@60747
|
128 |
fun mx (a, x) [] = (a, x)
|
Walther@60705
|
129 |
| mx (a, x) ((b, y) :: ys) = if x < y then mx (b, y) ys else mx (a, x) ys;
|
Walther@60705
|
130 |
in mx y ys end;
|
Walther@60705
|
131 |
|
Walther@60740
|
132 |
(*find most frequent variant v in itms*)
|
Walther@60740
|
133 |
fun variants itms = ((distinct op =) o flat o (map (fn (_, vrs, _, _, _) => vrs))) itms;
|
Walther@60758
|
134 |
(*find the variant with most items already input, without Pre_Conds (make_environments)*)
|
Walther@60747
|
135 |
(*T_TESTold \<rightarrow> fun max_variants*)
|
Walther@60705
|
136 |
fun max_variant itms =
|
Walther@60705
|
137 |
let val vts = (count_variants (variants itms)) itms;
|
Walther@60734
|
138 |
in if vts = [] then 0 else (fst o max_list) vts end;
|
Walther@60705
|
139 |
|
Walther@60706
|
140 |
fun get_equal_descr i_model (m_patt_single as (_, (descr, _))) =
|
Walther@60706
|
141 |
let
|
Walther@60760
|
142 |
val equal_descr =
|
Walther@60767
|
143 |
filter (fn i_single => case get_descr_opt i_single of
|
Walther@60706
|
144 |
NONE => false (*--------vvvvv*)
|
Walther@60760
|
145 |
| SOME descr' => descr' = descr) i_model
|
Walther@60706
|
146 |
in
|
Walther@60760
|
147 |
(map (pair m_patt_single) equal_descr)
|
Walther@60706
|
148 |
end
|
Walther@60712
|
149 |
|
Walther@60766
|
150 |
fun get_values (Cor_TEST (_, values)) = values
|
Walther@60766
|
151 |
| get_values (Inc_TEST (_, values)) = values
|
Walther@60766
|
152 |
| get_values (Sup_TEST (_, values)) = values
|
Walther@60767
|
153 |
| get_values _ = raise ERROR "get_descr from item without this description"
|
Walther@60763
|
154 |
|
Walther@60760
|
155 |
(*
|
Walther@60760
|
156 |
get an appropriate (description, variant)-item from i_model, otherwise return empty item,
|
Walther@60760
|
157 |
i.e. this function produces items with Sup.
|
Walther@60760
|
158 |
*)
|
Walther@60747
|
159 |
fun get_descr_vnt descr vnts i_model =
|
Walther@60747
|
160 |
let
|
Walther@60767
|
161 |
val equal_descr = filter (fn (_, _, _, _, (feedb, _)) => case get_dscr_opt feedb of NONE => false
|
Walther@60747
|
162 |
| SOME descr' => if descr = descr' then true else false) i_model
|
Walther@60747
|
163 |
in
|
Walther@60749
|
164 |
case filter (fn (_, vnts', _, _, _) => inter op= vnts' vnts <> []) equal_descr of
|
Walther@60749
|
165 |
[] => (0, [], false, "i_model_empty", (Sup_TEST (descr, []), Position.none))
|
Walther@60749
|
166 |
| items => Library.the_single items (*only applied to model_patt, which has each descr once*)
|
Walther@60747
|
167 |
end
|
Walther@60747
|
168 |
(*
|
Walther@60747
|
169 |
get an appropriate (description, variant) item from o_model;
|
Walther@60747
|
170 |
called in case of item in met_imod is_empty_single_TEST
|
Walther@60747
|
171 |
(i.e. was not transferred pbl_mod by \<open>fun get_descr_vnt\<close>).
|
Walther@60747
|
172 |
*)
|
Walther@60747
|
173 |
fun get_descr_vnt' feedb vnts o_model =
|
Walther@60753
|
174 |
filter (fn (_, vnts', _, descr', _) =>
|
Walther@60767
|
175 |
case get_dscr_opt feedb of
|
Walther@60753
|
176 |
SOME descr => if descr' = descr andalso inter op= vnts' vnts <> [] then true else false
|
Walther@60753
|
177 |
| NONE => false) o_model
|
Walther@60747
|
178 |
|
Walther@60740
|
179 |
(* all_lhs_atoms: term list -> bool*)
|
Walther@60740
|
180 |
fun all_lhs_atoms ts = fold (curry and_) (map (fn t =>
|
Walther@60740
|
181 |
if can TermC.lhs t andalso not (TermC.is_num (TermC.lhs t))
|
Walther@60740
|
182 |
then TermC.is_atom (TermC.lhs t)
|
Walther@60740
|
183 |
else false) ts) true
|
Walther@60706
|
184 |
|
Walther@60769
|
185 |
fun handle_lists id values = [(id, values_to_present values)]
|
Walther@60726
|
186 |
|
Walther@60750
|
187 |
fun mk_env_model _ (Model_Def.Cor_TEST (_, [])) = []
|
Walther@60766
|
188 |
| mk_env_model id (Model_Def.Cor_TEST (_, ts)) = handle_lists id ts
|
Walther@60722
|
189 |
| mk_env_model _ (Model_Def.Syn_TEST _) = [] (*TODO handle correct list elements*)
|
Walther@60750
|
190 |
| mk_env_model _ (Model_Def.Inc_TEST (_, [])) = []
|
Walther@60766
|
191 |
| mk_env_model id (Model_Def.Inc_TEST (_, ts)) = handle_lists id ts
|
Walther@60722
|
192 |
| mk_env_model _ (Model_Def.Sup_TEST _) = []
|
Walther@60722
|
193 |
fun make_env_model equal_descr_pairs =
|
Walther@60721
|
194 |
map (fn ((_, (_, id)), (_, _, _, _, (feedb, _)))
|
Walther@60722
|
195 |
=> (mk_env_model id feedb)) equal_descr_pairs
|
Walther@60721
|
196 |
|> flat
|
Walther@60722
|
197 |
|
Walther@60741
|
198 |
fun switch_type descr [] = descr
|
Walther@60741
|
199 |
| switch_type (Free (id_string, _)) ts =
|
Walther@60724
|
200 |
Free (id_string, ts |> hd |> TermC.lhs |> type_of)
|
Walther@60741
|
201 |
| switch_type descr _ = raise ERROR ("switch_type undefined argument " ^
|
Walther@60722
|
202 |
quote (UnparseC.term (ContextC.for_ERROR ()) descr))
|
Walther@60740
|
203 |
|
Walther@60729
|
204 |
fun discern_typ _ (_, []) = []
|
Walther@60729
|
205 |
| discern_typ id (descr, ts) =
|
Walther@60729
|
206 |
(*TODO.md "review (descriptor, ts)" REMOVE--------------------------------------\*)
|
Walther@60729
|
207 |
let
|
Walther@60766
|
208 |
val ts = if Model_Def.is_list_descr descr
|
Walther@60729
|
209 |
then if TermC.is_list (hd ts)
|
Walther@60729
|
210 |
then ts |> map TermC.isalist2list |> flat
|
Walther@60729
|
211 |
else ts
|
Walther@60729
|
212 |
else ts
|
Walther@60729
|
213 |
in
|
Walther@60729
|
214 |
(*TODO.md "review (descriptor, ts)" REMOVE--------------------------------------/*)
|
Walther@60729
|
215 |
if Model_Pattern.typ_of_element descr = HOLogic.boolT andalso all_lhs_atoms ts
|
Walther@60729
|
216 |
then
|
Walther@60729
|
217 |
if length ts > 1
|
Walther@60729
|
218 |
then (writeln "model items of type 'bool' in lists with 'lengt ts > 1' NOT YET IMPLEMENTED";
|
Walther@60729
|
219 |
[])
|
Walther@60741
|
220 |
else [((switch_type id ts, TermC.lhs (hd ts)),
|
Walther@60729
|
221 |
(TermC.lhs (hd ts), TermC.rhs (hd ts)))]
|
Walther@60729
|
222 |
else []
|
Walther@60729
|
223 |
(*TODO.md "review (descriptor, ts)" REMOVE--------------------------------------\*)
|
Walther@60729
|
224 |
end
|
Walther@60729
|
225 |
(*TODO.md "review (descriptor, ts)" REMOVE--------------------------------------/*)
|
Walther@60729
|
226 |
(*T_TESTnew*)
|
Walther@60729
|
227 |
|
Walther@60750
|
228 |
fun discern_feedback id (Model_Def.Cor_TEST (descr, ts)) = discern_typ id (descr, ts)
|
Walther@60722
|
229 |
| discern_feedback _ (Model_Def.Syn_TEST _) = [] (*TODO: handle correct elements*)
|
Walther@60750
|
230 |
| discern_feedback id (Model_Def.Inc_TEST (descr, ts)) = discern_typ id (descr, ts)
|
Walther@60722
|
231 |
| discern_feedback _ (Model_Def.Sup_TEST _) = []
|
Walther@60728
|
232 |
fun make_envs_preconds equal_givens =
|
Walther@60722
|
233 |
map (fn ((_, (_, id)), (_, _, _, _, (feedb, _))) => discern_feedback id feedb) equal_givens
|
Walther@60722
|
234 |
|> flat
|
Walther@60721
|
235 |
|
Walther@60756
|
236 |
fun make_environments model_patt i_model =
|
Walther@60756
|
237 |
let
|
Walther@60756
|
238 |
val equal_descr_pairs = map (get_equal_descr i_model) model_patt
|
Walther@60756
|
239 |
|> flat
|
Walther@60756
|
240 |
val env_model = make_env_model equal_descr_pairs
|
Walther@60756
|
241 |
val equal_givens = filter (fn ((m_field, _), _) => m_field = "#Given") equal_descr_pairs
|
Walther@60756
|
242 |
val subst_eval_list = make_envs_preconds equal_givens
|
Walther@60756
|
243 |
val (env_subst, env_eval) = split_list subst_eval_list
|
Walther@60756
|
244 |
in
|
Walther@60756
|
245 |
(env_model, (env_subst, env_eval))
|
Walther@60756
|
246 |
end
|
Walther@60756
|
247 |
|
Walther@60756
|
248 |
fun check_internal ctxt i_model (pbl_met, id) =
|
Walther@60756
|
249 |
let
|
Walther@60756
|
250 |
val (model, where_rls, where_) = case pbl_met of
|
Walther@60756
|
251 |
Pos.Pbl => let val {model, where_rls, where_, ...} = Problem.from_store ctxt id
|
Walther@60756
|
252 |
in (model, where_rls, where_) end
|
Walther@60756
|
253 |
| Pos.Met => let val {model, where_rls, where_, ...} = MethodC.from_store ctxt id
|
Walther@60756
|
254 |
in (model, where_rls, where_) end
|
Walther@60756
|
255 |
| _ => raise ERROR ("Pre_Conds.check_internal calles with " ^ Pos.pos_2str pbl_met)
|
Walther@60766
|
256 |
val (env_model, (env_subst, env_eval)) = make_environments model
|
Walther@60756
|
257 |
((*filter (fn (_, _, _, m_field ,_) => m_field = "#Given")*) i_model)
|
Walther@60756
|
258 |
|
Walther@60756
|
259 |
val pres_subst = map (TermC.subst_atomic_all env_subst) where_;
|
Walther@60756
|
260 |
val pres_subst_other = map (TermC.subst_atomic_all env_model) (map #2 pres_subst);
|
Walther@60756
|
261 |
val full_subst = if env_eval = [] then pres_subst_other
|
Walther@60756
|
262 |
else map (TermC.subst_atomic_all env_eval) (map #2 pres_subst_other)
|
Walther@60756
|
263 |
val evals = map (eval ctxt where_rls) full_subst
|
Walther@60756
|
264 |
in
|
Walther@60756
|
265 |
(foldl and_ (true, map fst evals), pres_subst_other)
|
Walther@60756
|
266 |
end;
|
Walther@60756
|
267 |
|
Walther@60758
|
268 |
(*extract one environment rom make_environments *)
|
Walther@60758
|
269 |
fun environment_TEST model_patt i_model = make_environments model_patt i_model |> #1
|
Walther@60740
|
270 |
|
Walther@60712
|
271 |
(** check pre-conditions **)
|
Walther@60732
|
272 |
fun check_pos ctxt where_rls where_POS (model_patt, i_model) =
|
Walther@60732
|
273 |
let
|
Walther@60758
|
274 |
val (_, (_, env_eval)) = make_environments model_patt
|
Walther@60732
|
275 |
(filter (fn (_, _, _, m_field ,_) => m_field = "#Given") i_model)
|
Walther@60732
|
276 |
val full_subst = if env_eval = []
|
Walther@60732
|
277 |
then map (fn (t, pos) => ((true, t), pos)) where_POS
|
Walther@60732
|
278 |
else map (fn (t, pos) => (TermC.subst_atomic_all env_eval t, pos)) where_POS;
|
Walther@60732
|
279 |
val evals = map (fn ((bool_t), pos) => (eval ctxt where_rls bool_t, pos)) full_subst;
|
Walther@60732
|
280 |
val display = map (fn ((t, pos), ((bool, _), _)) => (bool, (t, pos))) (where_POS ~~ evals)
|
Walther@60732
|
281 |
in
|
Walther@60732
|
282 |
(foldl and_ (true, map (fn ((bool, _: term), _: Position.T) => bool) evals), display)
|
Walther@60732
|
283 |
end;
|
Walther@60732
|
284 |
|
Walther@60758
|
285 |
(*takes the envs resulting from make_environments*)
|
Walther@60741
|
286 |
fun check_envs ctxt where_rls where_ (env_model, (env_subst, env_eval)) =
|
Walther@60727
|
287 |
let
|
Walther@60732
|
288 |
val pres_subst = map (TermC.subst_atomic_all env_subst) where_;
|
Walther@60727
|
289 |
val pres_subst_other = map (TermC.subst_atomic_all env_model) (map #2 pres_subst);
|
Walther@60727
|
290 |
val full_subst = if env_eval = [] then pres_subst_other
|
Walther@60727
|
291 |
else map (TermC.subst_atomic_all env_eval) (map #2 pres_subst_other)
|
Walther@60727
|
292 |
val evals = map (eval ctxt where_rls) full_subst
|
Walther@60732
|
293 |
in
|
Walther@60727
|
294 |
(foldl and_ (true, map fst evals), pres_subst_other)
|
Walther@60732
|
295 |
end
|
Walther@60710
|
296 |
|
Walther@60740
|
297 |
(*expects the precondition from Problem, ie. needs substitution by env_model*)
|
Walther@60741
|
298 |
fun check _ _ [] _ = (true, [])
|
Walther@60741
|
299 |
| check ctxt where_rls where_ (model_patt, i_model) =
|
Walther@60706
|
300 |
let
|
Walther@60758
|
301 |
val (env_model, (env_subst, env_eval)) = make_environments model_patt i_model
|
Walther@60729
|
302 |
val pres_subst = map (TermC.subst_atomic_all env_subst) where_;
|
Walther@60726
|
303 |
val pres_subst_other = map (TermC.subst_atomic_all env_model) (map #2 pres_subst);
|
Walther@60726
|
304 |
val full_subst = if env_eval = [] then pres_subst_other
|
Walther@60726
|
305 |
else map (TermC.subst_atomic_all env_eval) (map #2 pres_subst_other)
|
Walther@60706
|
306 |
val evals = map (eval ctxt where_rls) full_subst
|
Walther@60706
|
307 |
in
|
Walther@60726
|
308 |
(foldl and_ (true, map fst evals), pres_subst_other)
|
Walther@60706
|
309 |
end;
|
Walther@60706
|
310 |
|
Walther@60706
|
311 |
fun unchecked_OLD_to_TEST pres = map (fn t => (t, Position.none)) pres
|
Walther@60706
|
312 |
|
walther@59965
|
313 |
(**)end(**)
|