]> matita.cs.unibo.it Git - helm.git/blob - helm/software/components/ng_tactics/nTacStatus.mli
Preparing for 0.5.9 release.
[helm.git] / helm / software / components / ng_tactics / nTacStatus.mli
1 (*
2     ||M||  This file is part of HELM, an Hypertextual, Electronic        
3     ||A||  Library of Mathematics, developed at the Computer Science     
4     ||T||  Department, University of Bologna, Italy.                     
5     ||I||                                                                
6     ||T||  HELM is free software; you can redistribute it and/or         
7     ||A||  modify it under the terms of the GNU General Public License   
8     \   /  version 2 or (at your option) any later version.      
9      \ /   This software is distributed as is, NO WARRANTY.     
10       V_______________________________________________________________ *)
11
12 (* $Id: nCic.ml 9058 2008-10-13 17:42:30Z tassi $ *)
13
14 exception Error of string lazy_t * exn option
15 val fail: ?exn:exn -> string lazy_t -> 'a
16
17 class type g_pstatus =
18  object
19   inherit NEstatus.g_status
20   method obj: NCic.obj
21  end
22
23 class pstatus :
24  NCic.obj ->
25   object ('self)
26    inherit NEstatus.status
27    method obj: NCic.obj
28    method set_obj: NCic.obj -> 'self
29    method set_pstatus: #g_pstatus -> 'self
30   end
31
32 type tactic_term = CicNotationPt.term Disambiguate.disambiguator_input
33 type tactic_pattern = GrafiteAst.npattern Disambiguate.disambiguator_input
34
35 type cic_term 
36 val ctx_of : cic_term -> NCic.context
37 val term_of_cic_term : 
38  #pstatus as 'status -> cic_term -> NCic.context -> 'status * NCic.term
39
40 val mk_cic_term : NCic.context -> NCic.term -> cic_term
41 val disambiguate:
42  #pstatus as 'status -> NCic.context -> tactic_term -> cic_term option ->
43   'status * cic_term (* * cic_term XXX *)
44
45 val analyse_indty: 
46  #pstatus as 'status -> cic_term -> 
47   'status * (NReference.reference * int * NCic.term list * NCic.term list)
48
49 val ppterm: #pstatus -> cic_term -> string
50 val ppcontext: #pstatus -> NCic.context -> string
51 val whd: 
52  #pstatus as 'status -> ?delta:int -> NCic.context -> cic_term -> 
53   'status * cic_term 
54 val normalize: 
55  #pstatus as 'status -> ?delta:int -> NCic.context -> cic_term ->
56   'status * cic_term 
57 val typeof: 
58  #pstatus as 'status -> NCic.context -> cic_term -> 'status * cic_term
59 val unify: 
60  #pstatus as 'status -> NCic.context -> cic_term -> cic_term -> 'status
61 val refine: 
62  #pstatus as 'status -> NCic.context -> cic_term -> cic_term option -> 
63   'status * cic_term * cic_term (* status, term, type *)
64 val apply_subst:
65  #pstatus as 'status -> NCic.context -> cic_term -> 'status * cic_term
66 val apply_subst_context :
67   #pstatus -> fix_projections:bool -> NCic.context -> NCic.context
68 val fix_sorts: #pstatus as 'status -> cic_term -> 'status * cic_term
69 val saturate :
70  #pstatus as 'status -> ?delta:int -> cic_term -> 'status * cic_term * cic_term list
71 val metas_of_term : #pstatus as 'status -> cic_term -> int list
72
73 val get_goalty: #pstatus -> int -> cic_term
74 val get_subst: #pstatus -> NCic.substitution
75 val mk_meta: 
76  #pstatus as 'status -> ?attrs:NCic.meta_attrs -> NCic.context ->
77    [ `Decl of cic_term | `Def of cic_term ] -> NCicUntrusted.meta_kind ->
78      'status * cic_term
79
80 (* default value for refine: true; you can use false if the term has already been refined with
81    the expected type for the meta (e.g. after a reduction tactic) *)
82 val instantiate: #pstatus as 'status -> ?refine:bool -> int -> cic_term -> 'status
83 val instantiate_with_ast: #pstatus as 'status -> int -> tactic_term -> 'status
84
85 val select_term:
86  #pstatus as 'status -> 
87   found: ('status -> cic_term -> 'status * cic_term) ->
88   postprocess: ('status -> cic_term -> 'status * cic_term) ->
89   cic_term -> tactic_term option * NCic.term ->
90     'status * cic_term
91
92 val mk_in_scope: #pstatus as 'status -> cic_term -> 'status * cic_term
93 val mk_out_scope:
94  int -> (#pstatus as 'status) -> cic_term -> 'status * cic_term
95
96 class type ['stack] g_status =
97  object
98   inherit g_pstatus
99   method stack: 'stack
100  end
101
102 class ['stack] status :
103  NCic.obj -> 'stack ->
104   object ('self)
105    inherit pstatus
106    method stack: 'stack
107    method set_stack: 'stack -> 'self
108    method set_status: 'stack #g_status -> 'self
109   end
110
111 class type lowtac_status = [unit] status
112
113 type 'status lowtactic = #lowtac_status as 'status -> int -> 'status
114
115 class type tac_status = [Continuationals.Stack.t] status
116
117 val pp_tac_status: #tac_status -> unit
118
119 type 'status tactic = #tac_status as 'status -> 'status
120
121 (* indexing facilities over cic_term based on inverse De Bruijn indexes *)
122
123 module NCicInverseRelIndexable : Discrimination_tree.Indexable
124 with type input = cic_term and type constant_name = NUri.uri 
125
126 module Ncic_termSet : Set.S with type elt = cic_term
127
128 module InvRelDiscriminationTree : Discrimination_tree.DiscriminationTree 
129 with type constant_name = NCicInverseRelIndexable.constant_name
130 and type input = NCicInverseRelIndexable.input
131 and type data = Ncic_termSet.elt and type dataset = Ncic_termSet.t
132
133 val debug : bool ref
134
135 (* end *)