-requires="helm-whelp helm-content_pres helm-cic_unification"
+requires="helm-whelp helm-acic_content helm-cic_unification"
version="0.0.1"
archive(byte)="cic_disambiguation.cma"
archive(native)="cic_disambiguation.cmxa"
-requires="helm-registry helm-tactics helm-cic_disambiguation mysql"
+requires="helm-registry helm-tactics"
version="0.0.1"
archive(byte)="paramodulation.cma"
archive(native)="paramodulation.cmxa"
obj
end
-module Trivial =
-struct
- exception Ambiguous_term of string Lazy.t
- exception Exit
- module Callbacks =
- struct
- let interactive_user_uri_choice ~selection_mode ?ok
- ?(enable_button_for_non_vars = true) ~title ~msg ~id uris =
- raise Exit
- let interactive_interpretation_choice interp = raise Exit
- let input_or_locate_uri ~(title:string) ?id = raise Exit
- end
- module Disambiguator = Make (Callbacks)
- let disambiguate_string ~dbd ?(context = []) ?(metasenv = []) ?initial_ugraph
- ?(aliases = DisambiguateTypes.Environment.empty) term
- =
- let ast =
- CicNotationParser.parse_level2_ast (Ulexing.from_utf8_string term)
- in
- try
- fst (Disambiguator.disambiguate_term ~dbd ~context ~metasenv ast
- ?initial_ugraph ~aliases ~universe:None)
- with Exit -> raise (Ambiguous_term (lazy term))
-end
-
module Make (C : DisambiguateTypes.Callbacks) : Disambiguator
-module Trivial:
-sig
- exception Ambiguous_term of string Lazy.t
-
- (** disambiguate an _unanmbiguous_ term using dummy callbacks which fail if a
- * choice from the user is needed to disambiguate the term
- * @raise Ambiguous_term for ambiguous term *)
- val disambiguate_string:
- dbd:HMysql.dbd ->
- ?context:Cic.context ->
- ?metasenv:Cic.metasenv ->
- ?initial_ugraph:CicUniv.universe_graph ->
- ?aliases:DisambiguateTypes.environment ->(* previous interpretation status*)
- string ->
- ((DisambiguateTypes.domain_item * DisambiguateTypes.codomain_item) list *
- Cic.metasenv * (* new metasenv *)
- Cic.term *
- CicUniv.universe_graph) list (* disambiguated term *)
-end
-
$(OCAMLOPT) $(OCAMLARCHIVEOPTIONS) -a -o $@ \
paramodulation.cmx
-PARAMOD_OBJS = $(IMPLEMENTATION_FILES:%.ml=%.cmo) \
- saturate_main.cmo
-PARAMOD_OBJS_OPT = $(IMPLEMENTATION_FILES:%.ml=%.cmx) \
- saturate_main.cmx
-
-saturate: $(PARAMOD_OBJS) $(LIBRARIES)
- $(OCAMLC) -thread -linkpkg -o $@ $(PARAMOD_OBJS)
-
-saturate.opt: $(PARAMOD_OBJS_OPT) $(LIBRARIES)
- $(OCAMLOPT) -thread -linkpkg -o $@ $(PARAMOD_OBJS_OPT)
+PARAMOD_OBJS = $(IMPLEMENTATION_FILES:%.ml=%.cmo)
+PARAMOD_OBJS_OPT = $(IMPLEMENTATION_FILES:%.ml=%.cmx)
+
+LOCALLINKOPTS = -package helm-cic_disambiguation,helm-content_pres,helm-grafite
+saturate: saturate_main.ml $(PARAMOD_OBJS) $(LIBRARIES)
+ $(OCAMLC) $(LOCALLINKOPTS) -thread -linkpkg -o $@ $(PARAMOD_OBJS) $<
+saturate.opt: saturate_main.ml $(PARAMOD_OBJS_OPT) $(LIBRARIES)
+ $(OCAMLOPT) $(LOCALLINKOPTS) -thread -linkpkg -o $@ $(PARAMOD_OBJS_OPT) $<
* http://cs.unibo.it/helm/.
*)
+module Trivial_disambiguate:
+sig
+ exception Ambiguous_term of string Lazy.t
+ (** disambiguate an _unanmbiguous_ term using dummy callbacks which fail if a
+ * choice from the user is needed to disambiguate the term
+ * @raise Ambiguous_term for ambiguous term *)
+ val disambiguate_string:
+ dbd:HMysql.dbd ->
+ ?context:Cic.context ->
+ ?metasenv:Cic.metasenv ->
+ ?initial_ugraph:CicUniv.universe_graph ->
+ ?aliases:DisambiguateTypes.environment ->(* previous interpretation status*)
+ string ->
+ ((DisambiguateTypes.domain_item * DisambiguateTypes.codomain_item) list *
+ Cic.metasenv * (* new metasenv *)
+ Cic.term *
+ CicUniv.universe_graph) list (* disambiguated term *)
+end
+=
+struct
+ exception Ambiguous_term of string Lazy.t
+ exception Exit
+ module Callbacks =
+ struct
+ let interactive_user_uri_choice ~selection_mode ?ok
+ ?(enable_button_for_non_vars = true) ~title ~msg ~id uris =
+ raise Exit
+ let interactive_interpretation_choice interp = raise Exit
+ let input_or_locate_uri ~(title:string) ?id = raise Exit
+ end
+ module Disambiguator = Disambiguate.Make (Callbacks)
+ let disambiguate_string ~dbd ?(context = []) ?(metasenv = []) ?initial_ugraph
+ ?(aliases = DisambiguateTypes.Environment.empty) term
+ =
+ let ast =
+ CicNotationParser.parse_level2_ast (Ulexing.from_utf8_string term)
+ in
+ try
+ fst (Disambiguator.disambiguate_term ~dbd ~context ~metasenv ast
+ ?initial_ugraph ~aliases ~universe:None)
+ with Exit -> raise (Ambiguous_term (lazy term))
+end
+
let configuration_file = ref "../../matita/matita.conf.xml";;
let core_notation_script = "../../matita/core_notation.moo";;
in
let term_string = String.concat "\n" (get ()) in
let env, metasenv, term, ugraph =
- List.nth (Disambiguate.Trivial.disambiguate_string dbd term_string) 0
+ List.nth (Trivial_disambiguate.disambiguate_string dbd term_string) 0
in
term, metasenv, ugraph
;;