@@ -27,12 +27,12 @@ open Wp_eauto
2727open Wp_rewrite
2828
2929(* *
30- Is automation shield enabled ?
30+ Is automation shield enabled ?
3131*)
3232let automation_shield: bool ref = Summary. ref ~name: " automation_shield" true
3333
3434(* *
35- Do we want to debug the automation ?
35+ Do we want to debug the automation ?
3636*)
3737let automation_debug : bool ref = Summary. ref ~name: " automation_debug" false
3838
@@ -76,15 +76,17 @@ let restricted_automation_routine (depth: int) (lems: Tactypes.delayed_open_cons
7676 - [depth] ([int]): max depth of the proof search
7777 - [shield] ([bool]): if set to [true], will stop the proof search if a forbidden pattern is found
7878 - [lems] ([Tactypes.delayed_open_constr list]): additional lemmas that are given to solve the proof
79+ - [dbs] ([hint_db_name list]): list of additional hint databases to use
7980 - [database_type] ([Hint_dataset_declarations]): type of databases that will be use as hint databases
8081*)
81- let waterprove (depth : int ) ?(shield : bool = false ) (lems : Tactypes.delayed_open_constr list ) (database_type : database_type ): unit tactic =
82+ let waterprove (depth : int ) ?(shield : bool = false ) (lems : Tactypes.delayed_open_constr list )
83+ (dbs : hint_db_name list ) (database_type : database_type ): unit tactic =
8284 Proofview.Goal. enter @@ fun goal ->
8385 begin
84- if shield && ! automation_shield then
85- automation_routine 3 lems (get_current_databases Shorten )
86+ if shield && ! automation_shield then
87+ automation_routine 3 lems (dbs @ ( get_current_databases Shorten ) )
8688 else
87- automation_routine depth lems (get_current_databases database_type)
89+ automation_routine depth lems (dbs @ get_current_databases database_type)
8890 end
8991
9092(* *
@@ -96,19 +98,21 @@ let waterprove (depth: int) ?(shield: bool = false) (lems: Tactypes.delayed_open
9698 - [depth] ([int]): max depth of the proof search
9799 - [shield] ([bool]): if set to [true], will stop the proof search if a forbidden pattern is found
98100 - [lems] ([Tactypes.delayed_open_constr list]): additional lemmas that are given to solve the proof
101+ - [dbs] ([hint_db_name list]): list of additional hint databases to use
99102 - [database_type] ([Hint_dataset_declarations]): type of databases that will be use as hint databases
100103 - [must_use] ([string list]): list of hints that have to be used during the automatic solving
101104 - [forbidden] ([string list]): list of hints that must not be used during the automatic solving
102105*)
103- let rwaterprove (depth : int ) ?(shield : bool = false ) (lems : Tactypes.delayed_open_constr list ) (database_type : database_type ) (must_use : constr list ) (forbidden : constr list ): unit tactic =
106+ let rwaterprove (depth : int ) ?(shield : bool = false ) (lems : Tactypes.delayed_open_constr list )
107+ (dbs : hint_db_name list ) (database_type : database_type ) (must_use : constr list ) (forbidden : constr list ): unit tactic =
104108 Proofview.Goal. enter @@ fun goal ->
105109 begin
106110 let env = Proofview.Goal. env goal in
107111 let sigma = Proofview.Goal. sigma goal in
108112 let must_use_tactics = List. map (Printer. pr_econstr_env env sigma) must_use in
109113 let forbidden_tactics = List. map (Printer. pr_econstr_env env sigma) forbidden in
110114 if shield && ! automation_shield then
111- restricted_automation_routine 3 lems (get_current_databases Shorten ) must_use_tactics forbidden_tactics
115+ restricted_automation_routine 3 lems (dbs @ ( get_current_databases Shorten ) ) must_use_tactics forbidden_tactics
112116 else
113- restricted_automation_routine depth lems (get_current_databases database_type) must_use_tactics forbidden_tactics
117+ restricted_automation_routine depth lems (dbs @ ( get_current_databases database_type) ) must_use_tactics forbidden_tactics
114118 end
0 commit comments