1 (* Copyright (C) 2005, HELM Team.
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.
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.
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.
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,
22 * For details, see the HELM World-Wide-Web page,
23 * http://helm.cs.unibo.it/
26 exception Error of string Lazy.t
28 type goal = ProofEngineTypes.goal
34 type switch = Open of goal | Closed of goal
35 type locator = int * switch
36 type tag = [ `BranchTag | `FocusTag | `NoTag ]
37 type entry = locator list * locator list * locator list * tag
42 val find_goal: t -> goal (** find "next" goal *)
43 val is_empty: t -> bool (** a singleton empty level *)
44 val of_metasenv: Cic.metasenv -> t
45 val head_switches: t -> switch list (** top level switches *)
46 val head_goals: t -> goal list (** top level goals *)
47 val head_tag: t -> tag (** top level tag *)
48 val shift_goals: t -> goal list (** second level goals *)
49 val open_goals: t -> goal list (** all (Open) goals *)
50 val goal_of_switch: switch -> goal
52 (** @param int depth, depth 0 is the top of the stack *)
54 env: ('a -> int -> tag -> locator -> 'a) ->
55 cont:('a -> int -> tag -> locator -> 'a) ->
56 todo:('a -> int -> tag -> locator -> 'a) ->
59 val iter: (** @param depth as above *)
60 env: (int -> tag -> locator -> unit) ->
61 cont:(int -> tag -> locator -> unit) ->
62 todo:(int -> tag -> locator -> unit) ->
65 val map: (** @param depth as above *)
66 env: (int -> tag -> locator list -> locator list) ->
67 cont:(int -> tag -> locator list -> locator list) ->
68 todo:(int -> tag -> locator list -> locator list) ->
74 (** {2 Functorial interface} *)
83 val id_tactic : tactic
84 val mk_tactic : (input_status -> output_status) -> tactic
85 val apply_tactic : tactic -> input_status -> output_status
87 val get_status: input_status -> ProofEngineTypes.status
88 val get_proof: output_status -> ProofEngineTypes.proof
89 val goals : output_status -> goal list * goal list (** opened, closed goals *)
90 val set_goals: goal list * goal list -> output_status -> output_status
91 val get_stack : input_status -> Stack.t
92 val set_stack : Stack.t -> output_status -> output_status
94 val inject : input_status -> output_status
95 val focus : goal -> output_status -> input_status
121 | Tactical of tactical
123 val eval: t -> input_status -> output_status
126 module Make (S: Status) : C
127 with type tactic = S.tactic
128 and type input_status = S.input_status
129 and type output_status = S.output_status