]> matita.cs.unibo.it Git - helm.git/commitdiff
Branch V7_3_new_exportation merged.
authorClaudio Sacerdoti Coen <claudio.sacerdoticoen@unibo.it>
Mon, 23 Jun 2003 15:58:50 +0000 (15:58 +0000)
committerClaudio Sacerdoti Coen <claudio.sacerdoticoen@unibo.it>
Mon, 23 Jun 2003 15:58:50 +0000 (15:58 +0000)
29 files changed:
helm/searchEngine/html/aliaslist.html [new file with mode: 0644]
helm/searchEngine/html/almost_blank.html [new file with mode: 0644]
helm/searchEngine/html/blank.html [new file with mode: 0644]
helm/searchEngine/html/boole.html [new file with mode: 0644]
helm/searchEngine/html/constraints_choice_template.html [new file with mode: 0644]
helm/searchEngine/html/editor.html [new file with mode: 0644]
helm/searchEngine/html/editorpdq.html [new file with mode: 0644]
helm/searchEngine/html/expnamedsubst.html [new file with mode: 0644]
helm/searchEngine/html/expr.html [new file with mode: 0644]
helm/searchEngine/html/genid.html [new file with mode: 0644]
helm/searchEngine/html/grammar.html [new file with mode: 0644]
helm/searchEngine/html/grammarpdq.html [new file with mode: 0644]
helm/searchEngine/html/index.html [new file with mode: 0644]
helm/searchEngine/html/loc_obj.html [new file with mode: 0644]
helm/searchEngine/html/manual/alias.jpg [new file with mode: 0644]
helm/searchEngine/html/manual/ex1.jpg [new file with mode: 0644]
helm/searchEngine/html/manual/frames.jpg [new file with mode: 0644]
helm/searchEngine/html/manual/index.html [new file with mode: 0644]
helm/searchEngine/html/mat_con.html [new file with mode: 0644]
helm/searchEngine/html/paginacollink.html [new file with mode: 0644]
helm/searchEngine/html/pdq.html [new file with mode: 0644]
helm/searchEngine/html/query_choice.html [new file with mode: 0644]
helm/searchEngine/html/set.html [new file with mode: 0644]
helm/searchEngine/html/start.html [new file with mode: 0644]
helm/searchEngine/html/summary.html [new file with mode: 0644]
helm/searchEngine/html/templateambigpdq1.html [new file with mode: 0644]
helm/searchEngine/html/templateambigpdq2.html [new file with mode: 0644]
helm/searchEngine/html/templateambigpdq3.html [new file with mode: 0644]
helm/searchEngine/html/val.html [new file with mode: 0644]

diff --git a/helm/searchEngine/html/aliaslist.html b/helm/searchEngine/html/aliaslist.html
new file mode 100644 (file)
index 0000000..d030ea4
--- /dev/null
@@ -0,0 +1,89 @@
+<HTML>
+<HEAD>
+<SCRIPT language="Javascript">
+function invia()
+       {
+       stadd="";
+       for (num=0;num<parent.calias;num++)
+               {
+               stadd=stadd+parent.alist[num]+" ";
+               //alert(stadd);
+               }
+       //top.window.open(top.topurl+top.action+"editorpdq.html","sw");
+       top.window.sw.editalias(stadd);
+       //alert(parent.mcq);
+       parent.mcq=parent.mcq.replace("<font color=\"#ff0000\">[Alias list]</font>","");
+       //alert(parent.mcq);
+       //top.qw.document.close();
+       //top.qw.document.write(parent.mcq);
+       if (parent.mcq=="<font color=\"#ff0000\">[Alias list]</font> [Expr]")   
+               {
+               parent.mcq="[Expr]";
+               }
+       else 
+               {
+               parent.mcq=parent.mcq.replace("<font color=\"#ff0000\">","");
+               parent.mcq=parent.mcq.replace("</font>","");
+               }
+       parent.parse(parent.mcq);
+       }
+function rimuovialias()
+       {
+       //alert(document.aliaslist.elenco.value);
+       if (document.aliaslist.elenco.value!="")
+               {
+                       for (var i=document.aliaslist.elenco.length-1;i>-1;i--)
+                       {
+                       if (document.aliaslist.elenco.options[i].selected==true)
+                               {
+                               for (num=i;num<top.aliasglob.length;num++)
+                               {
+                               top.aliasglob[num]=top.aliasglob[num+1];
+                               }
+                               top.aliasglob.length--;
+                               //alert ("rimosso "+i);
+                               //parent.aggiorna();
+                               }
+                       }
+               top.window.open(top.topurl+top.action+"aliaslist.html",(top.cw.frames.length==0?"cw":"bw"));
+               }
+       }
+function listalias()
+       {
+       for (num=0;num<top.aliasglob.length;num++)
+               {
+               document.write("<OPTION value="+num+">"+top.aliasglob[num]);
+               //alert (top.aliasglob[num]);
+               }
+       }
+function addalias()
+       {
+       if (top.idcheck(document.aliaslist.idi.value)==1 && top.uricheck(document.aliaslist.uri.value)==1)
+               {
+               top.aliasglob[top.aliasglob.length]="alias "+document.aliaslist.idi.value+" "+document.aliaslist.uri.value;
+               //parent.aggiorna();
+               top.window.open(top.topurl+top.action+"aliaslist.html",(top.cw.frames.length==0?"cw":"bw"));
+               }
+       }
+function istruzioni()
+       {       
+       top.hw.document.close();
+       top.hw.document.write("You must now enter a list of alias. An Alias is the word 'alias' followed by an <a href='grammarpdq.html#Id' target='gw'>Id</a>, followed by an <a href='grammarpdq.html#Uri' target='gw'>Uri</a>.You may enter as many of them as you want, after each one click the button 'add alias' or press enter and it will be added. When you are done, click 'done'.");
+       }
+istruzioni();
+</SCRIPT>
+</HEAD>
+<BODY>
+<form name="aliaslist" action="Javascript:addalias();" method="get">
+alias
+<input name="idi" type=text size="15" value="">
+<input name="uri" type=text size="45" value="cic:/"><br>
+<input type=submit value="add alias"><input type=button value="delete selected" onClick="rimuovialias()";><br>
+<select name="elenco" multiple size=7>
+<SCRIPT language=Javascript> listalias(); document.aliaslist.idi.focus(); </SCRIPT>
+</select>
+<br>
+<input type=button value="Done" onClick="top.window.open(top.topurl+top.action+'blank.html','hw');top.window.open(top.topurl+top.action+'editorpdq.html','sw');invia();" ><br>
+</form>
+</BODY>
+</HTML>
diff --git a/helm/searchEngine/html/almost_blank.html b/helm/searchEngine/html/almost_blank.html
new file mode 100644 (file)
index 0000000..05204a5
--- /dev/null
@@ -0,0 +1,5 @@
+<HTML>
+<body bgcolor="#ffffff";>
+Are you lost? Consult the <a href="http://helm.cs.unibo.it/searchEngine/manual/index.html" target="_blank">on-line manual</a>
+</body>
+</HTML>
diff --git a/helm/searchEngine/html/blank.html b/helm/searchEngine/html/blank.html
new file mode 100644 (file)
index 0000000..3334d0b
--- /dev/null
@@ -0,0 +1,4 @@
+<HTML>
+<body bgcolor="#ffffff";>
+</body>
+</HTML>
diff --git a/helm/searchEngine/html/boole.html b/helm/searchEngine/html/boole.html
new file mode 100644 (file)
index 0000000..6702432
--- /dev/null
@@ -0,0 +1,77 @@
+<HTML>
+<HEAD>
+<SCRIPT language="Javascript">
+function help()
+       {
+       with (document.form1) {
+       if (selopt[0].checked)
+       alert ("No help available.");
+       if (selopt[1].checked)
+       alert ("Parenthesis are employed to force precedence between operators.");
+       if (selopt[2].checked)
+       alert ("'not' returns true if the given [boole] is false, 'ex' returns true if there is at least one group of attributes for each [rvar] referenced by the operators or inside the given [boole] for which the condition is true.");
+       if (selopt[3].checked)
+       alert ("'and' returns true if both conditions are true, 'or' returns true if at least one is true.");
+       if (selopt[4].checked)
+       alert ("'sub' returns true if the first [val] is a subset of the second.\n'meet' returns true if the intersection between the two [val] is not empty.\n'eq' returns true if both [val] are identical.");
+       }
+       }
+function choice()
+{
+top.stadd="";
+with (document.form1) {
+       if (selopt[0].checked) {
+               top.stadd=boole1.value;
+                                         }
+       if (selopt[1].checked) {
+               top.stadd="([boole])";
+                                         }
+       if (selopt[2].checked) {
+               top.stadd=boole2.value+" [boole]";
+                                         }
+       if (selopt[3].checked) {
+               top.stadd="[boole] "+boole3.value+" [boole]";
+                                         }
+       if (selopt[4].checked) {
+               top.stadd="[val] "+boole4.value+" [val]";
+                                         }
+       if (selopt[5].checked) {
+               boole5.value=top.tpa(boole5.value);
+               top.stadd=boole5.value;
+                                         }
+                  }
+if (top.stadd!="") top.aggq();
+       else alert("You left at least one field unfilled");
+}
+</SCRIPT>
+</HEAD>
+<BODY>
+<h1> <SCRIPT language="Javascript">document.write(top.ltr) </SCRIPT>
+<input type="button" value="&lt;-" onmouseOver="top.help(-8)" onclick="top.annulla()">
+<input type="button" value="-&gt;" onmouseOver="top.help(-81)" onclick="top.ripristina()"></h1>
+<h2> Select one of the following: </h2>
+<form name="form1" action="Javascript:choice();" method="get">
+<input type="radio" name="selopt"> <select name="boole1" onFocus="selopt[0].checked=true">
+<OPTION value=false> false
+<OPTION value=true> true
+</select> <br>
+<input type="radio" name="selopt"> ( [boole] ) <br>
+<input type="radio" name="selopt"> <select name="boole2" onFocus="selopt[2].checked=true">
+<OPTION value=not> not
+<OPTION value=ex> ex
+</select> [boole] <br>
+<input type="radio" name="selopt"> [boole] <select name="boole3" onFocus="selopt[3].checked=true">
+<OPTION value=and> and
+<OPTION value=or> or
+</select> [boole]  <br>
+<input type="radio" name="selopt"> [val] <select name="boole4" onFocus="selopt[4].checked=true">
+<OPTION value=sub> sub
+<OPTION value=meet> meet
+<OPTION value=eq> eq
+</select>
+[val]<br>
+<input type="radio" name="selopt"> <input name="boole5" type=text onFocus="selopt[5].checked=true;top.help(1)"> <br>
+<input type="submit" value="compose"><input type="button" value="get help" onclick="help()">
+</form>
+</BODY>
+</HTML>
\ No newline at end of file
diff --git a/helm/searchEngine/html/constraints_choice_template.html b/helm/searchEngine/html/constraints_choice_template.html
new file mode 100644 (file)
index 0000000..c81a8d7
--- /dev/null
@@ -0,0 +1,18 @@
+<html>
+  <head>
+    <title>Refine the Constraints</title>
+    <style> A { text-decoration: none } </style>
+  </head>
+  <body>
+    <form name="constraints">
+     <b>You can now proceed using the default generated constraints or you
+     can refine them by hand before going on.</b> <br /> <br />
+     <SCRIPT language="Javascript">
+      @VARIABLES_INITIALIZATION@
+     </SCRIPT>
+     <input type="button" value="Submit Query" onClick="top.constraints_choice_template_invia(document,aliases,constr_obj_len,constr_rel_len,constr_sort_len)"/>
+     @FORM@
+     <br />
+    </form>
+  </body>
+</html>
diff --git a/helm/searchEngine/html/editor.html b/helm/searchEngine/html/editor.html
new file mode 100644 (file)
index 0000000..1e6afe7
--- /dev/null
@@ -0,0 +1,122 @@
+<HTML>
+<HEAD>
+<SCRIPT language="Javascript">
+qbf=/[[^\[\]<>]*|<set>|<val>|<boole>]*/
+function invia()
+       {
+       window.open(top.ask_uwobo(top.topurl+"/execute?query="+escape(document.edit.qta.value)),"cw");
+       }
+function parse1()
+       {
+       while (fb.indexOf("<")>-1){
+       if (fb.indexOf("<")>0)
+               {
+               fb=fb.replace("<","&lt;");
+               }
+                                        }
+       while (fb.indexOf(">")>-1){
+       if (fb.indexOf(">")>0)
+               {
+               fb=fb.replace(">","&gt;");
+               }
+                                        }
+       //while (fb.indexOf("[?")>-1){
+               //fb=fb.replace("[?","&gt;");
+                       //               }
+       }
+function parse()
+       {
+       while (fb.indexOf("<set>")>-1)
+               {
+               fb=fb.replace("<set>","[set]");
+               }
+       while (fb.indexOf("<val>")>-1)
+               {
+               fb=fb.replace("<val>","[val]");
+               }
+       while (fb.indexOf("<boole>")>-1)
+               {
+               fb=fb.replace("<boole>","[boole]");
+               }
+       parse1();
+       }
+function armageddon()
+       {
+        if (confirm("This will delete your query and restart a new one. Are you sure?")) {
+       top.initialize();
+       top.window.open(top.topurl+top.action+"start.html","qw");
+       top.window.open(top.topurl+top.action+"blank.html","cw");
+       top.window.open(top.topurl+top.action+"blank.html","hw");
+       top.window.open(top.topurl+top.action+"blank.html","gw");
+       top.window.open(top.topurl+top.action+"blank.html","sw");
+       }
+        }
+function comprimispazi()
+       {
+       stringa=document.edit.qta.value;
+       while (stringa.charAt(0)==" ") {stringa=stringa.substring(1,stringa.length)}
+       sle=stringa.length;
+       for (i=1;i<sle;i++)
+               {
+               if (stringa.charAt(i)==" " && stringa.charAt(i+1)==" ") {
+                       //alert("i="+i+"char="+stringa.charAt(i));
+                       //alert(stringa.substring(0,i)+"---"+stringa.substring(i+1,stringa.length));
+                       stringa=stringa.substring(0,i)+stringa.substring(i+1,stringa.length); i--;}             
+               }
+       document.edit.qta.value=stringa;
+       }
+function apply()
+       {
+       top.storep=1;
+       fb=document.edit.qta.value;
+       ok=qbf.test(fb);
+       if (ok){
+       parse();
+       //alert("parse ok");
+       top.fb=fb;
+       top.storeps=1;top.storepv=1;top.storepb=1;
+       top.parse();
+       //alert("top.parse ok");
+       top.query=top.fb;
+       top.qw.document.close();
+       top.qw.document.write(top.query);
+       top.aggform();  //alert("aggform ok");
+       top.aggcw();//alert("aggcw ok");
+       comprimispazi();}
+       }
+function inserisci(mq)
+       {
+       document.edit.qta.focus();
+       var TR=document.selection.createRange();
+       if(TR!=null)
+               {
+                       TR.text=TR.text+mq;
+               } 
+       else document.edit.qta.value+=mq;
+       //comprimispazi();
+       }
+function agg()
+       {
+       document.edit.qta.value=top.cquery;
+       comprimispazi();
+       }
+</SCRIPT>
+</HEAD>
+<BODY>
+<table>
+<tr><td>
+<form name="edit" method="get" action="Javascript:invia()">
+<textarea name="qta" cols="40" rows="8" onMouseOver="top.help(-2)";>
+</textarea>
+</td>
+<td>
+<input type="button" value="set" onMouseOver="top.help(-6)" onClick="inserisci(' <set> ');"><br>
+<input type="button" value="val" onMouseOver="top.help(-6)" onClick="inserisci(' <val> ');"><br>
+<input type="button" value="bol" onMouseOver="top.help(-6)" onClick="inserisci(' <boole> ');"><br>
+</td></tr></table>
+<input type="submit" value="Submit the query" onMouseOver="top.help(-4)"></input>
+<input type="button" value="Restart" onMouseOver="top.help(-5)" onClick="armageddon()"></input>
+<input type="button" value="Apply Changes" onMouseOver="top.help(-3)" onClick="apply();top.actinput++;top.storia[top.actinput]=top.query;top.numeroazioniannullate=0;"></input>
+</form>
+</BODY>
+</HTML>
diff --git a/helm/searchEngine/html/editorpdq.html b/helm/searchEngine/html/editorpdq.html
new file mode 100644 (file)
index 0000000..21e8039
--- /dev/null
@@ -0,0 +1,90 @@
+<HTML>
+<HEAD>
+<SCRIPT language="Javascript">
+var alias="";
+var expr="";
+function armageddon()
+       {
+       if (confirm("Are you sure you want to delete your query and start a new one?"))
+               {
+               top.terminecic="";top.listaliases="";top.ricordaliaslist=0;top.vlds=new Array();var alias="";var expr="";
+               top.initialize();
+               top.window.open(top.topurl+top.action+"start.html","qw");
+               top.window.open(top.topurl+top.action+"blank.html","cw");
+               top.window.open(top.topurl+top.action+"blank.html","hw");
+               top.window.open(top.topurl+top.action+"blank.html","gw");
+               top.window.open(top.topurl+top.action+"blank.html","sw");
+               }
+       }
+function nuovapdqsa()
+       {
+       if (confirm("Are you sure you want to change expression?"))
+               {
+               top.terminecic="";
+               document.invio.expression.value="";document.invio.aliaslist.value=unescape(top.listaliases);
+               top.ricordaliaslist=1;
+               window.open(top.topurl+top.action+"pdq.html","cw");
+               window.open(top.topurl+top.action+"editorpdq.html","sw");
+               }
+       }
+function invia()
+       {
+       if (document.invio.expression.value!="")
+               {top.terminecic=escape(document.invio.expression.value);
+    top.listaliases="";
+               for (i=0;i<top.aliasglob.length;i++)
+                       {
+                       top.listaliases=top.listaliases+escape(top.aliasglob[i]+" ");
+                       }
+               //alert(top.listaliases);
+    window.open(top.ask_uwobo(top.topurl+"/"+top.current_query+"?term="+escape(document.invio.expression.value)+"&aliases="+top.listaliases),"cw");
+        }
+               //window.open(top.topurl+top.action+"templateambigpdq2.html","bw")}     
+       else {alert("Please complete the query before.")}
+       }
+function warning()
+       {
+       alert("You may not modify this field.",alias);
+       document.invio.aliaslist.value=alias;
+       document.invio.expression.value=expr;
+       }
+function editalias(valore)
+       {
+       top.window.sw.alias=valore;
+       document.invio.aliaslist.value=valore;
+       }
+function editexpr(valore)
+       {
+       top.window.sw.expr=valore;
+       document.invio.expression.value=valore;
+       }
+function listalias()
+       {
+       for (num=0;num<top.aliasglob.length;num++)
+               {
+               //alert(top.aliasglob[num]);
+               document.write("<OPTION value="+num+">"+top.aliasglob[num]);
+               }
+       }
+function editaalias()
+       {
+       if (document.invio.expression.value!=""){top.terminecic=escape(document.invio.expression.value)}
+       top.window.open(top.topurl+top.action+"aliaslist.html",(top.cw.frames.length==0?"cw":"bw"));
+       }
+</SCRIPT>
+</HEAD>
+<BODY>
+<form name="invio" action="Javascript:invia();">
+<select name="aliaslist" size=1>
+<SCRIPT language=Javascript> listalias(); </script>
+</select> Your list of alias.
+<input type=button value="edit" onMouseOver="top.help(-9)" onClick="editaalias()";>
+</br>
+<textarea name="expression" cols="43" rows="6"></textarea><br>Your expression.<br>
+<input type=submit value="Submit" onMouseOver="top.help(-4)"></input>
+<input type=button value="Restart" onMouseOver="top.help(-5)" onClick="armageddon()"></input>
+<input type=button value="New expression" onMouseOver="top.help(-7)" onClick="nuovapdqsa()"></input>
+</form>
+<SCRIPT language=Javascript>document.invio.expression.value=unescape(top.terminecic); </script>
+</BODY>
+</HTML>
diff --git a/helm/searchEngine/html/expnamedsubst.html b/helm/searchEngine/html/expnamedsubst.html
new file mode 100644 (file)
index 0000000..3db7aca
--- /dev/null
@@ -0,0 +1,78 @@
+<HTML>
+<HEAD>
+<SCRIPT language="Javascript">
+function invia()
+       {
+       stadd="{";
+       for (num=0;num<parent.calias;num++)
+               {
+               stadd=stadd+parent.alist[num]+":=[Expr];";
+               //alert(stadd);
+               }
+       //alert(parent.mcq);
+       //alert(stadd.charAt(stadd.length-1));
+       if (stadd.charAt(stadd.length-1)==";"){stadd=stadd.substring(0,stadd.length-1);}
+       stadd=stadd+"}"
+       if (stadd==("{}")){stadd=""}
+       parent.mcq=parent.mcq.replace("<font color=\"#ff0000\">[exp_named_subst]</font>",stadd);
+       //alert(parent.mcq);
+       //top.qw.document.close();
+       //top.qw.document.write(parent.mcq);
+       parent.parse(parent.mcq);
+       }
+function rimuovialias()
+       {
+       //alert(document.aliaslist.elenco.value);
+       if (document.aliaslist.elenco.value!=""){
+       for (num=Number(document.aliaslist.elenco.value);num<parent.calias;num++)
+               {
+               //alert (parent.alist[num]+" "+parent.alist[num+1]);
+               parent.alist[num]=parent.alist[num+1];
+               }
+       parent.calias--;parent.aggiorna2();}
+       }
+function listalias()
+       {
+       for (num=0;num<parent.calias;num++)
+               {
+               document.write("<OPTION value="+num+">"+parent.alist[num]);
+               //alert (parent.alist[num]);
+               }
+       }
+function addalias()
+       {
+       ok=0;
+       if (document.aliaslist.varid.value.indexOf("/")>0)
+               {if (top.uricheck(document.aliaslist.varid.value)==1 && document.aliaslist.varid.value.substring(document.aliaslist.varid.value.length-3,document.aliaslist.varid.value.length)=="var")
+                       {ok=1}
+               }
+       else {if (top.idcheck(document.aliaslist.varid.value)==1)
+               {ok=1}
+               }       
+       if (ok==1)
+               {
+               //alert (document.aliaslist.idi.value+" "+document.aliaslist.uri.value);
+               parent.alist[parent.calias]=document.aliaslist.varid.value
+               //alert (parent.alist[parent.calias]);
+               parent.calias=parent.calias+1;
+               parent.aggiorna2();
+               }
+       }
+</SCRIPT>
+</HEAD>
+<BODY>
+You must now enter a list of named_subst. A named_subst is an <a href="grammarpdq.html#Id" target="gw">Id</a> or a <a href="grammarpdq.html#Varuri" target="gw">Varuri</a> followed by ":=" followed by an expression.
+You may enter as many of them as you want (even none), after each one click the button "add" or press enter and it will be added. When you are done, click "done".
+<br>
+<form name="aliaslist" action="Javascript:addalias();" method="get">
+<input name="varid" type=text size="35"> Insert here the Id or the Uri you want to add.
+<input type=submit value="add"><input type=button value="delete selected" onClick="rimuovialias()";>
+<br>
+<select name="elenco" size=7>
+<SCRIPT language=Javascript> listalias(); </SCRIPT>
+</select>
+<br>
+<input type=button value="Done" onClick="invia();" >
+</form>
+</BODY>
+</HTML>
diff --git a/helm/searchEngine/html/expr.html b/helm/searchEngine/html/expr.html
new file mode 100644 (file)
index 0000000..3e302b8
--- /dev/null
@@ -0,0 +1,60 @@
+<HTML>
+<HEAD>
+<SCRIPT language="Javascript">
+function choice()
+       {
+with (document.form1) {        
+       stadd="";top.qw.document.close();quanti=0;
+       if (selopt[0].checked) {stadd="\[Genid]"+document.form1.ex1.value+"[Expr].[Expr]"}
+       if (selopt[1].checked) {stadd="![Genid]:[Expr].[Expr]"}
+       if (selopt[2].checked) {stadd="[Expr]-&gt;[Expr]"}
+       if (selopt[3].checked) {stadd="([Expr])-&gt;[Expr]"}
+       if (selopt[4].checked) {stadd=document.form1.ex2.value}
+       if (selopt[5].checked) {
+                               while (quanti<1)
+                                       {
+                                       quanti=prompt("How many expressions in the list?","1");//alert(quanti);
+                                       if (isNaN(quanti)){quanti=0;}
+                                       }
+                               stadd="(";
+                               for (i=0;i<Math.floor(quanti);i++)
+                               {stadd=stadd+"[Expr] "}
+                               stadd=stadd+")";
+                              }
+       if (selopt[6].checked) {
+                               stadd=document.form1.id_or_uri.value;
+                               //alert(stadd.substring(0,5));
+                               if (stadd.substring(0,5)=="cic:/") 
+                                       {if (!top.uricheck(stadd)){stadd="";}}
+                               else if (!top.idcheck(stadd)){stadd="";}
+                               //alert(stadd);                                 
+                               }
+       if (stadd!="") {parent.mcq=parent.mcq.replace("<font color=\"#ff0000\">[Expr]</font>",stadd);
+       //top.qw.document.write(parent.mcq);
+       parent.parse(parent.mcq);}
+                       }
+       }
+</SCRIPT>
+</HEAD>
+<BODY>
+You are entering an expression. Select one of the following.
+<form name="form1" action="Javascript:choice();" method="get">
+<input type="radio" name="selopt">\[Genid]<select name="ex1" onFocus="selopt[0].checked=true;">
+<option value=":">:
+<option value=":=">:=
+</select>[Expr].[Expr] <br>
+<input type="radio" name="selopt">![Genid]:[Expr].[Expr] <br>
+<input type="radio" name="selopt">[Expr]-&gt;[Expr]<br>
+<input type="radio" name="selopt">([Expr])-&gt;[Expr]<br>
+<input type="radio" name="selopt"> <select name="ex2" onFocus="selopt[4].checked=true;">
+<option value="Prop"> Prop 
+<option value="Set"> Set
+<option value="Type"> Type
+<option value="?"> ?
+</select> <br>
+<input type="radio" name="selopt"> ( [Expr list] ) <br>
+<input type="radio" name="selopt"> <input name="id_or_uri" type="text" onFocus="selopt[6].checked=true;top.help(-10)"><br>
+<input type=submit value="Select">
+</form>
+</BODY>
+</HTML>
\ No newline at end of file
diff --git a/helm/searchEngine/html/genid.html b/helm/searchEngine/html/genid.html
new file mode 100644 (file)
index 0000000..1ca94c4
--- /dev/null
@@ -0,0 +1,27 @@
+<HTML>
+<HEAD>
+<SCRIPT language="Javascript">
+sel=2;stadd="";
+function choice()
+       {
+       if (sel==0){stadd=document.form1.gen0.value;if (!top.idcheck(document.form1.gen0.value)){stadd=""}}
+       if (sel==1){stadd=document.form1.gen1.value;if (!top.uricheck(document.form1.gen1.value)){stadd=""}
+       if (stadd.substring(stadd.length-3,stadd.length)=="con"){stadd="";alert("You may not enter a Conuri.")}}
+       if (sel==1 && stadd!="") {stadd=stadd+" [exp_named_subst]";}
+       if (stadd!="") {parent.mcq=parent.mcq.replace("<font color=\"#ff0000\">[Genid]</font>",stadd);
+       //top.qw.document.close();top.qw.document.write(parent.mcq);
+       parent.parse(parent.mcq);}
+       sel=2;
+       }
+</SCRIPT>
+</HEAD>
+<BODY>
+You are now entering a Genid. It may be a simple <a href="grammarpdq.html#Id" target="gw">Id</a>, or an <a href="grammarpdq.html#Uri" target="gw">Uri</a> followed by nothing or by an <a href="grammarpdq.html#Exp_Named_Subst" target="gw">Exp_Named_Subst</a>.
+<form name="form1" action="Javascript:choice();" method="get">
+<input name="gen0" type=text onFocus="sel=0"> Insert here the <a href="grammarpdq.html#Id" target="gw">Id</a>
+<br>
+<input name="gen1" type=text value="cic:/" onFocus="sel=1"> Or insert here the <a href="grammarpdq.html#Uri" target="gw">Uri</a>. The uri may not be a <a href="grammarpdq.html#Conuri" target="gw">Conuri</a>.<br>
+<input type=submit value="Enter">
+</form>
+</BODY>
+</HTML>
diff --git a/helm/searchEngine/html/grammar.html b/helm/searchEngine/html/grammar.html
new file mode 100644 (file)
index 0000000..a18b27c
--- /dev/null
@@ -0,0 +1,76 @@
+<HTML>
+<HEAD>
+</HEAD>
+<BODY>
+<A NAME="string">
+<P><B>&lt;string&gt;</B>::= '"' [ "\" . | '^ " \' ] * '"'</A>
+<A NAME="path">
+<P><B>&lt;path&gt;</B>::= &lt;<A HREF="#string">string</A>&gt; [ "/" &lt;<A HREF="#string">string</A>&gt; ] *</A>
+<A NAME="string_list">
+<P><B>&lt;string_list&gt;</B>::= &lt;<A HREF="#string">string</A>&gt; [ "," &lt;<A HREF="#string">string</A>&gt; ] *</A>
+<A NAME="alpha">
+<P><B>&lt;alpha&gt;</B>::= [ 'A - Z' | 'a - z' |' :_' ] + </A>
+<A NAME="number">
+<P><B>&lt;number&gt;</B>::= [ '0 - 9' ] + </A>
+<A NAME="id">
+<P><B>&lt;id&gt;</B>::= &lt;<A HREF="#alpha">alpha</A>&gt; [ &lt;<A HREF="#alpha">alpha</A>&gt; | &lt;<A HREF="#number">number</A>&gt; ] * </A>
+<A NAME="rvar">
+<P><B>&lt;rvar&gt;</B>::= "@" &lt;<A HREF="#id">id</A>&gt; </A>
+<A NAME="svar">
+<P><B>&lt;svar&gt;</B>::= "%" &lt;<A HREF="#id">id</A>&gt; </A>
+<A NAME="vvar">
+<P><B>&lt;vvar&gt;</B>::= "$" &lt;<A HREF="#id">id</A>&gt; </A>
+<A NAME="refine">
+<P><B>&lt;refine&gt;</B>::= [ "sub" | "super" ] ? </A>
+<A NAME="qualifier">
+<P><B>&lt;qualifier&gt;</B>::= [ "inverse" ] ? &lt;<A HREF="#refine">refine</A>&gt; &lt;<A HREF="#path">path</A>&gt; </A>
+<A NAME="assign">
+<P><B>&lt;assign&gt;</B>::= &lt;<A HREF="#vvar">vvar</A>&gt; "&lt;-" &lt;<A HREF="#path">path</A>&gt; </A>
+<A NAME="attr_list">
+<P><B>&lt;attr_list&gt;</B>::= [ "attr" &lt;<A HREF="#assign">assign</A>&gt; [ "," &lt;<A HREF="#assign">assign</A>&gt;] * ] ? </A>
+<A NAME="set">
+<P><B>&lt;set&gt;</B>::= "ref" &lt;<A HREF="#val">val</A>&gt; </A><BR>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+| "pattern" &lt;<A HREF="#val">val</A>&gt;<BR>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+| &lt;<A HREF="#svar">svar</A>&gt;<BR>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+| &lt;<A HREF="#rvar">rvar</A>&gt;<BR>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+| "(" &lt;<A HREF="#set">set</A>&gt; ")"<BR>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+| "relation" &lt;<A HREF="#qualifier">qualifier</A>&gt; &lt;<A HREF="#val">val</A>&gt; &lt;<A HREF="#attr_list">attr_list</A>&gt;<BR>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+| "select" &lt;<A HREF="#rvar">rvar</A>&gt; "in" &lt;<A HREF="#set">set</A>&gt; "where" &lt;<A HREF="#boole">boole</A>&gt;<BR>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+| &lt;<A HREF="#set">set</A>&gt; [ "union" | "intersect" | "diff" ] &lt;<A HREF="#set">set</A>&gt;<BR>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+| "let" &lt;<A HREF="#svar">svar</A>&gt; "be" &lt;<A HREF="#set">set</A>&gt; "in" &lt;<A HREF="#set">set</A>&gt; <BR>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+| "let" &lt;<A HREF="#vvar">vvar</A>&gt; "be" &lt;<A HREF="#val">val</A>&gt; "in" &lt;<A HREF="#set">set</A>&gt; <BR> </A>
+<A NAME="boole">
+<P><B>&lt;boole&gt;</B>::= [ "false" | "true" ] </A><BR>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+| "(" &lt;<A HREF="#boole">boole</A>&gt; ")"<BR>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+| [ "not" | "ex" ] &lt;<A HREF="#boole">boole</A>&gt; <BR>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+| &lt;<A HREF="#boole">boole</A>&gt; [ "and" | "or" ] &lt;<A HREF="#boole">boole</A>&gt; <BR>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+| &lt;<A HREF="#val">val</A>&gt; [ "sub" | "meet" | "eq" ] &lt;<A HREF="#val">val</A>&gt; <BR> </A>
+<A NAME="val">
+<P><B>&lt;val&gt;</B>::= "{" [ &lt;<A HREF="#string_list">string_list</A>&gt; ] ? "}" </A><BR>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+| &lt;<A HREF="#string">string</A>&gt;<BR>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+| "refof" &lt;<A HREF="#set">set</A>&gt;<BR>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+| &lt;<A HREF="#rvar">rvar</A>&gt; "." &lt;<A HREF="#vvar">vvar</A>&gt;<BR>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+| &lt;<A HREF="#vvar">vvar</A>&gt;<BR>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+| "(" &lt;<A HREF="#val">val</A>&gt; ")"<BR>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+| "property" &lt;<A HREF="#qualifier">qualifier</A>&gt; &lt;<A HREF="#val">val</A>&gt;</A>
+</BODY>
+</HTML>
\ No newline at end of file
diff --git a/helm/searchEngine/html/grammarpdq.html b/helm/searchEngine/html/grammarpdq.html
new file mode 100644 (file)
index 0000000..bd3835b
--- /dev/null
@@ -0,0 +1,38 @@
+<HTML>
+<HEAD>
+<SCRIPT language="Javascript">
+</SCRIPT>
+</HEAD>
+<BODY>
+<a name="Id">
+<p><b>&lt;Id&gt;</b>::= [ 'A-Z' | 'a-z' ][ 'A-Z' | 'a-z' | '0-9' | \- | _ | \' ]*</a>
+<a name="Uri">
+<p><b>&lt;Uri&gt;</b>::= &lt;<a href="#Conuri">Conuri</a>&gt; | &lt;<a href="#Varuri">Varuri</a>&gt; | &lt;<a href="#Indtyuri">Indtyuri</a>&gt; | &lt;<a href="#Indconuri">Indconuri</a>&gt;</a>
+<a name="Conuri">
+<p><b>&lt;Conuri&gt;</b>::= &quot;cic:/&quot; [&lt;<a href="#Id">Id</a>&gt; &quot;/&quot; ]*&lt;<a href="#Id">Id</a>&gt; &quot;.con&quot;</a>
+<a name="Varuri">
+<p><b>&lt;Varuri&gt;</b>::= &quot;cic:/&quot; [&lt;<a href="#Id">Id</a>&gt; &quot;/&quot; ]*&lt;<a href="#Id">Id</a>&gt; &quot;.var&quot;</a>
+<a name="Indtyuri">
+<p><b>&lt;Indtyuri&gt;</b>::= &quot;cic:/&quot; [&lt;<a href="#Id">Id</a>&gt; &quot;/&quot; ]*&lt;<a href="#Id">Id</a>&gt; &quot;.ind#1/&quot; ['0-9']+</a>
+<a name="Indconuri">
+<p><b>&lt;Indconuri&gt;</b>::= &quot;cic:/&quot; [&lt;<a href="#Id">Id</a>&gt; &quot;/&quot; ]*&lt;<a href="#Id">Id</a>&gt; &quot;.ind#1/&quot; ['0-9']+ &quot;/&quot; ['0-9']+</a>
+<a name="Exp_Named_Subst">
+<p><b>&lt;Exp_Named_Subst&gt;</b>::= &quot;{&quot; [ [ [&lt;<a href="#Id">Id</a>&gt; | &lt;<a href="#Varuri">Varuri</a>&gt; ] &quot;:=&quot; &lt;Expression&gt; &quot;;&quot; ]* [ [&lt;<a href="#Id">Id</a>&gt; | &lt;<a href="#Varuri">Varuri</a>&gt; ] &quot;:=&quot; &lt;Expression&gt; ] ]? &quot;}&quot;</a>
+<a name="Alias">
+<p><b>&lt;Alias&gt;</b>::= &quot;alias&quot; &lt;<a href="#Id">Id</a>&gt; &lt;<a href="#Uri">Uri</a>&gt;
+<a name="Genid">
+<p><b>&lt;Genid&gt;</b>::= [ &lt;<a href="#Id">Id</a>&gt; | &lt;<a href="#Varuri">Varuri</a>&gt; | &lt;<a href="#Indtyuri">Indtyuri</a>&gt; | &lt;<a href="#Indconuri">Indconuri</a>&gt; ] &lt;<a href="#Exp_Named_Subst">Exp_Named_Subst</a>&gt;
+<a name="Expr">
+<p><b>&lt;Expr&gt;</b>::= &quot;\&quot; &lt;<a href="#Genid">Genid</a>&gt; [ &quot;:&quot; | &quot;:=&quot; ] &lt;<a href="#Expr">Expr</a>&gt;&quot;.&quot;&lt;<a href="#Expr">Expr</a>&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+::= &quot;!&quot; &lt;<a href="#Genid">Genid</a>&gt; &quot;:&quot; &lt;<a href="#Expr">Expr</a>&gt;&quot;.&quot;&lt;<a href="#Expr">Expr</a>&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+::= &lt;<a href="#Expr">Expr</a>&gt;&quot;->&quot;&lt;<a href="#Expr">Expr</a>&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+::= &quot;(&quot; &lt;<a href="#Expr">Expr</a>&gt; &quot;)&quot; &quot;->&quot;&lt;<a href="#Expr">Expr</a>&gt;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+::= &quot;(&quot; &lt;<a href="#Expr">Expr</a>&gt; [ &quot; &quot; &lt;<a href="#Expr">Expr</a>&gt;]* &quot;)&quot;
+<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+::= &quot;Prop&quot; | &quot;Set&quot; | &quot;Type&quot; | &quot;?&quot; | &lt;<a href="#Uri">Uri</a>&gt; | &lt;<a href="#Id">Id</a>&gt;
+</BODY>
+</HTML>
\ No newline at end of file
diff --git a/helm/searchEngine/html/index.html b/helm/searchEngine/html/index.html
new file mode 100644 (file)
index 0000000..e7b73b5
--- /dev/null
@@ -0,0 +1,636 @@
+<HTML>
+<HEAD>
+<SCRIPT language="Javascript">
+var query="*"; // stringa che contiene la query nel suo stato attuale.
+var storeps=1;
+var storepv=1;
+var storepb=1; // queste tre variabili contengono il numero da assegnare al prossimo simbolo set, val o boole per creare il link nel frame in alto a sinistra.
+var stadd; // contiene la stringa da aggiungere alla query.
+var fb; // contiene la stringa da aggiungere alla query prima che i set,val e boole siano convertiti in link.
+var ltr="*"; // qui viene memorizzato qual Ã¨ l' ultimo link su cui si Ã¨ cliccato.
+var norvars=0;
+var nosvars=0;
+var novvars1=0;
+var novvars2=0; // queste tre variabili servono per sapere dove memorizzare i nomi delle rvar,svar e vvar inserite dall' utente. 
+var wrong=0;
+var ricordaliaslist=0;
+var actinput=0;
+var numeroazioniannullate=0;
+var terminecic="";var listaliases="";var choices;var vlds=new Array();//contengono i parametri per dialogare col server in caso di ambiguità nella Match Conclusion.
+aliasglob=new Array();//per conservare la lista degli alias
+function initialize()
+       {
+       rvars=new Array(100);
+       svars=new Array(100);
+       vvars1=new Array(100);
+       vvars2=new Array(100); // contengono le rvar,svar e vvar inserite dall' utente. 
+       storia=new Array();
+       storia[0]="*";
+       norvars=0;
+       nosvars=0;
+       novvars1=0;
+       novvars2=0;
+       ltr="*";
+       query="*";
+       storeps=1;
+       storepv=1;
+       storepb=1;
+       ricordaliaslist=0;
+       vlds=new Array();
+       aliasglob=new Array();
+       actinput=0;
+       numeroazioniannullate=0;
+       }
+
+// @variable@ will be substituted by the searchEngine with the param.variable
+// argument value
+var processorURL="@processorURL@";
+var getterURL="@getterURL@";
+var thkeys="@thkeys@";
+var proofcheckerURL="@proofcheckerURL@";
+var draw_graphURL="@draw_graphURL@";
+var uri_set_queueURL="@uri_set_queueURL@";
+var UNICODEvsSYMBOL="@UNICODEvsSYMBOL@";
+var keys="@keys@";
+var thkeys="@thkeys@";
+var embedkeys="@embedkeys@";
+var doctype_public="@doctype-public@";
+var encoding="@encoding@";
+var thencoding="@thencoding@";
+var media_type="@media-type@";
+var thmedia_type="@thmedia-type@";
+var interfaceURL="@interfaceURL@";
+var thinterfaceURL="@thinterfaceURL@";
+var CICURI="@CICURI@";
+var naturalLanguage="@naturalLanguage@";
+var annotations="@annotations@";
+var interface_topurl="@topurl@";
+
+function ask_uwobo(url)
+       {
+         return (top.topurl+"/ask_uwobo?url="+
+                 escape(processorURL + "apply?" +
+                         "xmluri=" + escape(url) +
+                         "&keys=" + escape(thkeys) +
+                         "&param.processorURL=" + escape(processorURL) +
+                         "&param.getterURL=" + escape(getterURL) +
+                         "&param.proofcheckerURL=" + escape(proofcheckerURL) +
+                         "&param.draw_graphURL=" + escape(draw_graphURL) +
+                         "&param.uri_set_queueURL=" + escape(uri_set_queueURL) +
+                         "&param.UNICODEvsSYMBOL=" + escape(UNICODEvsSYMBOL) +
+                         "&param.keys=" + escape(keys) +
+                         "&param.thkeys=" + escape(thkeys) +
+                         "&param.embedkeys=" + escape(embedkeys) +
+                         "&param.doctype-public=" + escape(doctype_public) +
+                         "&param.encoding=" + escape(encoding) +
+                         "&param.thencoding=" + escape(thencoding) +
+                         "&param.media-type=" + escape(media_type) +
+                         "&param.thmedia-type=" + escape(thmedia_type) +
+                         "&param.interfaceURL=" + escape(interfaceURL) +
+                         "&param.thinterfaceURL=" + escape(thinterfaceURL) +
+                         "&param.CICURI=" + escape(CICURI) +
+                         "&param.naturalLanguage=" + escape(naturalLanguage) +
+                         "&param.annotations=" + escape(annotations) +
+                         "&param.topurl=" + escape(interface_topurl) +
+                         "&prop.method=html"));
+       }
+function help(w) // quando invocata, visualizza l' help relativo ad un oggetto. Di solito Ã¨ legata ad un evento onFocus o onMouseOver.  
+       {
+       hw.document.close();
+       switch (w)      {
+                       case -10: hw.document.write("Insert an <a href="+top.topurl+top.action+"grammarpdq.html#Id target=gw>Id</a> or an <a href="+top.topurl+top.action+"grammarpdq.html#Uri target=gw>Uri</a> here.")
+                               break;
+                       case -9: hw.document.write("By clicking this you may add or remove aliases as you wish.")
+                               break;
+                       case -81: hw.document.write("Allows you to recover your last input")
+                               break;
+                       case -8: hw.document.write("Allows you to delete your last input")
+                               break;
+                       case -7: hw.document.write("Erases your query and starts a new pre-defined query, you will keep your list of aliases.")
+                               break;
+                       case -6: hw.document.write("Puts this string in the current cursor position. This button works only with Internet Explorer.")
+                               break;
+                       case -5: hw.document.write("Erases your query and starts a new one.")
+                               break;
+                       case -4: hw.document.write("If you click this your query will be processed and the results will appear in the frame above.")
+                               break;
+                       case -3: hw.document.write("Substitutes your query with the text written in the area above. Unless you have a good knowledge of MathQL, it's recommended that you use this only to recover errors.")
+                               break;
+                       case -2: hw.document.write("This is the edit/submit window. You can modify your query here, but be aware that no syntax check will be performed and that if you enter a <a href="+top.topurl+top.action+"grammar.html#rvar target=gw>variable</a> it won't be available for quick composition later. You may also want to add a <a href="+top.topurl+top.action+"grammar.html#set target=gw>set</a>, a <a href="+top.topurl+top.action+"grammar.html#val target=gw>val</a> or a <a href="+top.topurl+top.action+"grammar.html#boole target=gw>boole</a> somewhere in the query. If you do, write '&lt;set&gt;','&lt;val&gt;' or '&lt;bol&gt;' in the point you'd like it to appear, or use the buttons on the right if you are using IE. When you're done with the query, click the Submit button.")
+                               break;
+                       case -1: hw.document.write("You may see the grammar here.")
+                               break;
+                       case 0: hw.document.write("")
+                               break;
+                       case 1: hw.document.write("You may enter an arbitrary statement here; be careful since syntax errors won't be detected.");                              
+                               break;  
+                       case 2: hw.document.write("Enter an <a href="+top.topurl+top.action+"grammar.html#attr_list target=gw>attr_list</a> here.");
+                               break;
+                       case 3: hw.document.write("Enter an <a href="+top.topurl+top.action+"grammar.html#id target=gw>id</a> here.");
+                               break;
+                       case 4: hw.document.write("You must select one previously entered <a href="+top.topurl+top.action+"grammar.html#rvar target=gw>rvar</a>. If you haven't already entered at least one, you can't choose this. ");
+                               break;
+                       case 5: hw.document.write("Enter a <a href="+top.topurl+top.action+"grammar.html#path target=gw>path</a> here.");
+                               break;
+                       case 6: hw.document.write("You must select one previously entered <a href="+top.topurl+top.action+"grammar.html#svar target=gw>svar</a>. If you haven't already entered at least one, you can't choose this. ");
+                               break;
+                       case 7: hw.document.write("Enter a <a href="+top.topurl+top.action+"grammar.html#string_list target=gw>string_list</a> here.");
+                               break;
+                       case 8: hw.document.write("You must select one <a href="+top.topurl+top.action+"grammar.html#vvar target=gw>vvar</a> previously entered as an 'attr'. If you haven't already entered at least one, you can't choose this. ");
+                               break;
+                       case 81: hw.document.write("You must select one <a href="+top.topurl+top.action+"grammar.html#vvar target=gw>vvar</a> previously entered in a 'let' statement. If you haven't already entered at least one, you can't choose this. ");
+                               break;
+                       case 9: hw.document.write("Enter a single <a href="+top.topurl+top.action+"grammar.html#quoted_string target=gw>quoted_string</a> here.");
+                               break;
+                       }       
+       }
+function tpa(quotpath)
+       {
+       while (quotpath.indexOf("<")>-1)
+               {quotpath=quotpath.replace("<","&lt;");}
+       while (quotpath.indexOf(">")>-1)
+               {quotpath=quotpath.replace(">","&gt;");}
+       return (quotpath);
+       }
+function idcheck(ident)
+       {
+       lettera=/[a-zA-Z]/;
+       partediid=/[a-zA-Z0-9_\-\']/;
+       if (!lettera.test(ident.charAt(0))){alert("an Id must begin with a letter.");return(0)}
+       while (ident.length>0)
+               {
+               ident=ident.substring(1,(ident.length));
+               if (ident.length>0){
+               if (!partediid.test(ident.charAt(0))){alert(ident.charAt(0)+" is not a valid character for an Id.");return(0);}
+               }}
+       return(1)
+       }
+function uricheck(ident)
+       {
+       cifra=/[0-9]/
+       cic=ident.substring(0,5);//alert(cic);
+       if (cic!="cic:/"){alert("an Uri must begin with the string 'cic:/'");return(0);}
+       ident=ident.substring(5,ident.length);//alert(ident);
+       if (ident.indexOf(".")<0){alert("an Uri must contain a '.'");return(0);}
+       ident1=ident.substring(0,ident.indexOf("."));//alert(ident1);
+       ident2=ident.substring(ident.indexOf(".")+1,ident.length);//alert(ident2);
+       while (ident1.length>0)
+               {       
+               if (ident1.indexOf("/")>-1)             
+                       {
+                       if (idcheck(ident1.substring(0,ident1.indexOf("/")))==0){return (0)}
+                       ident1=ident1.substring(ident1.indexOf("/")+1,ident1.length);//alert(ident1);
+                       }
+               else {if (idcheck(ident1)==0){return (0)}       
+                       ident1="";}
+               }
+       if (ident2=="con"||ident2=="var"){return(1)}
+       if (ident2.substring(0,6)!="ind#1/"){alert ("syntax error in the Uri.");return(0);}
+       ident2=ident2.substring(6,ident2.length);//alert(ident2);
+       if (!cifra.test(ident2.charAt(0))){alert ("syntax error in the Uri.");return(0);}
+       if (ident2.indexOf("/")>-1)
+               {
+               while (ident2.charAt(0)!="/")
+                       {
+                       //alert(ident2);
+                       if (!cifra.test(ident2.charAt(0))){alert ("syntax error in the Uri.");return(0);}
+                       ident2=ident2.substring(1,ident2.length);
+                       }
+               }
+       while (ident2.length>0)
+               {
+               //alert(ident2);
+               ident2=ident2.substring(1,ident2.length);
+               if (ident2.length>0){
+               if (!cifra.test(ident2.charAt(0))){alert ("syntax error in the Uri.");return(0);}
+               }}
+       
+       return(1)
+       }
+function gramcheck(how,what) // esegue il controllo sintattico sulla stringa "what", controllando che rispetti i requisiti indicati dalla clausola "how". Se qualcosa non Ã¨ ok, la variabile "wrong" viene posta ad 1 e la stringa da aggiungere viene ignorata, mentre viene visualizzato un apposito messaggio di errore.             
+       {
+       var slash=0;
+       var alpha=/[A-Za-z:_]/
+       var numero=/[0-9]/
+       switch (how)    {               
+                       case "qsl": // lista di quoted string
+                               if (what.charAt(0)!="{") {gramcheck("qs",what);break;}
+                               if (what.charAt(what.length-1)!="}") {alert ("The list must end with a '}'.");wrong=1;break;}
+                               what=what.substring(1,what.length-1);//alert (what);
+                               while (what.indexOf("\",\"")>-1)
+                                       {
+                                       as=what.substring(0,what.indexOf("\",\"")+1);//alert(as);
+                                       what=what.substring(what.indexOf("\",\"")+2,what.length);//alert(what);
+                                       gramcheck("qs",as);
+                                       }
+                               gramcheck("qs",what);
+                               break;
+                       case "qp": // quoted path
+                               if (what.charAt(0)!="\"") {alert ("A quoted string must be included between quotes."); wrong=1; break;}
+                               if (what.charAt(what.length-1)!="\"") {alert ("A quoted string must be included between quotes."); wrong=1; break;}
+                               while (what.indexOf("\"/\"")>-1)
+                                       {
+                                       as=what.substring(0,what.indexOf("\"/\"")+1);//alert(as);
+                                       what=what.substring(what.indexOf("\"/\"")+2,what.length);//alert(what);
+                                       gramcheck("qs",as);
+                                       }
+                               gramcheck("qs",what);
+                               break;
+                       case "qs": // quoted string
+                               if (what.charAt(0)!="\"") {alert ("A quoted string must be included between quotes."); wrong=1; break;}
+                               if (what.charAt(what.length-1)!="\"") {alert ("A quoted string must be included between quotes."); wrong=1; break;}
+                               what=what.substring(0,what.length-1);//alert (what);
+                               if (wrong==1) break;
+                               else while (what.length>0)
+                                       {
+                                       what=what.substring(1,what.length);
+                                       if (what.charAt(0)=="\"" && slash==0) {alert ("A \" in a quoted string must be preceded by a \\.");wrong=1;break;} 
+                                       if (what.charAt(0)=="\\") {slash=1} else {slash=0} 
+                                       if (slash==1 && what.length==1) {alert ("A \\ in a quoted string must be followed by something.");wrong=1;}
+                                       }
+                               break;
+                       case "vlist": // lista di vvar (tutto ciò che si trova dopo "attr")
+                               //alert(what.substring(0,4));                           
+                               if ((what.substring(0,4))!="attr"){wrong=1;alert("A vvar_list must begin with the word 'attr'")}
+                               what=what.substring(5,(what.length));vl=what;
+                               //alert(what+"what");
+                               while (what.length>0)
+                                                       {
+                                                       if (what.indexOf(",")>0) {vv=(what.substring(0,what.indexOf(",")));}
+                                                       else {vv=what}                                  
+                               //alert(vv+"vv");
+                                                       if (vv.charAt(0)!="$"){wrong=1;alert("A vvar must begin with a '$'");}
+                                                       if (vv.indexOf("<-")>0)
+                                                                       {
+                                                                       what=what.substring(vv.length+1,what.length);
+                               //alert(what+" nuovowhat "+wrong);
+                                                                       path=vv.substring(vv.indexOf("<-")+2,vv.length);
+                               //alert(path+" path "+wrong);
+                                                                       gramcheck("qp",path); 
+                                                                       vv=vv.substring(1,(vv.indexOf("<-")));
+                               //alert(vv+" vv "+wrong);
+                                                                       gramcheck("id",vv);
+                                                                       }
+                                                       else {wrong=1;alert("An Assign must contain a '<-'.");what="";}
+                               //alert (what+"what");  
+                                                       }
+                               break;
+                       case "id":
+                               //alert (what.charAt(0));
+                               if (!alpha.test(what.charAt(0))) {wrong=1;alert("An ID must begin with a letter , ':' , or '_' .");}
+                               while (what.length>1)   {
+                                       what=what.substring(1,(what.length));
+                                       if (!alpha.test(what.charAt(0)) && !numero.test(what.charAt(0)))
+                                       {wrong=1;alert(what.charAt(0)+" is not a valid character for an id.");}
+                                       //document.write(what+"<BR>");
+                                                       }       
+                               break;
+                       }
+       
+       if (how=="vlist" && wrong==0) // nel caso in cui sia stato eseguito il controllo su una lista di vvar e non siano stati riscontrati errori, tutte le variabili inserite vengono memorizzate.
+               {
+               while (vl.length>0)
+                       {
+                       if (vl.indexOf(",")>-1)
+                               {
+                               vvars2[novvars2++]=vl.substring(0,vl.indexOf("<"));
+                               vl=vl.substring(vl.indexOf(",")+1,vl.length);
+                               }
+                       else    
+                               {
+                               vvars2[novvars2++]=vl.substring(0,vl.indexOf("<"));;
+                               vl="";
+                               }                                               
+                       }
+               //alert ("esco dal loop");
+               }
+       if (wrong==0) {cw.inputok=1} else stadd="";
+       }
+function savelink(n,t) // invocata quando si clicca su un link, memorizza quale di questi debba poi essere sostituito. 
+       {
+       if (t=='s') { top.ltr="[?set"+String(n)+"]";}
+       if (t=='v') { top.ltr="[?val"+String(n)+"]";}
+       if (t=='b') { top.ltr="[?bol"+String(n)+"]";}
+//     alert(ltr);
+       }
+function aggcw() // invocata automaticamente ad ogni modifica della variabile "query", fa apparire nel frame in alto a destra il menu di composizione relativo al primo link della query. Consente quindi di comporre tutta la query senza mai cliccare su alcun link. 
+       {
+       pq=query;
+       while (pq.length>0)
+               {
+               if (pq.indexOf("[?")>-1)        
+                       {
+                       ltr=pq.slice(pq.indexOf("[?"));
+                       ltr=ltr.substring(ltr.indexOf("[?"),(ltr.length-ltr.indexOf("[?"))-(ltr.length-ltr.indexOf("]")-1));
+                       wto=ltr.substring(2,5);
+                       if (wto=="set") {window.open(top.topurl+action+"set.html","cw");pq="";}
+                       else if (wto=="val") {window.open(top.topurl+action+"val.html","cw");pq="";}
+                       else if (wto=="bol") {window.open(top.topurl+action+"boole.html","cw");pq="";}
+                       else pq=pq.substring(pq.indexOf("[?")+2,pq.length);
+                       }
+               else {window.open(top.topurl+action+"blank.html","cw");pq="";}
+               } 
+       }
+function aggform() // aggiorna il form nel frame centrale. Invocata ad ogni cambio della variabile "query".
+       {
+       cquery=query;
+       while (cquery.indexOf("<")>-1)
+               {
+               cquery=cquery.replace(cquery.substring(cquery.indexOf("<"),cquery.indexOf(">")+1),"");
+               //alert(cquery);
+               }
+       while (cquery.indexOf("[?")>-1)
+               {
+               //alert(cquery);
+               if (cquery.indexOf("]")>-1)
+                       {
+                       while (cquery.indexOf("]")<cquery.indexOf("[?") && cquery.indexOf("]")>-1)
+                       {cquery=cquery.replace("]","q+u+a+d+r+a+c+h+i+u+s+a");}//alert("loop"+cquery.indexOf("]")+cquery.indexOf("[?"))}
+                       ag1=cquery.slice(cquery.indexOf("[?"));//alert(ag1);
+                       ag1=ag1.substring(ag1.indexOf("[?"),(ag1.length-ag1.indexOf("[?"))-(ag1.length-ag1.indexOf("]")));//alert(ag1);
+                       ag2=ag1.substring(2,5);//alert(ag2);
+                       if (ag2=="set") cquery=cquery.replace(cquery.substring(cquery.indexOf("[?"),cquery.indexOf("]")+1),"<set>");
+                       else if (ag2=="val") cquery=cquery.replace(cquery.substring(cquery.indexOf("[?"),cquery.indexOf("]")+1),"<val>");
+                       else if (ag2=="bol") cquery=cquery.replace(cquery.substring(cquery.indexOf("[?"),cquery.indexOf("]")+1),"<boole>");
+                       else cquery=cquery.replace(cquery.substring(cquery.indexOf("[?"),cquery.indexOf("[?")+1),"q+u+a+d+r+a");
+                       //alert(cquery);
+                       }
+               else {cquery=cquery.replace("[?","q+u+a+d+r+a?")}
+               //alert(cquery);        
+               }
+       while (cquery.indexOf("q+u+a+d+r+a+c+h+i+u+s+a")>-1)
+               {
+               cquery=cquery.replace("q+u+a+d+r+a+c+h+i+u+s+a","]");
+               }
+       while (cquery.indexOf("q+u+a+d+r+a")>-1)
+               {
+               cquery=cquery.replace("q+u+a+d+r+a","[");
+               }
+       while (cquery.indexOf("&lt;")>-1)
+               {
+               cquery=cquery.replace("&lt;","<");
+               }
+       while (cquery.indexOf("&gt;")>-1)
+               {
+               cquery=cquery.replace("&gt;",">");
+               }
+       top.sw.agg();
+       }
+function ripristina()
+       {
+       //alert (actinput+" "+storia.length);
+       if (numeroazioniannullate>0)
+               {
+               numeroazioniannullate--;
+               query=storia[actinput+1];actinput++;
+               qw.document.close();
+               qw.document.write(query);
+               aggform();
+               sw.apply();
+               aggcw();
+               cw.focus();
+               }
+       }
+function annulla()
+       {
+       //alert (actinput+" "+storia.length);
+       if (actinput>0)
+               {
+               numeroazioniannullate++;
+               query=storia[actinput-1];actinput--;
+               qw.document.close();
+               qw.document.write(query);
+               aggform();
+               sw.apply();
+               if (query=="*"){cw.location=top.topurl+action+"set.html";ltr="*";} else {aggcw();}
+               cw.focus();
+               }
+       }
+function parse() // prende la stringa che si sta tentando di inserire nella query, aggiunge i link dove necessario e mette il risultato nella variabile "fb"
+       {
+       while (fb.indexOf("[set]")>-1){
+       if (fb.indexOf("set")>0)
+               {
+      fb=fb.replace("[set]","<A HREF="+top.topurl+action+"set.html target=cw onclick=top.savelink("+top.storeps+",'s')>[?set"+top.storeps+"]</A>");
+               top.storeps++;
+               }
+                                        }
+       while (fb.indexOf("[val]")>-1){
+       if (fb.indexOf("val")>0)
+               {
+      fb=fb.replace("[val]","<A HREF="+top.topurl+action+"val.html target=cw onclick=top.savelink("+top.storepv+",'v')>[?val"+top.storepv+"]</A>");
+               top.storepv++;
+               }
+                                        }
+       while (fb.indexOf("[boole]")>-1){
+       if (fb.indexOf("boole")>0)
+               {
+               fb=fb.replace("[boole]","<A HREF="+top.topurl+action+"boole.html target=cw onclick=top.savelink("+top.storepb+",'b')>[?bol"+top.storepb+"]</A>");
+               top.storepb++;
+               }
+                                        }
+       }
+function aggq() // aggiorna la query sostituendo l' ultimo link editato con la stringa inserita, poi aggiorna tutti i frame.
+       {
+       //window.open(top.topurl+action+"summary.html","cw");
+       qw.document.close();
+       fb=stadd;       
+       nst=ltr.substring(5,(ltr.length-1));// alert(nst+" "+ltr);
+       query=query.replace("<A HREF="+top.topurl+action+"set.html target=cw onclick=top.savelink("+nst+",'s')>"+ltr+"</A>",ltr);
+       query=query.replace("<A HREF="+top.topurl+action+"val.html target=cw onclick=top.savelink("+nst+",'v')>"+ltr+"</A>",ltr);
+       query=query.replace("<A HREF="+top.topurl+action+"boole.html target=cw onclick=top.savelink("+nst+",'b')>"+ltr+"</A>",ltr);
+       parse();
+       query=query.replace(ltr,fb);
+       actinput++;storia[actinput]=query;numeroazioniannullate=0;//alert (actinput+" "+storia.length);
+       qw.document.write(query);aggform();
+       aggcw();
+       cw.focus();
+       }
+var re1 = /(.*)\?.*/;
+var re2 = /(.*)\/.*/;
+var topurl=document.location+"";
+topurl = topurl.replace(re1,"$1");
+topurl = topurl.replace(re2,"$1");
+//var topurl=document.location.protocol+'//'+document.location.host;
+var action="/getpage?url=";
+//var action="";
+
+
+// UTILITY FUNCTIONS FOR templateambigpdq1.html
+function templateambigpdq1_armageddon()
+       {
+       top.initialize();
+       top.window.open(top.topurl+top.action+"start.html","qw");
+       top.window.open(top.topurl+top.action+"blank.html","cw");
+       top.window.open(top.topurl+top.action+"blank.html","hw");
+       top.window.open(top.topurl+top.action+"blank.html","gw");
+       top.window.open(top.topurl+top.action+"blank.html","sw");
+       }
+
+function templateambigpdq1_resetta()
+       {
+       if (confirm("This will erase your query and start a new one. Are you sure you want to do this?"))
+               {templateambigpdq1_armageddon();}
+       }
+
+function templateambigpdq1_listauri(document,elenco)
+       {
+       for (i=0;i<elenco.length;i++)
+               {
+               document.write("<input type=checkbox name=uricheck value="+elenco[i]+"> "+elenco[i]+"<br>"); 
+               }
+       }
+
+function templateambigpdq1_invia(document,top,elenco,ident)
+       {
+       vecchiavlds=top.vlds.length;
+       stringa=top.topurl+"/"+top.current_query+"?term="+top.terminecic;
+       stringa=stringa+"&aliases="+top.listaliases;
+       stringa=stringa+"&choices=";
+  var choices = "";
+       top.vlds[top.vlds.length]=ident;
+       for (j=0;j<elenco.length;j++)
+               {
+               if (document.disamb.uricheck[j].checked)
+                       {
+                       top.vlds[top.vlds.length]=document.disamb.uricheck[j].value;
+                       }
+               }
+       top.vlds[top.vlds.length]=";";
+       for (j=0;j<top.vlds.length;j++)
+       {
+           choices=choices+(top.vlds[j]==";"?";":escape(top.vlds[j]))+" ";
+       }
+       choices=choices.substring(0,choices.length-2);
+  top.choices = choices;
+  stringa=stringa+escape(choices);
+       if (top.vlds.length==vecchiavlds){alert("You must select at least one of the options.");}
+       else
+       {
+          window.open(ask_uwobo(stringa),"cw");
+       }
+       } 
+
+  function templateambigpdq1_selezionaCostanti(document,elenco) {
+    for (i=0; i<elenco.length; i++) {
+      if (elenco[i].substring(elenco[i].length-4, elenco[i].length) != ".var") {
+        document.disamb.uricheck[i].checked = true;
+      } else {
+        document.disamb.uricheck[i].checked = false;
+      }
+    }
+  }
+
+
+
+// UTILITY FUNCTIONS FOR templateambigpdq2.html
+function templateambigpdq2_armageddon()
+       {
+       top.initialize();
+       top.window.open(top.topurl+top.action+"start.html","qw");
+       top.window.open(top.topurl+top.action+"blank.html","cw");
+       top.window.open(top.topurl+top.action+"blank.html","hw");
+       top.window.open(top.topurl+top.action+"blank.html","gw");
+       top.window.open(top.topurl+top.action+"blank.html","sw");
+       }
+
+function templateambigpdq2_resetta()
+       {
+       if (confirm("This will erase your query and start a new one. Are you sure you want to do this?"))
+               {templateambigpdq2_armageddon();}
+       }
+
+function templateambigpdq2_listainterpretazioni(document,elenco,labels)
+       {
+       for (i=0;i<elenco.length;i++)
+               {
+                      document.write("<input type=radio name=interp value="+elenco[i]+"> "+labels[i]+"<br />"); 
+               }
+       }
+
+function templateambigpdq2_invia(document,elenco)
+       {
+       stringa=top.topurl+"/"+top.current_query+"?term="+top.terminecic;
+       stringa=stringa+"&aliases=";
+       controllo=stringa.length;
+       for (j=0;j<elenco.length;j++)
+               {
+               if (document.disamb.interp[j].checked)
+                       {
+                       stringa=stringa+escape(elenco[j]);
+
+      // TODO da implementare nella terza fase
+                       //top.aliasglob[top.aliasglob.length]=document.disamb.interp[j].value;
+
+                       //for (k=0;k<top.aliasglob.length;k++){alert(top.aliasglob[k])}
+                       //top.listaliases=top.listaliases+document.disamb.interp[j].value;//in caso di query ulteriori con la stessa lista di alias
+                       }
+                       
+               }
+       if (stringa.length!=controllo) 
+               {
+               window.open(ask_uwobo(stringa),"cw");
+               }
+               else {alert("You must choose one option.");}
+       } 
+
+
+
+// UTILITY FUNCTIONS FOR templateambigpdq3.html
+function templateambigpdq3_init(aliases)
+{
+   top.aliasglob = new Array();
+   for (i=0; i<aliases.length; i++) {
+      top.aliasglob[i] = aliases[i];
+   }
+   top.vlds=new Array();
+   top.window.open(top.topurl+top.action+"editorpdq.html", "sw");
+}
+
+// UTILITY FUNCTIONS FOR constraints_choice_template.html
+function get_value_of_checkbox(checkbox)
+  {
+    return (checkbox.checked ? "1" : "0");
+  }
+
+function constraints_choice_template_invia(document,aliases,constr_obj_len,constr_rel_len,constr_sort_len)
+       {
+       stringa=top.topurl+"/"+top.current_query+"?term="+top.terminecic;
+       stringa=stringa+"&aliases="+escape(aliases);
+       stringa=stringa+"&choices="+escape(top.choices);
+       stringa=stringa+"&constraints=";
+       for (j=0;j<constr_obj_len;j++)
+        {
+         stringa += document.constraints.constr_obj[j].checked ? "1" : "0";
+      stringa += !document.constraints.obj_depth[j] ||
+                 document.constraints.obj_depth[j].value == "" ? "_" :
+                 document.constraints.obj_depth[j].value;
+      if (j < constr_obj_len - 1) { stringa += "," }
+        }
+  stringa += ":";
+       for (j=0;j<constr_rel_len;j++)
+        {
+         stringa += document.constraints.constr_rel[j].checked ? "1" : "0";
+      stringa += document.constraints.rel_depth[j].value == "" ? "_" :
+                 document.constraints.rel_depth[j].value;
+        if (j < constr_rel_len - 1) { stringa += "," }
+        }
+  stringa += ":";
+       for (j=0;j<constr_sort_len;j++)
+        {
+         stringa += document.constraints.constr_sort[j].checked ? "1" : "0";
+      stringa += document.constraints.sort_depth[j].value == "" ? "_" :
+                 document.constraints.sort_depth[j].value;
+      if (j < constr_sort_len - 1) { stringa += "," }
+        }
+  stringa += ":"+get_value_of_checkbox(document.constraints.only_obj)+
+             ":"+get_value_of_checkbox(document.constraints.only_rel)+
+             ":"+get_value_of_checkbox(document.constraints.only_sort);
+       window.open(ask_uwobo(stringa),"cw");
+       } 
+</SCRIPT>
+</HEAD>
+  <SCRIPT>
+    document.write(' <FRAMESET ROWS="69%,31%"> <FRAMESET COLS="40%,60%"> <FRAMESET ROWS="46%,54%"> <FRAME NAME="qw" SRC="'+topurl+action+'start.html"> <FRAME NAME="sw" SRC="'+topurl+action+'blank.html"> </FRAMESET> <FRAME NAME="cw" SRC="'+topurl+action+'blank.html"> </FRAMESET> <FRAMESET COLS="49%,51%"> <FRAME NAME="gw" SRC="'+topurl+action+'blank.html" onFocus="help(-1)";> <FRAME NAME="hw" SRC="'+topurl+action+'blank.html"> </FRAMESET> </FRAMESET>');
+  </SCRIPT>
+</HTML>
diff --git a/helm/searchEngine/html/loc_obj.html b/helm/searchEngine/html/loc_obj.html
new file mode 100644 (file)
index 0000000..b6b5222
--- /dev/null
@@ -0,0 +1,29 @@
+<HTML>
+<HEAD>
+<SCRIPT language="Javascript">
+function armageddon()
+       {
+               top.terminecic="";top.listaliases="";top.ricordaliaslist=0;top.vlds=new Array();var alias="";var expr="";
+               top.initialize();
+               top.window.open(top.topurl+top.action+"start.html","qw");
+               top.window.open(top.topurl+top.action+"blank.html","cw");
+               top.window.open(top.topurl+top.action+"blank.html","hw");
+               top.window.open(top.topurl+top.action+"blank.html","gw");
+               top.window.open(top.topurl+top.action+"blank.html","sw");
+       }
+function invia()
+       {
+       top.window.open(top.topurl+top.action+"start.html","qw");
+       top.window.open(top.ask_uwobo(top.topurl+"/locate?id="+document.locate.oggetto.value),"bw");
+       }
+</SCRIPT>
+</HEAD>
+<BODY>
+<form name="locate" method="get" action="Javascript:invia();">
+<input name="oggetto" type=text size=30>
+Insert here the name of the object you want to search.
+<br><input type=submit value="Display results" onMouseOver="top.help(-4)">
+<input type=button value="Restart" onMouseOver="top.help(-5)" onClick="armageddon()"></input>
+</form>
+</BODY>
+</HTML>
diff --git a/helm/searchEngine/html/manual/alias.jpg b/helm/searchEngine/html/manual/alias.jpg
new file mode 100644 (file)
index 0000000..0f57638
Binary files /dev/null and b/helm/searchEngine/html/manual/alias.jpg differ
diff --git a/helm/searchEngine/html/manual/ex1.jpg b/helm/searchEngine/html/manual/ex1.jpg
new file mode 100644 (file)
index 0000000..8e75c08
Binary files /dev/null and b/helm/searchEngine/html/manual/ex1.jpg differ
diff --git a/helm/searchEngine/html/manual/frames.jpg b/helm/searchEngine/html/manual/frames.jpg
new file mode 100644 (file)
index 0000000..994b7ae
Binary files /dev/null and b/helm/searchEngine/html/manual/frames.jpg differ
diff --git a/helm/searchEngine/html/manual/index.html b/helm/searchEngine/html/manual/index.html
new file mode 100644 (file)
index 0000000..8efa276
--- /dev/null
@@ -0,0 +1,40 @@
+<html>
+<head>
+<title>Search Engine Interface Online Manual</title>
+</head>
+<body>
+<h1>Search Engine Interface Online Manual</h1>
+<h2>Index</h2>
+1. <a href="#roles">Roles of the frames</a><br>
+2. <a href="#mqlquery">How to compose a low-level query</a><br>
+3. <a href="#pdqquery">How to compose a pre-defined query</a><br>
+<a name="roles"><h2>1. Roles of the frames</h2></a>
+<p>
+The interface is composed by five frames, as you can see below.<br><br>
+<img src="./frames.jpg"><br><br>
+Each frame has its own role, in particular:<br><ul>
+<li>frame <b>1</b> contains the query as it is, the frame is refreshed whenever you modify the query.<br>
+<li>frame <b>2</b> contains all the available options for the composition of the query, it's where most of the interaction happens.<br>
+<li>frame <b>3</b> contains the form used for the submission of the query and various buttons to modify it.<br>
+<li>frame <b>4</b> contains the grammar.<br>
+<li>frame <b>5</b> contains online help.<br>
+</ul>
+</p>
+<a name="mqlquery"><h2>2. How to compose a low-level query</h2></a>
+<p>
+In order to compose a low-level query, you must click the &quot;compose a query&quot; button in the main page. Here's what you'll get:<br> <ul><li>In frame 1, you have the query in its actual state, so at the beginning the frame is empty. Later, the frame will be updated automatically on every change of the query and will contain hypertextual links in this form: <b>[?&lt;production name&gt;&lt;production number&gt;]</b>. Possible names are &quot;set&quot;,&quot;val&quot; and &quot;bol&quot; and they represent the main productions of MathQL grammar. By clicking on each of these links you'll obtain the visualization of possible options for the corresponding production in frame 2, allowing the sobstitution of the link with what will be selected.<br> <li>Frame 2 contains, in order: the identifier of the production you are choosing (e.g. <b>[?set1]</b> or <b>[?bol3]</b>), an &quot;undo&quot; button, a &quot;redo&quot; button, the options list, a &quot;compose&quot; button to confirm your choice, a &quot;get help&quot; button to know the semantic meaning of the selected option. The options list is composed by various radio buttons, sometimes you'll have only to select one of them while sometimes you'll have to fill input areas with identifiers, paths or other things: anyway, whenever an input area gets the focus, a help about what you can write there will appear in frame 5.<br>
+<li>Frame 3 contains a textarea with the query, a &quot;submit the query&quot; button, a &quot;restart&quot; button (it will bring you to the main page, erasing you query) and an &quot;apply changes&quot; button to modify the query. <br><li> Frame 4 contains the MathQL grammar.<br> <li>Frame 5 contains various help messages, whenever an object gets the focus a message will appear there.<br></ul>
+Being &quot;set&quot; the main production of MathQL, at the beginning frame 1 is empty and frame 2 contains the menu for &quot;set&quot;. You should choose one option by clicking on its radio button and then press &quot;compose&quot;. The interface will perform a syntax check of what you entered and should something be wrong a message will appear, otherwise the query will be updated. Afterwards, the query will appear in frame 1 and in frame 3, and frame 2 will display the menu of the first production found in the new query string. For example, in the picture below you see the interface after the selection of the 10th production inserting &quot;positions&quot; as the requested identifier. As you can see, frame 2 now displays the &quot;val&quot; menu.<br><br>
+<img src="./ex1.jpg"><br><br>
+Now your options include following the instructions in frame 2, choosing a different production by clicking on a link in frame 1, or manually modifying the query by writing the changes in the textarea in frame 3 and then clicking &quot;apply changes&quot;. Obviously &quot;undo&quot; and &quot;redo&quot; buttons will allow you to recover from mistakes; just DON'T use &quot;back&quot;,&quot;forward&quot; and &quot;refresh&quot; buttons on your browser since they will cause unpredictable errors. Once the query is completed, the &quot;submit the query&quot; button will display the results in frame 2.</p>
+<a name="pdqquery"><h2>3. How to compose a pre-defined query</h2></a>
+<p>
+There are actually three pre-defined queries, <b>Locate Object</b>, <b>Search Pattern</b> and <b>Match Conclusion</b>. By clicking on &quot;submit a pre-defined query&quot; in the main page, a small menu with the three options will appear in frame 2. <br>
+<b>Locate Object</b> is very simple, you must enter the name of the object to search in the text box and click &quot;display results&quot;.<br>
+<b>Search Pattern</b>, which takes a CIC term and finds theorems which have it as thesis, and <b>Match Conclusion</b> which takes a CIC term and finds theorems which have it as conclusion, have an identical interface, being the only difference in the output. 
+First thing to do is to insert a list of aliases (you may skip this step since the search engine will ask you later about ambiguous interpretations of your query if you don't know objects names, for example), then you must compose the CIC term. Composing a CIC term is pretty much the same thing as composing a MathQL query, except that the term is usually so short that there is no need for links, undo buttons and the like. While composing the term, you may modify your list of aliases (i.e. add or remove them) anytime by clicking &quot;edit&quot; in the frame 3. When the query is completed, the &quot;submit&quot; button will display the results in frame 2, and the server will ask you to solve ambiguities, thus adding aliases to your list.  Once a result is displayed, you may want to submit a different query but keep your aliases; in this case, just click &quot;new expression&quot; in frame 3. The &quot;edit&quot; button will work even in this phase.<br><br>
+<img src="./alias.jpg"><br><br>
+</p>
+
+</body>
+</html>
diff --git a/helm/searchEngine/html/mat_con.html b/helm/searchEngine/html/mat_con.html
new file mode 100644 (file)
index 0000000..5fab873
--- /dev/null
@@ -0,0 +1,10 @@
+<HTML>
+<HEAD>
+<SCRIPT language="Javascript">
+parent.mcq="[Alias list] [Expr]";
+parent.aggq();
+</SCRIPT>
+</HEAD>
+<BODY>
+</BODY>
+</HTML>
diff --git a/helm/searchEngine/html/paginacollink.html b/helm/searchEngine/html/paginacollink.html
new file mode 100644 (file)
index 0000000..83f41bc
--- /dev/null
@@ -0,0 +1,13 @@
+<HTML>
+<HEAD>
+<SCRIPT language="Javascript">
+function apriquery()
+       {
+       window.open(top.topurl+"/getpage?url=index.html","new",hotkeys="no");
+       }
+</SCRIPT>
+</HEAD>
+<BODY>
+<a href="#" onClick="apriquery();">Query composer</a>
+</BODY>
+</HTML>
diff --git a/helm/searchEngine/html/pdq.html b/helm/searchEngine/html/pdq.html
new file mode 100644 (file)
index 0000000..b4f5fe6
--- /dev/null
@@ -0,0 +1,75 @@
+<HTML>
+<HEAD>
+<SCRIPT language="Javascript">
+var mcq="";
+var toq=0;
+alist=new Array(10);
+var calias=0;
+function armageddon()
+       {
+       top.initialize();
+       top.window.open(top.topurl+top.action+"start.html","qw");
+       top.window.open(top.topurl+top.action+"blank.html","cw");
+       top.window.open(top.topurl+top.action+"blank.html","hw");
+       top.window.open(top.topurl+top.action+"blank.html","gw");
+       top.window.open(top.topurl+top.action+"blank.html","sw");
+       }
+function aggiorna()
+       {
+       window.open(top.topurl+top.action+"aliaslist.html","bw");
+       top.cw.bw.document.aliaslist.idi.focus();
+       }
+function aggiorna2()
+       {
+       window.open(top.topurl+top.action+"expnamedsubst.html","bw");
+       bw.document.aliaslist.varid.focus();
+       }
+function parse() 
+       {
+       //alert(mcq);
+       calias=0;
+       if (mcq.indexOf("[")>-1)
+               {
+               mcq=mcq.replace("[","<font color=\"#ff0000\">[");
+               mcq=mcq.replace("]","]</font>");
+               top.qw.document.close();
+               top.qw.document.write(mcq);
+               if (mcq.charAt(mcq.indexOf("[")+1)=="A")
+                       {
+                       window.open(top.topurl+top.action+"aliaslist.html","bw")
+                       }
+               if (mcq.charAt(mcq.indexOf("[")+1)=="E")
+                       {
+                       window.open(top.topurl+top.action+"expr.html","bw")
+                       }
+               if (mcq.charAt(mcq.indexOf("[")+1)=="G")
+                       {
+                       window.open(top.topurl+top.action+"genid.html","bw")
+                       }
+               if (mcq.charAt(mcq.indexOf("[")+1)=="e")
+                       {
+                       window.open(top.topurl+top.action+"expnamedsubst.html","bw")
+                       }
+               }
+               else 
+                       {
+                       while (mcq.indexOf("&gt;")>-1)
+                               {
+                               mcq=mcq.replace("&gt;",">");
+                               }
+                       top.window.sw.editexpr(mcq);
+                       window.open(top.topurl+top.action+"blank.html","bw");
+                       window.open(top.topurl+top.action+"blank.html","qw");
+                       }
+       }       
+function aggq()
+       {
+       parse(mcq);
+       //top.qw.document.write(mcq);   
+       }
+</SCRIPT>
+</HEAD>
+<SCRIPT>
+  document.write(' <frameset rows="24%,76%" border="0" noresize> <frame name=tw src="'+top.topurl+top.action+'query_choice.html";> <frame name=bw src="'+top.topurl+top.action+'blank.html";> </frameset> ');
+</SCRIPT>
+</HTML>
diff --git a/helm/searchEngine/html/query_choice.html b/helm/searchEngine/html/query_choice.html
new file mode 100644 (file)
index 0000000..3e1932a
--- /dev/null
@@ -0,0 +1,33 @@
+<HTML>
+<HEAD>
+<SCRIPT language="Javascript">
+function armageddon()
+       {
+       top.initialize();
+       top.window.open(top.topurl+top.action+"start.html","qw");
+       top.window.open(top.topurl+top.action+"blank.html","cw");
+       top.window.open(top.topurl+top.action+"blank.html","hw");
+       top.window.open(top.topurl+top.action+"blank.html","gw");
+       top.window.open(top.topurl+top.action+"blank.html","sw");
+       }
+</SCRIPT>
+</HEAD>
+<BODY>
+<form>
+<table><tr><td>
+      <input type=radio name="qc" onFocus="top.cw.bw.location=top.topurl+top.action+'loc_obj.html';top.qw.location=top.topurl+top.action+'blank.html';top.sw.location=top.topurl+top.action+'blank.html';top.gw.location=top.topurl+top.action+'blank.html';parent.toq=1;this.blur();"> Locate Object<br>
+      <input type=radio name="qc" onFocus="top.cw.bw.location=top.topurl+top.action+'mat_con.html';top.qw.location=top.topurl+top.action+'blank.html';top.current_query='matchConclusion';top.sw.location=top.topurl+top.action+'editorpdq.html';parent.toq=2;this.blur();"> Match Conclusion<br>
+      <input type=radio name="qc" onFocus="top.cw.bw.location=top.topurl+top.action+'mat_con.html';top.qw.location=top.topurl+top.action+'blank.html';top.current_query='searchPattern';top.sw.location=top.topurl+top.action+'editorpdq.html';parent.toq=3;this.blur();"> Search Pattern<br>
+      <input type=radio name="qc" onFocus="top.cw.bw.location=top.topurl+top.action+'mat_con.html';top.qw.location=top.topurl+top.action+'blank.html';top.current_query='locateInductivePrinciple';top.sw.location=top.topurl+top.action+'editorpdq.html';parent.toq=3;this.blur();"> Locate Inductive Principle
+</td>
+</tr></table>
+</form>
+<SCRIPT language="Javascript">
+if (top.ricordaliaslist==1)
+       {
+       window.open(top.topurl+top.action+"expr.html","bw");parent.mcq="<font color=\"#ff0000\">[Expr]</font>";
+       top.qw.document.close();top.qw.document.write("<font color=\"#ff0000\">[Expr]</font>");
+       }
+</script>
+</BODY>
+</HTML>
diff --git a/helm/searchEngine/html/set.html b/helm/searchEngine/html/set.html
new file mode 100644 (file)
index 0000000..a070889
--- /dev/null
@@ -0,0 +1,178 @@
+<HTML>
+<HEAD>
+<SCRIPT language="Javascript">
+var inputok=0;
+function listrvars()
+       {
+       for (num=0; num<top.norvars; num++)
+               {
+               document.write("<OPTION value="+top.rvars[num]+">"+top.rvars[num]);
+               }
+       }
+function listsvars()
+       {
+       for (num=0; num<top.nosvars; num++)
+               {
+               document.write("<OPTION value="+top.svars[num]+">"+top.svars[num]);
+               }
+       }
+function listvvars()
+       {
+       for (num=0; num<top.novvars; num++)
+               {
+               document.write("<OPTION value="+top.vvars[num]+">"+top.vvars[num]);
+               }
+       }
+function help()
+       {
+with (document.form1) {
+       if (selopt[0].checked)
+       alert ("Turns a list of strings which cannot have attributes (the [val]) in a list of strings which can have them, but initially has none (a [set]).");
+       if (selopt[1].checked)
+       alert ("Taken a list of posix regular expressions, 'pattern [val]' searches the HELM library for all the URIs which match with at least one of those and returns a [set] representing them.");
+       if (selopt[2].checked)
+       alert ("A [svar] represents a list of URIs with attributes.");
+       if (selopt[3].checked)
+       alert ("A [rvar] is a single URI with attributes.");
+       if (selopt[4].checked)
+       alert ("Parenthesis are employed to force precedence between operators.");
+       if (selopt[5].checked)
+       alert ("The [path] you must enter represents a relation; this production returns a [set] composed by the union of all the URIs which match the chosen relation in the [val] you will enter afterwards, without attributes. If you select 'inverse', you'll obtain a list of all the URIs for which the [val] matches the chosen relation, 'sub' and 'super' modify the result depending on the chosen relation and the last input box allows you to add attributes to the result.");
+       if (selopt[6].checked)
+       alert ("This production returns a [set] composed by all the URIs in the given [set] which match the condition in the given [boole].");
+       if (selopt[7].checked)
+       alert ("'Union' returns a [set] which is the union of the two given [set]; should an URI be present in each [set] with different attributes, it will be included in the result only once with all the attributes.\n'Intersect' returns a [set] which contains the cartesian product of the URIs listed in each given [set].\n'Diff' returns a [set] which contains the URIs found in the first given [set] but not in the second. Attributes are ignored.");
+       if (selopt[8].checked)
+       alert ("Allows you to assign a value to a [svar]");
+       if (selopt[9].checked)
+       alert ("Allows you to assign a value to a [vvar]");
+       }
+       }
+function choice()
+{
+top.stadd="";
+with (document.form1) {
+       inputok=0;voidfield=0;top.wrong=0;
+       if (selopt[0].checked) {
+               top.stadd="ref [val]";
+               inputok=1;
+                                         }
+       if (selopt[1].checked) {
+               top.stadd="pattern [val]";
+               inputok=1;
+                                         }
+       if (selopt[2].checked) {
+               top.stadd=set1.value;
+               if (set1.value!="") {inputok=1} else voidfield=1;
+                                         }
+       if (selopt[3].checked) {
+               top.stadd=set2.value;
+               if (set2.value!="") {inputok=1} else voidfield=1;
+                                         }
+       if (selopt[4].checked) {
+               top.stadd="([set])";
+               inputok=1;
+                                         }
+       if (selopt[5].checked) {
+               if (set5.value.charAt(set5.value.length-1)==","){set5.value=set5.value.substring(0,set5.value.length-1)}
+               if (set5.value.length<7) {set5.value=""};
+               set4.value=top.tpa(set4.value);
+               top.stadd="relation "+set25.value+" "+set3.value+" "+set4.value+" [val] "+set5.value;
+               top.gramcheck("qp",set4.value);
+               //alert(set5.value.charAt(set5.value.length-1));
+               top.stadd=top.tpa(top.stadd);
+               //while (top.stadd.indexOf("<")>-1)
+                       //{top.stadd=top.stadd.replace("<","&lt;");}
+               if (set5.value!="")
+               {top.gramcheck("vlist",set5.value);}
+               else inputok=1;
+                                         }
+       if (selopt[6].checked) {
+               top.stadd="select @"+set6.value+" in [set] where [boole]";
+               top.gramcheck("id",set6.value);
+               if ((set6.value!="") && (inputok==1))
+                       {
+                       top.rvars[top.norvars]="@"+set6.value;
+                       top.norvars++;  
+                       }
+                                         }
+       if (selopt[7].checked) {
+               top.stadd="[set] "+set7.value+" [set]";
+               inputok=1;      
+                                         }
+       if (selopt[8].checked) {
+               top.stadd="let %"+set8.value+" be [set] in [set]";
+               top.gramcheck("id",set8.value);
+               if ((set8.value!="") && (inputok==1))
+                       {
+                       top.svars[top.nosvars]="%"+set8.value;
+                       top.nosvars++;  
+                       }
+                                         }
+       if (selopt[9].checked) {
+               top.stadd="let $"+set9.value+" be [val] in [set]";
+               top.gramcheck("id",set9.value);
+               if ((set9.value!="") && (inputok==1))
+                       {
+                       top.vvars1[top.novvars1]="$"+set9.value;
+                       top.novvars1++; 
+                       }
+                                         }
+       if (selopt[10].checked) {
+               set10.value=top.tpa(set10.value);
+               top.stadd=set10.value;
+               if (set10.value!="") {inputok=1} else voidfield=1;
+                                         }
+                  }
+if (top.stadd!="" && inputok==1) {top.aggq()}
+       else if (voidfield==1) alert("You left at least one field unfilled");
+}
+</SCRIPT>
+</HEAD>
+<BODY>
+<h1> <SCRIPT language="Javascript">document.write(top.ltr) </SCRIPT>
+<input type="button" value="&lt;-" onmouseOver="top.help(-8)" onclick="top.annulla()">
+<input type="button" value="-&gt;" onmouseOver="top.help(-81)" onclick="top.ripristina()"></h1>
+<h2> Select one of the following: </h2>
+<form name="form1" action="Javascript:choice();" method="get">
+<input type="radio" name="selopt"> ref [val] <br>
+<input type="radio" name="selopt"> pattern [val] <br>
+<input type="radio" name="selopt"> <select name="set1" type=text onFocus="selopt[2].checked=true;top.help(6)"> 
+<SCRIPT language=Javascript> listsvars(); </SCRIPT>
+</select>
+<br>
+<input type="radio" name="selopt"> <select name="set2" type=text onFocus="selopt[3].checked=true;top.help(4)">
+<SCRIPT language=Javascript> listrvars(); </SCRIPT>
+</select>
+<br>
+<input type="radio" name="selopt"> ( [set] ) <br>
+<input type="radio" name="selopt"> relation 
+<select name="set25" onFocus="selopt[5].checked=true">
+<OPTION selected value="">  
+<OPTION value=inverse> inverse
+</select> 
+<select name="set3" onFocus="selopt[5].checked=true">
+<OPTION selected value=""> 
+<OPTION value=sub> sub
+<OPTION value=super> super
+</select> 
+<input name="set4" type=text size=15 value="&quot;&quot;" onFocus="selopt[5].checked=true;top.help(5)">
+[val] <input name="set5" type=text size=20 onFocus="selopt[5].checked=true;top.help(2);if (this.value=='') this.value='attr $';">
+<br>
+<input type="radio" name="selopt"> select @ <input name="set6" type=text onFocus="selopt[6].checked=true;top.help(3)"> 
+in [set] where [boole] <br> <input type="radio" name="selopt"> [set] 
+<select name="set7" onFocus="selopt[7].checked=true">
+<OPTION value=union> union
+<OPTION value=intersect> intersect
+<OPTION value=diff> diff
+</select> 
+[set]  <br>
+<input type="radio" name="selopt"> let %<input name="set8" type=text onFocus="selopt[8].checked=true;top.help(3)"> be [set] in [set] <br>
+<input type="radio" name="selopt"> let $<input name="set9" type=text onFocus="selopt[9].checked=true;top.help(3)"> be [val] in [set] <br>
+<input type="radio" name="selopt"> <input name="set10" type=text 
+onFocus="selopt[10].checked=true;top.help(1)">  <br>
+<input type="submit" value="compose"><input type="button" value="get help" onclick="help()">
+<!--input type="button" value="compose" onclick="choice()"><!--input type="button" value="get help" onclick="help()">
+</form>
+</BODY>
+</HTML>
diff --git a/helm/searchEngine/html/start.html b/helm/searchEngine/html/start.html
new file mode 100644 (file)
index 0000000..c5a6ef7
--- /dev/null
@@ -0,0 +1,15 @@
+<HTML>
+<HEAD>
+<SCRIPT language="Javascript">
+</SCRIPT>
+</HEAD>
+<BODY>
+Are you lost? Consult the <a href="http://helm.cs.unibo.it/searchEngine/manual/index.html" target="_blank">on-line manual</a>
+<br><br>
+<center>
+  <input type=button value="Compose a query" onClick="top.cw.location=top.topurl+top.action+'set.html';top.gw.location=top.topurl+top.action+'grammar.html#set';top.sw.location=top.topurl+top.action+'editor.html';top.qw.location=top.topurl+top.action+'almost_blank.html';top.initialize();">
+<br><br>
+<input type=button value="Submit a pre-defined query" onClick="top.cw.location=top.topurl+top.action+'pdq.html';top.gw.location=top.topurl+top.action+'blank.html';top.sw.location=top.topurl+top.action+'blank.html';top.qw.location=top.topurl+top.action+'almost_blank.html';top.initialize();"> 
+</center>
+</BODY>
+</HTML>
diff --git a/helm/searchEngine/html/summary.html b/helm/searchEngine/html/summary.html
new file mode 100644 (file)
index 0000000..8284f0d
--- /dev/null
@@ -0,0 +1,23 @@
+<HTML>
+<HEAD>
+<SCRIPT language="Javascript">
+function armageddon()
+       {
+       top.ltr=top.query;
+       top.stadd=document.win.parqu.value;
+       top.aggq();
+       }
+function fill()
+       {
+       document.win.parqu.value=top.query;
+       }
+</SCRIPT>
+</HEAD>
+<BODY>
+<FORM NAME="win">
+<TEXTAREA ROWS=20 COLS=58 NAME="parqu" onMouseOver=fill()>
+</TEXTAREA><BR>
+<INPUT type="button" value="modifica" onClick=armageddon()>
+</FORM>
+</BODY>
+</HTML>
diff --git a/helm/searchEngine/html/templateambigpdq1.html b/helm/searchEngine/html/templateambigpdq1.html
new file mode 100644 (file)
index 0000000..3897e34
--- /dev/null
@@ -0,0 +1,22 @@
+<HTML>
+<HEAD>
+<TITLE>@TITLE@</TITLE>
+<style> A { text-decoration: none } </style>
+<SCRIPT language="Javascript">
+   var ambiguousinput='@MSG@';
+   var elenco = new Array(@CHOICES@);
+   var ident = '@ID@';
+</SCRIPT>
+</HEAD>
+<BODY>
+<h3><SCRIPT language="Javascript">document.write(ambiguousinput);</SCRIPT></h3>
+<br />Please select one or more of the following.
+<br />
+<form name="disamb">
+<SCRIPT language="Javascript">top.templateambigpdq1_listauri(document,elenco);</SCRIPT><br />
+<input type="button" value="Ok" onClick="top.templateambigpdq1_invia(document,top,elenco,ident);" />
+<input type="button" value="Constants Only" onClick="top.templateambigpdq1_selezionaCostanti(document,elenco);" />
+<input type="button" value="Cancel" onClick="top.templateambigpdq1_resetta();" />
+</form>
+</BODY>
+</HTML>
diff --git a/helm/searchEngine/html/templateambigpdq2.html b/helm/searchEngine/html/templateambigpdq2.html
new file mode 100644 (file)
index 0000000..ad58e7f
--- /dev/null
@@ -0,0 +1,19 @@
+<HTML>
+<HEAD>
+<style> A { text-decoration: none } </style>
+<SCRIPT language="Javascript">
+   var elenco = new Array(@INTERPRETATIONS@);
+   var labels = new Array(@INTERPRETATIONS_LABELS@);
+</SCRIPT>
+</HEAD>
+<BODY>
+<h3>There are more than one possible interpretations.</h3>
+<br />Please choose one of the following.
+<br />
+<form name="disamb">
+<SCRIPT language="Javascript">top.templateambigpdq2_listainterpretazioni(document,elenco,labels);</SCRIPT><br />
+<input type="button" value="Ok" onClick="top.templateambigpdq2_invia(document,elenco);" />
+<input type="button" value="Cancel" onClick="top.templateambigpdq2_resetta();" />
+</form>
+</BODY>
+</HTML>
diff --git a/helm/searchEngine/html/templateambigpdq3.html b/helm/searchEngine/html/templateambigpdq3.html
new file mode 100644 (file)
index 0000000..297182c
--- /dev/null
@@ -0,0 +1,11 @@
+<html>
+   <head>
+      <style> A { text-decoration: none } </style>
+      <SCRIPT>
+         top.templateambigpdq3_init(new Array(@NEW_ALIASES@));
+      </SCRIPT>
+   </head>
+   <body>
+      @RESULTS@
+   </body>
+</html>
diff --git a/helm/searchEngine/html/val.html b/helm/searchEngine/html/val.html
new file mode 100644 (file)
index 0000000..cd80fbc
--- /dev/null
@@ -0,0 +1,115 @@
+<HTML>
+<HEAD>
+<SCRIPT language="Javascript">
+function listrvars()
+       {
+       for (num=0; num<top.norvars; num++)
+               {
+               document.write("<OPTION value="+top.rvars[num]+">"+top.rvars[num]);
+               }
+       }
+function listvvars1()
+       {
+       for (num=0; num<top.novvars1; num++)
+               {
+               document.write("<OPTION value="+top.vvars1[num]+">"+top.vvars1[num]);
+               }
+       }
+function listvvars2()
+       {
+       for (num=0; num<top.novvars2; num++)
+               {
+               document.write("<OPTION value="+top.vvars2[num]+">"+top.vvars2[num]);
+               }
+       }
+function help()
+       {
+       with (document.form1) {
+       if (selopt[0].checked)
+       alert ("No help available.");
+       if (selopt[1].checked)
+       alert ("Turns a list of strings which can have attributes ( the [set] ) in a list of strings which cannot have them ( a [val] ).");
+       if (selopt[2].checked)
+       alert ("Returns the attribute of the given [vvar] in the given [rvar].");
+       if (selopt[3].checked)
+       alert ("No help available.");
+       if (selopt[4].checked)
+       alert ("Parenthesis are employed to force precedence between operators.");
+       if (selopt[5].checked)
+       alert ("The [path] you must enter represents a relation; this production returns a [val] composed by the union of all the URIs which match the chosen relation in the [val] you will enter afterwards. If you select 'inverse', you'll obtain a list of all the URIs for which the [val] matches the chosen relation, 'sub' and 'super' modify the result depending on the chosen relation.");
+       }
+       }
+function choice()
+{
+top.stadd="";top.wrong=0;voidfield=1;
+with (document.form1) {
+       if (selopt[0].checked) {
+               voidfield=0;
+               val1.value=top.tpa(val1.value);
+               top.stadd=val1.value;
+               top.gramcheck("qsl",val1.value);
+                                         }
+       if (selopt[1].checked) {
+               top.stadd="refof [set]";
+                                         }
+       if (selopt[2].checked) {
+               if (val2.value==""||val8.value==""){voidfield=1;}
+               else {top.stadd=val2.value+"."+val8.value;}
+                                         }
+       if (selopt[3].checked) {
+               top.stadd=val3.value;
+                                         }
+       if (selopt[4].checked) {
+               top.stadd="([val])";
+                                         }
+       if (selopt[5].checked) {
+               voidfield=0;
+               val6.value=top.tpa(val6.value);
+               top.stadd="property "+val45.value+" "+val5.value+" "+val6.value+" [val]";
+               top.gramcheck("qp",val6.value);
+                                         }
+       if (selopt[6].checked) {
+               val7.value=top.tpa(val7.value);
+               top.stadd=val7.value;
+               if (val7.value!="") {inputok=1} else voidfield=1;
+                                         }
+                  }
+if (top.stadd!="") top.aggq();
+       else if (voidfield==1) alert ("You left at least one field unfilled");
+}
+</SCRIPT>
+</HEAD>
+<BODY>
+<h1> <SCRIPT language="Javascript">document.write(top.ltr) </SCRIPT>
+<input type="button" value="&lt;-" onmouseOver="top.help(-8)" onclick="top.annulla()">
+<input type="button" value="-&gt;" onmouseOver="top.help(-81)" onclick="top.ripristina()"></h1>
+<h2> Select one of the following: </h2>
+<form name="form1" action="Javascript:choice();" method="get">
+<input type="radio" name="selopt"> <input name="val1" type=text value="{&quot;&quot;}" onFocus="selopt[0].checked=true;top.help(7)"> <br>
+<input type="radio" name="selopt"> refof [set] <br>
+<input type="radio" name="selopt"> <select name="val2" type=text onFocus="selopt[2].checked=true;top.help(4)">
+<SCRIPT language=Javascript> listrvars(); </SCRIPT>
+</select> . <select name="val8" type=text onFocus="selopt[2].checked=true;top.help(8)">
+<SCRIPT language=Javascript> listvvars2(); </SCRIPT>
+</select>
+<br>
+<input type="radio" name="selopt"> <select name="val3" type=text onFocus="selopt[3].checked=true;top.help(81)">
+<SCRIPT language=Javascript> listvvars1(); </SCRIPT>
+</select>
+<br>
+<input type="radio" name="selopt"> ( [val] ) <br>
+<input type="radio" name="selopt"> property
+<select name="val45" onFocus="selopt[5].checked=true">
+<OPTION selected value="">  
+<OPTION value=inverse> inverse
+</select> 
+<select name="val5" onFocus="selopt[5].checked=true">
+<OPTION selected value=""> 
+<OPTION value=sub> sub
+<OPTION value=super> super
+</select> <input name="val6" type=text value="&quot;&quot;" onFocus="selopt[5].checked=true;top.help(5)"> [val] <br>
+<input type="radio" name="selopt"> <input name="val7" type=text onFocus="selopt[6].checked=true;top.help(1)">  <br>
+<input type="submit" value="compose"><input type="button" value="get help" onclick="help()">
+</form>
+</BODY>
+</HTML>