X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Focaml%2Fcic_disambiguation%2Fdisambiguate.mli;h=5f797ab5dbbfb1ef12b0096aba811a541ac53a77;hb=6d9de12a536ee4b9e369849ff7e9aa4ca464de9d;hp=7093b1c9fd72aee206bdfd4437e3a6e7c5864aad;hpb=aba014724c9ad08f80944ec3021c9fa3826dca4a;p=helm.git diff --git a/helm/ocaml/cic_disambiguation/disambiguate.mli b/helm/ocaml/cic_disambiguation/disambiguate.mli index 7093b1c9f..5f797ab5d 100644 --- a/helm/ocaml/cic_disambiguation/disambiguate.mli +++ b/helm/ocaml/cic_disambiguation/disambiguate.mli @@ -23,38 +23,37 @@ * http://helm.cs.unibo.it/ *) -open Disambiguate_struct open Disambiguate_types -type interpretation_domain = Domain.t -type domain_and_interpretation = interpretation_domain * interpretation + (* TODO move to CicSomething *) +val term_of_uri: string -> Cic.term -(* -val add_symbol_choice: - string -> string * interpretation_codomain_item -> unit -val add_symbol_choices: - string -> (string * interpretation_codomain_item) list -> unit +(** {2 Choice registration interface} *) -val add_num_choice: string * interpretation_codomain_item -> unit -*) + (** to be raised when a choice is invalid due to some given parameter (e.g. + * wrong number of Cic.term arguments received) *) +exception Invalid_choice -module Make (C : Callbacks) : - sig - exception NoWellTypedInterpretation - - val disambiguate_input : - MQIConn.handle -> Cic.context -> Cic.metasenv -> - interpretation_domain -> (* items occuring in parser output *) - (interpretation -> Cic.term) -> (* parser output *) - domain_and_interpretation -> (* current interpretation status *) - domain_and_interpretation * Cic.metasenv * Cic.term - (* new interpretstaion status, new metasenv, disambiguated term *) - end + (** register a new symbol choice *) +val add_symbol_choice: string -> codomain_item -> unit - (* TODO move to CicSomething *) -val term_of_uri: string -> Cic.term + (** register a new number choice *) +val add_num_choice: codomain_item -> unit + +(** {2 Disambiguation interface} *) -val interpretate: - context: Cic.name option list -> interp: interpretation -> Ast.term -> - Cic.term +exception NoWellTypedInterpretation + +module Make (C : Callbacks) : + sig + val disambiguate_term : + MQIConn.handle -> + Cic.context -> + Cic.metasenv -> + Ast.term -> + aliases:environment -> (* previous interpretation status *) + environment * (* new interpretation status *) + Cic.metasenv * (* new metasenv *) + Cic.term (* disambiguated term *) + end