Skip to content

Commit

Permalink
Abduction: better handling of the maximum number of decrementation.
Browse files Browse the repository at this point in the history
checked.
  • Loading branch information
yutakang committed Aug 18, 2023
1 parent 4645a23 commit a7a05e0
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
2 changes: 2 additions & 0 deletions Abduction/Abduction.thy
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,8 @@ strategy Attack_On_Or_Node =
]

setup\<open> Config.put_global Top_Down_Util.timeout_config (60.0 * 60.0 * 10.0) \<close>
setup\<open> Config.put_global Top_Down_Util.limit_for_first_decrement 30 \<close>
setup\<open> Config.put_global Top_Down_Util.limit_for_other_decrement 10 \<close>

(* UI *)
ML\<open> (*This part (the definitions of long_keyword, long_statement, and short_statement) are from
Expand Down
5 changes: 4 additions & 1 deletion Abduction/Seed_Of_Or2And_Edge.ML
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,10 @@ fun decremental_abduction (pst:Proof.state) (parent_ornd:key) (conjectures:conje
val _ = Abduction_Graph.print_key (Proof.context_of pst) parent_ornd;
val _ = tracing' " decremental abduction starts";
val _ = map snd conjectures |> map (tracing' o Isabelle_Utils.trm_to_string (Proof.context_of pst));
val max_number = if (Abduction_Graph.is_final_goal (Synchronized.value synched_agraph) parent_ornd) then 50 else 5;
val ctxt = Proof.context_of pst: Proof.context;
val max_number = if Abduction_Graph.is_final_goal (Synchronized.value synched_agraph) parent_ornd
then Config.get ctxt Top_Down_Util.limit_for_first_decrement
else Config.get ctxt Top_Down_Util.limit_for_other_decrement
val _ = decremental max_number pst parent_ornd [conjectures] [] synched_agraph []: unit;
val _ = tracing' " decremental abduction ends";
in
Expand Down
6 changes: 6 additions & 0 deletions Abduction/Top_Down_Util.ML
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ val mk_new_lemma_name : Proof.context -> bool(*is_final_goal*) ->
val term_compare : term * term -> order;
val term_to_thm : Proof.context -> term -> thm;
val timeout_config : real Config.T;
val limit_for_first_decrement : int Config.T;
val limit_for_other_decrement : int Config.T;

end;

Expand Down Expand Up @@ -231,6 +233,10 @@ fun term_to_thm (ctxt:Proof.context) (cnjctr:term) =
(*default timeout is 10 hours*)
val timeout_config = Config.declare_real ("prove_timeout", \<^here>) (K (60.0 * 60.0 * 10.0)): real Config.T;

val limit_for_first_decrement = Config.declare_int ("limit_for_first_decrement", \<^here>) (K 15): int Config.T;

val limit_for_other_decrement = Config.declare_int ("limit_for_first_decrement", \<^here>) (K 5): int Config.T;

end;


Expand Down

0 comments on commit a7a05e0

Please sign in to comment.