]> matita.cs.unibo.it Git - helm.git/blob - matita/components/ng_tactics/nTacStatus.mli
44c95304519fdecdbe787e9081e8957c39e54e21
[helm.git] / matita / 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 type automation_cache = NDiscriminationTree.DiscriminationTree.t
18 type unit_eq_cache = NCicParamod.state
19
20 class type g_eq_status =
21  object
22    method eq_cache : unit_eq_cache 
23  end
24
25 class eq_status :
26  object('self)
27   inherit g_eq_status
28   method set_eq_cache: unit_eq_cache -> 'self
29   method set_eq_status: #g_eq_status -> 'self
30  end
31
32 class type g_auto_status =
33  object
34   method auto_cache : automation_cache
35  end
36
37 class auto_status :
38  object('self)
39   inherit g_auto_status
40   method set_auto_cache: automation_cache -> 'self
41   method set_auto_status: #g_auto_status -> 'self
42  end
43
44 class type g_pstatus =
45  object
46   inherit GrafiteDisambiguate.g_status
47   inherit g_auto_status
48   inherit g_eq_status
49   method obj: NCic.obj
50  end
51
52 class virtual pstatus :
53  NCic.obj ->
54   object ('self)
55    inherit g_pstatus
56    inherit GrafiteDisambiguate.status
57    inherit auto_status
58    inherit eq_status
59    method set_obj: NCic.obj -> 'self
60    method set_pstatus: #g_pstatus -> 'self
61   end
62
63 type tactic_term = NotationPt.term Disambiguate.disambiguator_input
64 type tactic_pattern = GrafiteAst.npattern Disambiguate.disambiguator_input
65
66 type cic_term 
67 val ctx_of : cic_term -> NCic.context
68 val term_of_cic_term : 
69  #pstatus as 'status -> cic_term -> NCic.context -> 'status * NCic.term
70
71 val mk_cic_term : NCic.context -> NCic.term -> cic_term
72 val disambiguate:
73  #pstatus as 'status -> NCic.context -> tactic_term -> cic_term NCicRefiner.expected_type ->
74   'status * cic_term (* * cic_term XXX *)
75
76 val analyse_indty: 
77  #pstatus as 'status -> cic_term -> 
78   'status * (NReference.reference * int * NCic.term list * NCic.term list)
79
80 val ppterm: #pstatus -> cic_term -> string
81 val ppcontext: #pstatus -> NCic.context -> string
82 val whd: 
83  #pstatus as 'status -> ?delta:int -> NCic.context -> cic_term -> 
84   'status * cic_term 
85 val normalize: 
86  #pstatus as 'status -> ?delta:int -> NCic.context -> cic_term ->
87   'status * cic_term 
88 val are_convertible: 
89  #pstatus as 'status -> NCic.context -> cic_term -> cic_term -> 'status * bool
90 val typeof: 
91  #pstatus as 'status -> NCic.context -> cic_term -> 'status * cic_term
92 val unify: 
93  #pstatus as 'status -> NCic.context -> cic_term -> cic_term -> 'status
94 val refine: 
95  #pstatus as 'status -> NCic.context -> cic_term -> cic_term NCicRefiner.expected_type -> 
96   'status * cic_term * cic_term (* status, term, type *)
97 val apply_subst:
98  #pstatus as 'status -> NCic.context -> cic_term -> 'status * cic_term
99 val apply_subst_context :
100   #pstatus -> fix_projections:bool -> NCic.context -> NCic.context
101 val fix_sorts: #pstatus as 'status -> cic_term -> 'status * cic_term
102 val saturate :
103  #pstatus as 'status -> ?delta:int -> cic_term -> 'status * cic_term * cic_term list
104 val metas_of_term : #pstatus as 'status -> cic_term -> int list
105
106 val get_goalty: #pstatus -> int -> cic_term
107 val get_subst: #pstatus -> NCic.substitution
108 val mk_meta: 
109  #pstatus as 'status -> ?attrs:NCic.meta_attrs -> NCic.context ->
110    [ `Decl of cic_term | `Def of cic_term ] -> NCicUntrusted.meta_kind ->
111      'status * cic_term
112 val instantiate: #pstatus as 'status -> ?refine:bool -> int -> cic_term -> 'status
113 val instantiate_with_ast: #pstatus as 'status -> int -> tactic_term -> 'status
114
115 val select_term:
116  #pstatus as 'status -> 
117   found: ('status -> cic_term -> 'status * cic_term) ->
118   postprocess: ('status -> cic_term -> 'status * cic_term) ->
119   cic_term -> tactic_term option * NCic.term ->
120     'status * cic_term
121
122 val mk_in_scope: #pstatus as 'status -> cic_term -> 'status * cic_term
123 val mk_out_scope:
124  int -> (#pstatus as 'status) -> cic_term -> 'status * cic_term
125
126 class type ['stack] g_status =
127  object
128   inherit g_pstatus
129   method stack: 'stack
130  end
131
132 class virtual ['stack] status :
133  NCic.obj -> 'stack ->
134   object ('self)
135    inherit ['stack] g_status
136    inherit pstatus
137    method set_stack: 'stack -> 'self
138    method set_status: 'stack #g_status -> 'self
139   end
140
141 class type virtual lowtac_status = [unit] status
142
143 type 'status lowtactic = #lowtac_status as 'status -> int -> 'status
144
145 class type virtual tac_status = [Continuationals.Stack.t] status
146
147 val pp_tac_status: #tac_status -> unit
148
149 type 'status tactic = #tac_status as 'status -> 'status
150
151 (* indexing facilities over cic_term based on inverse De Bruijn indexes *)
152
153 module NCicInverseRelIndexable : Discrimination_tree.Indexable
154 with type input = cic_term and type constant_name = NUri.uri 
155
156 module Ncic_termSet : Set.S with type elt = cic_term
157
158 module InvRelDiscriminationTree : Discrimination_tree.DiscriminationTree 
159 with type constant_name = NCicInverseRelIndexable.constant_name
160 and type input = NCicInverseRelIndexable.input
161 and type data = Ncic_termSet.elt and type dataset = Ncic_termSet.t
162
163 val debug : bool ref
164
165 (* end *)