(UriManager.uri * int * 'b list) list
val mk_fresh_name_callback :
Cic.context -> Cic.name -> typ:Cic.term -> Cic.name
+ (* invoked when the proof assistant's status has changed to notify Hbugs *)
+ val notify_hbugs : unit -> unit
end
;;
-module Make(C:Callbacks) =
+module type Tactics =
+ sig
+ val intros : unit -> unit
+ val exact : ?term:string -> unit -> unit
+ val apply : ?term:string -> unit -> unit
+ val elimintrossimpl : ?term:string -> unit -> unit
+ val elimtype : ?term:string -> unit -> unit
+ val whd : unit -> unit
+ val reduce : unit -> unit
+ val simpl : unit -> unit
+ val fold_whd : ?term:string -> unit -> unit
+ val fold_reduce : ?term:string -> unit -> unit
+ val fold_simpl : ?term:string -> unit -> unit
+ val cut : ?term:string -> unit -> unit
+ val change : unit -> unit
+ val letin : ?term:string -> unit -> unit
+ val ring : unit -> unit
+ val clearbody : unit -> unit
+ val clear : unit -> unit
+ val fourier : unit -> unit
+ val rewritesimpl : ?term:string -> unit -> unit
+ val rewritebacksimpl : ?term:string -> unit -> unit
+ val replace : unit -> unit
+ val reflexivity : unit -> unit
+ val symmetry : unit -> unit
+ val transitivity : ?term:string -> unit -> unit
+ val exists : unit -> unit
+ val split : unit -> unit
+ val left : unit -> unit
+ val right : unit -> unit
+ val assumption : unit -> unit
+ val generalize : unit -> unit
+ val absurd : ?term:string -> unit -> unit
+ val contradiction : unit -> unit
+ val decompose : ?term:string -> unit -> unit
+ val injection : ?term:string -> unit -> unit
+ val discriminate : ?term:string -> unit -> unit
+ val whd_in_scratch : unit -> unit
+ val reduce_in_scratch : unit -> unit
+ val simpl_in_scratch : unit -> unit
+ end
+
+module Make (C: Callbacks) : Tactics =
struct
let call_tactic tactic () =
try
tactic () ;
C.refresh_goals () ;
- C.refresh_proof ()
+ C.refresh_proof () ;
+ C.notify_hbugs ()
with
RefreshSequentException e ->
C.output_html
ProofEngine.goal := savedgoal
end
- let call_tactic_with_input tactic () =
+ let call_tactic_with_input tactic ?term () =
let savedproof = !ProofEngine.proof in
let savedgoal = !ProofEngine.goal in
let uri,metasenv,bo,ty =
in
try
let metasenv',expr =
+ (match term with
+ | None -> ()
+ | Some t -> (C.term_editor ())#set_term t);
(C.term_editor ())#get_metasenv_and_term canonical_context metasenv
in
ProofEngine.proof := Some (uri,metasenv',bo,ty) ;
tactic expr ;
C.refresh_goals () ;
C.refresh_proof () ;
- (C.term_editor ())#reset
+ (C.term_editor ())#reset ;
+ C.notify_hbugs ()
with
RefreshSequentException e ->
C.output_html
try
tactic term ;
C.refresh_goals () ;
- C.refresh_proof ()
+ C.refresh_proof () ;
+ C.notify_hbugs ()
with
RefreshSequentException e ->
C.output_html
| terms ->
tactic terms ;
C.refresh_goals () ;
- C.refresh_proof ()
+ C.refresh_proof () ;
+ C.notify_hbugs ()
with
RefreshSequentException e ->
C.output_html
tactic ~goal_input:term ~input:expr ;
C.refresh_goals () ;
C.refresh_proof () ;
- (C.term_editor ())#reset
+ (C.term_editor ())#reset ;
+ C.notify_hbugs ()
with
RefreshSequentException e ->
C.output_html
let call_tactic_with_goal_input_in_scratch tactic () =
let module L = LogicalOperations in
let module G = Gdome in
- let savedproof = !ProofEngine.proof in
- let savedgoal = !ProofEngine.goal in
let scratch_window = C.scratch_window () in
match scratch_window#sequent_viewer#get_selected_terms with
[term] ->
let module L = LogicalOperations in
let module G = Gdome in
let scratch_window = C.scratch_window () in
- let savedproof = !ProofEngine.proof in
- let savedgoal = !ProofEngine.goal in
match scratch_window#sequent_viewer#get_selected_terms with
[] ->
C.output_html
try
tactic hypothesis ;
C.refresh_goals () ;
- C.refresh_proof ()
+ C.refresh_proof () ;
+ C.notify_hbugs ()
with
RefreshSequentException e ->
C.output_html
(UriManager.uri * int * 'b list) list
val mk_fresh_name_callback :
Cic.context -> Cic.name -> typ:Cic.term -> Cic.name
+ val notify_hbugs : unit -> unit
end
-module Make (C : Callbacks) :
+module type Tactics =
sig
val intros : unit -> unit
- val exact : unit -> unit
- val apply : unit -> unit
- val elimintrossimpl : unit -> unit
- val elimtype : unit -> unit
+ val exact : ?term:string -> unit -> unit
+ val apply : ?term:string -> unit -> unit
+ val elimintrossimpl : ?term:string -> unit -> unit
+ val elimtype : ?term:string -> unit -> unit
val whd : unit -> unit
val reduce : unit -> unit
val simpl : unit -> unit
- val fold_whd : unit -> unit
- val fold_reduce : unit -> unit
- val fold_simpl : unit -> unit
- val cut : unit -> unit
+ val fold_whd : ?term:string -> unit -> unit
+ val fold_reduce : ?term:string -> unit -> unit
+ val fold_simpl : ?term:string -> unit -> unit
+ val cut : ?term:string -> unit -> unit
val change : unit -> unit
- val letin : unit -> unit
+ val letin : ?term:string -> unit -> unit
val ring : unit -> unit
val clearbody : unit -> unit
val clear : unit -> unit
val fourier : unit -> unit
- val rewritesimpl : unit -> unit
- val rewritebacksimpl : unit -> unit
+ val rewritesimpl : ?term:string -> unit -> unit
+ val rewritebacksimpl : ?term:string -> unit -> unit
val replace : unit -> unit
val reflexivity : unit -> unit
val symmetry : unit -> unit
- val transitivity : unit -> unit
+ val transitivity : ?term:string -> unit -> unit
val exists : unit -> unit
val split : unit -> unit
val left : unit -> unit
val right : unit -> unit
val assumption : unit -> unit
val generalize : unit -> unit
- val absurd : unit -> unit
+ val absurd : ?term:string -> unit -> unit
val contradiction : unit -> unit
- val decompose : unit -> unit
- val injection : unit -> unit
- val discriminate : unit -> unit
+ val decompose : ?term:string -> unit -> unit
+ val injection : ?term:string -> unit -> unit
+ val discriminate : ?term:string -> unit -> unit
val whd_in_scratch : unit -> unit
val reduce_in_scratch : unit -> unit
val simpl_in_scratch : unit -> unit
end
+
+module Make (C : Callbacks) : Tactics
+