X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Fsoftware%2Fcomponents%2Ftactics%2Fauto.ml;h=ba80608d21b992ca6f0c2ef3d816565c160dc233;hb=d9373d1ab9c84de43f212e11912178cabd5562ac;hp=a7af3bbe5be2703e3831a2085eb2b09bddd755fd;hpb=7b29f50ea116524e4bc91b762b81fd5ae927c4ea;p=helm.git diff --git a/helm/software/components/tactics/auto.ml b/helm/software/components/tactics/auto.ml index a7af3bbe5..ba80608d2 100644 --- a/helm/software/components/tactics/auto.ml +++ b/helm/software/components/tactics/auto.ml @@ -281,7 +281,7 @@ let init_cache_and_tables try let ty' = unfold context ty in if is_an_equality ty' then Some(t,ty') else None - with _ -> None) (* catturare l'eccezione giusta di unfold *) + with ProofEngineTypes.Fail _ -> None) equations in let bag = Equality.mk_equality_bag () in @@ -992,7 +992,6 @@ let add_to_cache_and_del_from_orlist_if_green_cut | None -> assert false | Some (canonical_ctx , gty) -> let goalno,depth,sort = g in - assert (sort = P); let irl = mk_irl canonical_ctx in let goal = Cic.Meta(goalno, irl) in let proof = CicMetaSubst.apply_subst s goal in @@ -1249,7 +1248,7 @@ let prunable menv subst ty todo = | (D (_,_,T))::tl -> aux tl | _ -> false and no_progress variant = function - | [] -> prerr_endline "++++++++++++++++++++++++ no_progress"; true + | [] -> (*prerr_endline "++++++++++++++++++++++++ no_progress";*) true | D ((n,_,P) as g)::tl -> (match calculate_goal_ty g subst menv with | None -> no_progress variant tl @@ -1300,7 +1299,8 @@ let auto_main tables maxm context flags universe cache elems = | (m, s, _, _, [],_)::orlist -> (* complete success *) Proved (m, s, orlist, tables, cache, maxm) - | (m, s, size, don, (D (_,_,T))::todo, fl)::orlist -> + | (m, s, size, don, (D (_,_,T))::todo, fl)::orlist + when not flags.AutoTypes.do_types -> (* skip since not Prop, don't even check if closed by side-effect *) aux tables maxm flags cache ((m, s, size, don, todo, fl)::orlist) | (m, s, size, don, (S(g, key, c,minsize) as op)::todo, fl)::orlist -> @@ -1330,7 +1330,7 @@ let auto_main tables maxm context flags universe cache elems = (* timeout *) debug_print (lazy ("FAIL: TIMEOUT")); Gaveup (tables, cache, maxm) - | (m, s, size, don, (D (gno,depth,P as g))::todo, fl)::orlist as status -> + | (m, s, size, don, (D (gno,depth,_ as g))::todo, fl)::orlist as status -> (* attack g *) match calculate_goal_ty g s m with | None -> @@ -1345,7 +1345,7 @@ let auto_main tables maxm context flags universe cache elems = (debug_print (lazy ("FAIL: SIZE: goal: "^string_of_int gsize)); aux tables maxm flags cache orlist) else if prunable_for_size flags s m todo then - (prerr_endline ("POTO at depth: "^(string_of_int depth)); + (debug_print (lazy ("POTO at depth: "^(string_of_int depth))); aux tables maxm flags cache orlist) else (* still to be proved *) @@ -1519,6 +1519,7 @@ let flags_of_params params ?(for_applyS=false) () = let width = int "width" ((AutoTypes.default_flags()).AutoTypes.maxwidth) in let size = int "size" ((AutoTypes.default_flags()).AutoTypes.maxsize) in let gsize = int "gsize" ((AutoTypes.default_flags()).AutoTypes.maxgoalsizefactor) in + let do_type = bool "type" false in let timeout = int "timeout" 0 in { AutoTypes.maxdepth = if use_only_paramod then 2 else depth; @@ -1537,6 +1538,7 @@ let flags_of_params params ?(for_applyS=false) () = AutoTypes.close_more = close_more; AutoTypes.dont_cache_failures = false; AutoTypes.maxgoalsizefactor = gsize; + AutoTypes.do_types = do_type; } let applyS_tac ~dbd ~term ~params ~universe = @@ -1716,8 +1718,8 @@ let auto_tac ~(dbd:HSql.dbd) ~params ~universe (proof, goal) = in match auto_main tables newmeta context flags universe cache [elem] with | Proved (metasenv,subst,_, tables,cache,_) -> - prerr_endline - ("TIME:"^string_of_float(Unix.gettimeofday()-.initial_time)); + (*prerr_endline + ("TIME:"^string_of_float(Unix.gettimeofday()-.initial_time));*) let proof,metasenv = ProofEngineHelpers.subst_meta_and_metasenv_in_proof proof goal subst metasenv