]> matita.cs.unibo.it Git - helm.git/blobdiff - matitaB/components/ng_disambiguation/grafiteDisambiguate.mli
Matitaweb:
[helm.git] / matitaB / components / ng_disambiguation / grafiteDisambiguate.mli
index 640f2927009787194fbc4bda0b515e1678c85984..fd9615cde7e5acbdc24bed36259677ebe3c6fe62 100644 (file)
@@ -28,6 +28,7 @@ type db
 class type g_status =
  object
   inherit Interpretations.g_status
+  inherit NCicLibrary.g_status
   method disambiguate_db: db
  end
 
@@ -42,7 +43,19 @@ class virtual status :
   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) ->
   ((Stdpp.location * DisambiguateTypes.domain_item) * GrafiteAst.alias_spec) list * 'a
 *)
@@ -53,6 +66,9 @@ val add_to_interpr:
  #status as 'status ->
   (Stdpp.location * GrafiteAst.alias_spec) list -> 'status 
 
+(* val print_interpr:
+ #status as 'status -> unit *)
+
 val add_to_disambiguation_univ:
  #status as 'status ->
   (DisambiguateTypes.domain_item * GrafiteAst.alias_spec) list -> 'status 
@@ -64,6 +80,9 @@ val aliases_for_objs:
 (* 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 :