]> matita.cs.unibo.it Git - helm.git/blob - helm/ocaml/tactics/tacticals.mli
ocaml 3.09 transition
[helm.git] / helm / ocaml / tactics / tacticals.mli
1 (* Copyright (C) 2002, HELM Team.
2  * 
3  * This file is part of HELM, an Hypertextual, Electronic
4  * Library of Mathematics, developed at the Computer Science
5  * Department, University of Bologna, Italy.
6  * 
7  * HELM is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU General Public License
9  * as published by the Free Software Foundation; either version 2
10  * of the License, or (at your option) any later version.
11  * 
12  * HELM is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with HELM; if not, write to the Free Software
19  * Foundation, Inc., 59 Temple Place - Suite 330, Boston,
20  * MA  02111-1307, USA.
21  * 
22  * For details, see the HELM World-Wide-Web page,
23  * http://cs.unibo.it/helm/.
24  *)
25
26 val id_tac : ProofEngineTypes.tactic
27 val fail_tac: ProofEngineTypes.tactic
28
29 (* module type Status =
30  sig
31 |+    type external_input_status +|
32    type input_status
33    type output_status
34 |+    type external_output_status +|
35
36 |+    val internalize: external_input_status -> input_status
37    val externalize: output_status -> external_output_status +|
38
39    type tactic
40
41    val mk_tactic : (input_status -> output_status) -> tactic
42    val apply_tactic : tactic -> input_status -> output_status
43
44    val id_tac : tactic
45
46    val goals : output_status -> ProofEngineTypes.goal list
47    val get_stack : input_status -> stack
48    val set_stack : stack -> output_status -> output_status
49
50    val inject : input_status -> output_status
51    val focus : goal -> output_status -> input_status
52  end *)
53
54 module type T =
55 sig
56   type tactic
57
58   val first: tactics: (string * tactic) list -> tactic
59   val thens: start: tactic -> continuations: tactic list -> tactic
60   val then_: start: tactic -> continuation: tactic -> tactic
61   val seq: tactics: tactic list -> tactic (** "folding" of then_ *)
62   val repeat_tactic: tactic: tactic -> tactic
63   val do_tactic: n: int -> tactic: tactic -> tactic 
64   val try_tactic: tactic: tactic -> tactic 
65   val solve_tactics: tactics: (string * tactic) list -> tactic
66
67 (*   module C:
68   sig *)
69   val tactic: tactic -> tactic  (** apply tactic to all goal in env *)
70   val skip: tactic
71   val dot: tactic
72   val semicolon: tactic
73   val branch: tactic
74   val shift: tactic
75   val pos: int -> tactic
76   val merge: tactic
77   val focus: int list -> tactic
78   val unfocus: tactic
79 (*   end *)
80 end
81
82 module Make (S: Continuationals.Status) : T with type tactic = S.tactic
83
84 include T with type tactic = ProofEngineTypes.tactic
85
86 (* TODO temporary *)
87 val goals_diff:
88   before:ProofEngineTypes.goal list ->
89   after:ProofEngineTypes.goal list ->
90   opened:ProofEngineTypes.goal list ->
91     ProofEngineTypes.goal list * ProofEngineTypes.goal list
92