Debian Codegraph @

plugins/ssr/ssripats.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 file implements:
12 - the [=>] tactical
13 - the [:] pseudo-tactical for move, case, elim and abstract
14
15 Putting these two features in the same file lets one hide much of the
16 interaction between [tac E:] and [=>] ([E] has to be processed by [=>],
17 not by [:]
18 *)
19
20 open Ssrast
21
22 (* Atomic operations for the IPat machine. Use this if you are "patching" an
23 * ipat written by the user, since patching it at he AST level and then
24 * compiling it may have tricky effects, eg adding a clear in front of a view
25 * also has the effect of disposing the view (the compilation phase takes care
26 * of this, by using the compiled ipats you can be more precise *)
27 type ssriop =
28 | IOpId of Names.Id.t
29 | IOpDrop
30 | IOpTemporay
31 | IOpInaccessible of string option
32 | IOpInaccessibleAll
33 | IOpAbstractVars of Names.Id.t list
34 | IOpFastNondep
35
36 | IOpInj of ssriops list
37
38 | IOpDispatchBlock of id_block
39 | IOpDispatchBranches of ssriops list
40
41 | IOpCaseBlock of id_block
42 | IOpCaseBranches of ssriops list
43
44 | IOpRewrite of ssrocc * ssrdir
45 | IOpView of ssrclear option * ssrview (* extra clears to be performed *)
46
47 | IOpClear of ssrclear * ssrhyp option
48 | IOpSimpl of ssrsimpl
49
50 | IOpEqGen of unit Proofview.tactic (* generation of eqn *)
51
52 | IOpNoop
53
54 and ssriops = ssriop list
55
56 val tclCompileIPats : ssripats -> ssriops
57
58 (* The => tactical *)
59 val tclIPAT : ssriops -> unit Proofview.tactic
60
61 (* As above but with the SSR exception: first case is dispatch *)
62 val tclIPATssr : ssripats -> unit Proofview.tactic
63
64 (* Wrappers to deal with : and eqn generation/naming:
65 [tac E: gens => ipats]
66 where [E] is injected into [ipats] (at the right place) and [gens] are
67 generalized before calling [tac] *)
68 val ssrmovetac : ssrdgens ssrmovearg -> unit Proofview.tactic
69 val ssrsmovetac : unit Proofview.tactic
70 val ssrelimtac : ssrdgens ssrmovearg -> unit Proofview.tactic
71 val ssrselimtoptac : unit Proofview.tactic
72 val ssrcasetac : ssrdgens ssrmovearg -> unit Proofview.tactic
73 val ssrscasetoptac : unit Proofview.tactic
74
75 (* The implementation of abstract: is half here, for the [[: var ]]
76 * ipat, and in ssrfwd for the integration with [have] *)
77 val ssrabstract : ssrdgens -> unit Proofview.tactic
78
79 module Internal : sig
80 val examine_abstract :
81 Environ.env -> Evd.evar_map -> EConstr.t -> Evd.evar_map * (EConstr.types * EConstr.t array)
82 val find_abstract_proof :
83 Environ.env -> Evd.evar_map -> bool -> EConstr.constr -> Evar.t
84 end