Debian Codegraph @

tactics/autorewrite.mli

raw symbols SCIP
1 (************************************************************************)
2 (* * The Rocq Prover / The Rocq Development Team *)
3 (* v * Copyright INRIA, CNRS and contributors *)
4 (* <O___,, * (see version control and CREDITS file for authors & dates) *)
5 (* \VV/ **************************************************************)
6 (* // * This file is distributed under the terms of the *)
7 (* * GNU Lesser General Public License Version 2.1 *)
8 (* * (see LICENSE file for the text of the license) *)
9 (************************************************************************)
10
11 (** This files implements the autorewrite tactic. *)
12
13 open Constr
14 open Equality
15
16 type raw_rew_rule = ((constr * UnivGen.sort_context_set) * bool * Gentactic.raw_generic_tactic option) CAst.t
17
18 val create_rewrite_hint_db : local:bool -> name:string -> unit
19
20 (** To add rewriting rules to a base *)
21 val add_rew_rules : locality:Hints.hint_locality -> string -> raw_rew_rule list -> unit
22
23 val add_rewrite_hint
24 : locality:Libobject.locality
25 -> poly:PolyFlags.t
26 -> string list
27 -> bool
28 -> Gentactic.raw_generic_tactic option -> Constrexpr.constr_expr list -> unit
29
30 (** The AutoRewrite tactic.
31 The optional conditions tell rewrite how to handle matching and side-condition solving.
32 Default is Naive: first match in the clause, don't look at the side-conditions to
33 tell if the rewrite succeeded. *)
34 val autorewrite : ?conds:conditions -> unit Proofview.tactic -> string list -> unit Proofview.tactic
35 val autorewrite_in : ?conds:conditions -> Names.Id.t -> unit Proofview.tactic -> string list -> unit Proofview.tactic
36
37 (** Rewriting rules *)
38 module RewRule :
39 sig
40 type t
41 val rew_lemma : t -> UnivGen.sort_context_set * constr
42 val rew_l2r : t -> bool
43 val rew_tac : t -> Gentactic.glob_generic_tactic option
44 end
45
46 val find_rewrites : string -> RewRule.t list
47
48 val find_matches : Environ.env -> string -> constr -> RewRule.t list
49
50 val auto_multi_rewrite : ?conds:conditions -> string list -> Locus.clause -> unit Proofview.tactic
51
52 val auto_multi_rewrite_with : ?conds:conditions -> unit Proofview.tactic -> string list -> Locus.clause -> unit Proofview.tactic
53
54 val print_rewrite_hintdb : string -> Pp.t