<key name="database">mowgli</key>
</section>
<section name="getter">
+ <!-- CSC: it was like that before!
<key name="mode">remote</key>
- <key name="url">http://localhost:58081/</key>
+ <key name="url">http://localhost:58081/</key> -->
+ <key name="cache_dir">/tmp/helm/cache</key>
+ <key name="dtd_dir">/projects/helm/xml/dtd</key>
+ <key name="port">58081</key>
+ <key name="log_level">180</key>
+ <key name="log_file">/projects/helm/daemons/log/http_getter.log</key>
+ <key name="prefix">
+ theory:/ file:///projects/helm/library/theories/
+ </key>
+ <key name="prefix">
+ xslt:/ file:///projects/helm/xml/stylesheets_ccorn/
+ </key>
+ <key name="prefix">
+ xslt:/ file:///projects/helm/xml/stylesheets_hanane/
+ </key>
+ <key name="prefix">
+ xslt:/ file:///projects/helm/xml/on-line/xslt/
+ </key>
+ <key name="prefix">
+ xslt:/ file:///projects/helm/nuprl/NuPRL/nuprl_stylesheets/
+ </key>
+ <key name="prefix">
+ nuprl:/ http://www.cs.uwyo.edu/~nuprl/helm-library/
+ </key>
+ <key name="prefix">
+ cic:/ file:///projects/helm/library/coq_contribs/
+ </key>
+ <key name="prefix">
+ xslt:/ file:///projects/helm/xml/stylesheets/
+ </key>
+ <key name="prefix">
+ xslt:/ file:///projects/helm/xml/stylesheets/generated/
+ </key>
+ <key name="prefix">
+ theory:/residual_theory_in_lambda_calculus/
+ http://helm.cs.unibo.it/~sacerdot/huet_lambda_calculus_mowgli/residual_theory_in_lambda_calculus/
+ </key>
+ <key name="prefix">
+ theory:/IDA/
+ http://mowgli.cs.unibo.it/~sacerdot/ida/IDA/
+ </key>
</section>
<section name="search_engine">
<key name="html_dir">html</key>
<key name="results_per_page">10</key>
<!-- file from which restore CicEnvironment status -->
<key name="environment_dump">foo.env</key>
+ <key name="notations">/projects/helm/daemons/matita/core_notation.moo</key>
+ <key name="interpretations">/projects/helm/daemons/matita/coq.moo</key>
</section>
</helm_registry>
aux acc n
let send_results results
- ?(id_to_uris = CicTextualParser2.EnvironmentP3.of_string "")
+ ?(id_to_uris = DisambiguateTypes.empty_environment)
(req: Http_types.request) outchan
=
let query_kind = query_kind_of_req req in
in
iter_file
(fun line ->
- let new_aliases =
- CicTextualParser2.EnvironmentP3.to_string id_to_uris
- in
+ let new_aliases = DisambiguatePp.pp_environment id_to_uris in
let processed_line =
apply_substs
(* CSC: Bug here: this is a string, not an array! *)
(fun _ -> None)
choices
in
- let id_to_uris = CicTextualParser2.EnvironmentP3.of_string id_to_uris_raw in
+ let id_to_uris = DisambiguatePp.parse_environment id_to_uris_raw in
let id_to_choices =
try
parse_choices (req#param "choices")
end
in
let module Disambiguate' = Disambiguate.Make(Chat) in
- let ast = CicTextualParser2.parse_term (Stream.of_string term_str) in
+ let ast = Grammar.Entry.parse CicNotationParser.term (Stream.of_string term_str) in
let (id_to_uris, metasenv, term) =
match
Disambiguate'.disambiguate_term ~dbd ~context ~metasenv
let uri =
match term with
| Cic.MutInd (uri, typeno, _) ->
- UriManager.uri_of_string
- (UriManager.string_of_uriref (uri, [typeno]))
+ UriManager.uri_of_uriref uri typeno None
| _ -> raise Not_a_MutInd
in
MetadataQuery.elim ~dbd uri
| Chat_unfinished -> ()
| Http_types.Param_not_found attr_name ->
bad_request (sprintf "Parameter '%s' is missing" attr_name) outchan
- | CicTextualParser2.Parse_error (_, msg) ->
+ | CicNotationParser.Parse_error (_, msg) ->
send_results (`Error (MooglePp.pp_error "Parse error" msg)) req outchan
| Unbound_identifier id ->
send_results (`Error (MooglePp.pp_error "Unbound identifier" id)) req
close_in ic;
printf "done!\n"; flush stdout
+let read_notation () =
+ CicNotation.load_notation (Helm_registry.get "search_engine.notations");
+ CicNotation.load_notation (Helm_registry.get "search_engine.interpretations")
+
let _ =
printf "%s started and listening on port %d\n" daemon_name port;
printf "Current directory is %s\n" (Sys.getcwd ());
()
in
restore_environment ();
+ read_notation ();
Http_daemon.start' ~port (callback dbd);
printf "%s is terminating, bye!\n" daemon_name