diff options
Diffstat (limited to 'toplevel/whelp.ml4')
-rw-r--r-- | toplevel/whelp.ml4 | 26 |
1 files changed, 24 insertions, 2 deletions
diff --git a/toplevel/whelp.ml4 b/toplevel/whelp.ml4 index 0e17df28..b067ba1f 100644 --- a/toplevel/whelp.ml4 +++ b/toplevel/whelp.ml4 @@ -8,7 +8,7 @@ (*i camlp4deps: "parsing/grammar.cma" i*) -(* $Id: whelp.ml4 9976 2007-07-12 11:58:30Z msozeau $ *) +(* $Id: whelp.ml4 10105 2007-08-30 16:53:32Z herbelin $ *) open Options open Pp @@ -32,8 +32,30 @@ open Tacmach (* Coq interface to the Whelp query engine developed at the University of Bologna *) +let whelp_server_name = ref "http://mowgli.cs.unibo.it:58080" +let getter_server_name = ref "http://mowgli.cs.unibo.it:58081" + +open Goptions + +let _ = + declare_string_option + { optsync = false; + optname = "Whelp server"; + optkey = (SecondaryTable ("Whelp","Server")); + optread = (fun () -> !whelp_server_name); + optwrite = (fun s -> whelp_server_name := s) } + +let _ = + declare_string_option + { optsync = false; + optname = "Whelp getter"; + optkey = (SecondaryTable ("Whelp","Getter")); + optread = (fun () -> !getter_server_name); + optwrite = (fun s -> getter_server_name := s) } + + let make_whelp_request req c = - "http://mowgli.cs.unibo.it/forward/58080/apply?xmluri=http%3A%2F%2Fmowgli.cs.unibo.it%3A58081%2Fgetempty¶m.profile=firewall&profile=firewall¶m.keys=d_c%2CC1%2CHC2%2CL¶m.embedkeys=d_c%2CTC1%2CHC2%2CL¶m.thkeys=T1%2CT2%2CL%2CE¶m.prooftreekeys=HAT%2CG%2CHAO%2CL¶m.media-type=text%2Fhtml¶m.thmedia-type=&prooftreemedia-type=¶m.doctype-public=¶m.encoding=¶m.thencoding=¶m.prooftreeencoding=&advanced=no&keys=S%2CT1%2CT2%2CL%2CRT%2CE¶m.expression=" ^ c ^ "¶m.action=" ^ req + !whelp_server_name ^ "/apply?xmluri=" ^ !getter_server_name ^ "/getempty¶m.profile=firewall&profile=firewall¶m.keys=d_c%2CC1%2CHC2%2CL¶m.embedkeys=d_c%2CTC1%2CHC2%2CL¶m.thkeys=T1%2CT2%2CL%2CE¶m.prooftreekeys=HAT%2CG%2CHAO%2CL¶m.media-type=text%2Fhtml¶m.thmedia-type=&prooftreemedia-type=¶m.doctype-public=¶m.encoding=¶m.thencoding=¶m.prooftreeencoding=&advanced=no&keys=S%2CT1%2CT2%2CL%2CRT%2CE¶m.expression=" ^ c ^ "¶m.action=" ^ req let b = Buffer.create 16 |