exception Invalid_action of string (* invalid action for "/search" method *)
let daemon_name = "Moogle"
-let configuration_file = "searchEngine.conf.xml"
+let configuration_file = "/projects/helm/etc/moogle.conf.xml"
let expression_tag_RE = Pcre.regexp "@EXPRESSION@"
let action_tag_RE = Pcre.regexp "@ACTION@"
let interpretations_labels_RE = Pcre.regexp "@INTERPRETATIONS_LABELS@"
let results_RE = Pcre.regexp "@RESULTS@"
let new_aliases_RE = Pcre.regexp "@NEW_ALIASES@"
-let form_RE = Pcre.regexp "@FORM@"
-let variables_initialization_RE = Pcre.regexp "@VARIABLES_INITIALIZATION@"
let search_engine_url_RE = Pcre.regexp "@SEARCH_ENGINE_URL@"
-let server_and_port_url_RE = Pcre.regexp "^http://([^/]+)/.*$"
(* First of all we load the configuration *)
let _ = Helm_registry.load_from configuration_file
in
let subst =
(search_engine_url_RE, my_own_url) ::
- (results_RE, results_string)::
- (advanced_tag_RE, req#param "advanced")::
- (expression_tag_RE, req#param "expression")::
+ (results_RE, results_string) ::
+ (advanced_tag_RE, req#param "advanced") ::
+ (expression_tag_RE, req#param "expression") ::
add_param_substs req#params @
(if req#param "advanced" = "no" then
[ simple_checked_RE, "checked='true'";
let interactive_interpretation_choice interpretations =
match interpretation_choices with
- | Some l -> prerr_endline "CARRAMBA" ; l
+ | Some l -> l
| None ->
let html_interpretations =
MooglePp.html_of_interpretations interpretations
match req#path with
| "/match" -> MetadataQuery.match_term ~dbh term
| "/hint" ->
- let status = ProofEngineTypes.initial_status term [] in
+ let status = ProofEngineTypes.initial_status term metasenv in
let intros = PrimitiveTactics.intros_tac () in
let subgoals = ProofEngineTypes.apply_tactic intros status in
(match subgoals with
outchan);
debug_print (sprintf "%s done!" req#path)
with
+ | Chat_unfinished -> ()
| Http_types.Param_not_found attr_name ->
bad_request (sprintf "Parameter '%s' is missing" attr_name) outchan
| CicTextualParser2.Parse_error msg ->