decomporre. *)
-exception InteractiveUserUriChoiceNotRegistered
-
-let interactive_user_uri_choice =
- (ref (fun ~selection_mode -> raise InteractiveUserUriChoiceNotRegistered) :
- (selection_mode:[`SINGLE | `EXTENDED] ->
- ?ok:string ->
- ?enable_button_for_non_vars:bool ->
- title:string -> msg:string -> string list -> string list) ref)
-;;
-
exception IllFormedUri of string
let cic_textual_parser_uri_of_string uri' =
_ -> raise (IllFormedUri uri')
;;
-let constructor_uri_of_string uri =
- match cic_textual_parser_uri_of_string uri with
- CicTextualParser0.IndTyUri (uri,typeno) -> (uri,typeno,[])
- | _ -> assert false
-;;
-
-let call_back uris =
-(* N.B.: in questo passaggio perdo l'informazione su exp_named_subst !!!! *)
- let module U = UriManager in
- List.map
- (constructor_uri_of_string)
- (!interactive_user_uri_choice
- ~selection_mode:`EXTENDED ~ok:"Ok" ~enable_button_for_non_vars:false
- ~title:"Decompose" ~msg:"Please, select the Inductive Types to decompose"
- (List.map
- (function (uri,typeno,_) -> U.string_of_uri uri ^ "#1/" ^ string_of_int (typeno+1))
- uris)
- )
-;;
-
-
-let decompose_tac ~term ~status:((proof,goal) as status) =
+let decompose_tac ~term ~uris_choice_callback ~status:((proof,goal) as status) =
let module C = Cic in
let module R = CicReduction in
let module P = PrimitiveTactics in
let urilist =
(* list of triples (uri,typeno,exp_named_subst) of Inductive Types found in term and chosen by the user *)
- (* N.B.: due to a bug in call_back exp_named_subst are not significant (they all are []) *)
- call_back (make_list termty) in
+ (* N.B.: due to a bug in uris_choice_callback exp_named_subst are not significant (they all are []) *)
+ uris_choice_callback (make_list termty) in
let rec elim_clear_tac ~term' ~nr_of_hyp_still_to_elim ~status:((proof,goal) as status) =
prerr_endline ("%%%%%%% nr_of_hyp_still_to_elim=" ^ (string_of_int nr_of_hyp_still_to_elim));
val elim_type_tac: term:Cic.term -> ProofEngineTypes.tactic
-val interactive_user_uri_choice: ( selection_mode:[`SINGLE | `EXTENDED] ->
- ?ok:string ->
- ?enable_button_for_non_vars:bool ->
- title:string -> msg:string -> string list -> string list) ref
-
-val decompose_tac: term:Cic.term -> ProofEngineTypes.tactic
+val decompose_tac:
+ term:Cic.term ->
+ uris_choice_callback:
+ ((UriManager.uri * int * (UriManager.uri * Cic.term) list) list ->
+ (UriManager.uri * int * (UriManager.uri * Cic.term) list) list) ->
+ ProofEngineTypes.tactic