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.
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_______________________________________________________________ *)
12 (* $Id: nCic.ml 9058 2008-10-13 17:42:30Z tassi $ *)
14 exception Error of string lazy_t * exn option
15 val fail: ?exn:exn -> string lazy_t -> 'a
17 type automation_cache = NDiscriminationTree.DiscriminationTree.t
18 type unit_eq_cache = NCicParamod.state
20 class type g_eq_status =
22 method eq_cache : unit_eq_cache
28 method set_eq_cache: unit_eq_cache -> 'self
29 method set_eq_status: #g_eq_status -> 'self
32 class type g_auto_status =
34 method auto_cache : automation_cache
40 method set_auto_cache: automation_cache -> 'self
41 method set_auto_status: #g_auto_status -> 'self
44 class type g_pstatus =
46 inherit GrafiteDisambiguate.g_status
52 class virtual pstatus :
56 inherit GrafiteDisambiguate.status
59 method set_obj: NCic.obj -> 'self
60 method set_pstatus: #g_pstatus -> 'self
63 type tactic_term = NotationPt.term Disambiguate.disambiguator_input
64 type tactic_pattern = GrafiteAst.npattern Disambiguate.disambiguator_input
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
71 val mk_cic_term : NCic.context -> NCic.term -> cic_term
73 #pstatus as 'status -> NCic.context -> tactic_term -> cic_term NCicRefiner.expected_type ->
74 'status * cic_term (* * cic_term XXX *)
77 #pstatus as 'status -> cic_term ->
78 'status * (NReference.reference * int * NCic.term list * NCic.term list * NCic.constructor list)
80 val ppterm: #pstatus -> cic_term -> string
81 val ppcontext: #pstatus -> NCic.context -> string
83 #pstatus as 'status -> ?delta:int -> NCic.context -> cic_term ->
86 #pstatus as 'status -> ?delta:int -> NCic.context -> cic_term ->
89 #pstatus as 'status -> NCic.context -> cic_term -> cic_term -> 'status * bool
91 #pstatus as 'status -> NCic.context -> cic_term -> 'status * cic_term
93 #pstatus as 'status -> NCic.context -> cic_term -> cic_term -> 'status
95 #pstatus as 'status -> NCic.context -> cic_term -> cic_term NCicRefiner.expected_type ->
96 'status * cic_term * cic_term (* status, term, type *)
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
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
106 val get_goalty: #pstatus -> int -> cic_term
107 val get_subst: #pstatus -> NCic.substitution
109 #pstatus as 'status -> ?attrs:NCic.meta_attrs -> NCic.context ->
110 [ `Decl of cic_term | `Def of cic_term ] -> NCicUntrusted.meta_kind ->
112 val instantiate: #pstatus as 'status -> ?refine:bool -> int -> cic_term -> 'status
113 val instantiate_with_ast: #pstatus as 'status -> int -> tactic_term -> 'status
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 ->
122 val mk_in_scope: #pstatus as 'status -> cic_term -> 'status * cic_term
124 int -> (#pstatus as 'status) -> cic_term -> 'status * cic_term
126 class type ['stack] g_status =
132 class virtual ['stack] status :
133 NCic.obj -> 'stack ->
135 inherit ['stack] g_status
137 method set_stack: 'stack -> 'self
138 method set_status: 'stack #g_status -> 'self
141 class type virtual lowtac_status = [unit] status
143 type 'status lowtactic = #lowtac_status as 'status -> int -> 'status
145 class type virtual tac_status = [Continuationals.Stack.t] status
147 val pp_tac_status: #tac_status -> unit
149 type 'status tactic = #tac_status as 'status -> 'status
151 (* indexing facilities over cic_term based on inverse De Bruijn indexes *)
153 module NCicInverseRelIndexable : Discrimination_tree.Indexable
154 with type input = cic_term and type constant_name = NUri.uri
156 module Ncic_termSet : Set.S with type elt = cic_term
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