class type g_status =
object
inherit Interpretations.g_status
+ inherit NCicLibrary.g_status
method disambiguate_db: db
end
class virtual status :
+ string option ->
object ('self)
inherit g_status
inherit Interpretations.status
+ inherit NCicLibrary.status
method set_disambiguate_db: db -> 'self
+ method reset_disambiguate_db: unit -> 'self
method set_disambiguate_status: #g_status -> 'self
end
-val eval_with_new_aliases:
+(* reports disambiguation errors *)
+exception Error of
+ (* location of a choice point *)
+ (Stdpp.location *
+ (* one possible choice (or no valid choice) *)
+ (GrafiteAst.alias_spec option *
+ (* list of asts together with the failing location and error msg *)
+ ((Stdpp.location * GrafiteAst.alias_spec) list *
+ Stdpp.location * string) list)
+ list)
+ list
+
+ (* val eval_with_new_aliases:
#status as 'status -> ('status -> 'a) ->
- (DisambiguateTypes.domain_item * GrafiteAst.alias_spec) list * 'a
+ ((Stdpp.location * DisambiguateTypes.domain_item) * GrafiteAst.alias_spec) list * 'a
+*)
+
+val get_interpr : db -> GrafiteAst.alias_spec DisambiguateTypes.InterprEnv.t
-val set_proof_aliases:
+val add_to_interpr:
#status as 'status ->
- implicit_aliases:bool -> (* implicit ones are made explicit *)
- GrafiteAst.inclusion_mode ->
- (DisambiguateTypes.domain_item * GrafiteAst.alias_spec) list -> 'status
+ (Stdpp.location * GrafiteAst.alias_spec) list -> 'status
+
+val add_to_disambiguation_univ:
+ #status as 'status ->
+ (DisambiguateTypes.domain_item * GrafiteAst.alias_spec) list -> 'status
val aliases_for_objs:
- #NCic.status -> NUri.uri list ->
+ #NCicLibrary.status -> NUri.uri list ->
(DisambiguateTypes.domain_item * GrafiteAst.alias_spec) list
(* args: print function, message (may be empty), status *)
val dump_aliases: (string -> unit) -> string -> #status -> unit
+(* reports the first source of ambiguity and its possible interpretations *)
+exception Ambiguous_input of (Stdpp.location * GrafiteAst.alias_spec list)
+
exception BaseUriNotSetYet
val disambiguate_nterm :
val disambiguate_nobj :
#status as 'status -> ?baseuri:string ->
(NotationPt.term NotationPt.obj) Disambiguate.disambiguator_input ->
- 'status * NCic.obj
+ 'status * NCic.obj
type pattern =
NotationPt.term Disambiguate.disambiguator_input option *
(string * NCic.term) list * NCic.term option
val disambiguate_npattern:
- #NCic.status -> GrafiteAst.npattern Disambiguate.disambiguator_input -> pattern
+ #NCicEnvironment.status -> GrafiteAst.npattern Disambiguate.disambiguator_input -> pattern
val disambiguate_cic_appl_pattern:
#status ->