| None -> None
| Some ((_, _), pt) -> Some pt
in
- let demodulate table goal =
- let changed, newmeta, newgoal =
- Indexing.demodulation_goal !maxmeta env table goal in
- maxmeta := newmeta;
- changed, newgoal
- in
+ let demodulate table goal = Indexing.demodulation_goal env table goal in
let changed, goal =
match passive_table with
| None -> demodulate active_table goal
in
let simplified =
List.fold_left
- (fun acc g ->
- match simplify_goal env g ~passive active with
+ (fun acc goal ->
+ match simplify_goal env goal ~passive active with
| _, g -> if find g acc then acc else g::acc)
[] active_goals
in
let selected = hd in
let passive_goals = tl in
let new' = Indexing.superposition_left env (snd active) selected in
+ let metasenv, context, ugraph = env in
+ let names = names_of_context context in
+ List.iter (fun (_,_,x) -> prerr_endline ("X: " ^ CicPp.pp x names)) new';
selected::active_goals, passive_goals @ new'
| _::tl -> aux tl
in
*)
;;
-let demodulate_tac ~dbd ~pattern ((proof,goal) as initialstatus) =
+let demodulate_tac ~dbd ~pattern ((proof,goal)(*s initialstatus*)) =
let module I = Inference in
let curi,metasenv,pbo,pty = proof in
let metano,context,ty = CicUtil.lookup_meta goal metasenv in
(fun tbl eq -> Indexing.index tbl eq)
Indexing.empty equalities
in
- let _, newmeta,(newproof,newmetasenv, newty) =
+ let changed,(newproof,newmetasenv, newty) =
Indexing.demodulation_goal
- maxm (metasenv,context,CicUniv.empty_ugraph) table initgoal
+ (metasenv,context,CicUniv.empty_ugraph) table initgoal
in
- if newmeta != maxm then
+ if changed then
begin
let opengoal = Cic.Meta(maxm,irl) in
let proofterm,_ =
extended_status in
(status,maxm::newgoals)
end
- else if newty = ty then
+ else (* if newty = ty then *)
raise (ProofEngineTypes.Fail (lazy "no progress"))
- else ProofEngineTypes.apply_tactic
+ (*else ProofEngineTypes.apply_tactic
(ReductionTactics.simpl_tac ~pattern)
- initialstatus
+ initialstatus*)
;;
let demodulate_tac ~dbd ~pattern =