]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/mathql/grammar.txt
Modified Files:
[helm.git] / helm / mathql / grammar.txt
index 877bd075fddc85f7955296612a7f388eacb2e53b..25e4b8e1eb3cb62c3730f2592c675ec6e0448e91 100644 (file)
@@ -7,8 +7,6 @@ MATHEMATICAL QUERY LANGUAGE (MathQL)
        |  <list> UNION <list>                  (* unione *)
        |  <list> INTERSECT <list>              (* intersezione *)
        |  <list> DIFF <list>                   (* differenza *)
-       |  <list> SORTEDBY <order> <function>   (* unione lista ordinata secondo
-                                                  ordine e valore funzione *)
        |  SELECT <rvar> IN <list> WHERE <bool> (* selezione *)
        |  EXISTS <rvar> IN <list> WHERE <bool> (* esistenziale *)
        |  USE <list> POSITION <svar>           (* unione lista backward *)
@@ -34,20 +32,20 @@ MATHEMATICAL QUERY LANGUAGE (MathQL)
        |  FALSE                                (* falso *)
        |  <string> IS <string>                 (* case sensitive matching *)
        
-<pattern> := <quoted-constant-string>          (* pattern costante *)
+<pattern> := <"-quoted-constant-string>        (* pattern costante *)
           
-<string> := <quoted-constant-string>           (* costante letterale *)
+<string> := <'-quoted-constant-string>         (* costante letterale *)
          |  CONCLUSION | HYPOTHESIS | BODY     (* costanti simboliche *)
          |  MAINCONCLUSION | MAINHYPOTHESIS
          |  <rvar>                             (* variabile *)
         |  <svar>                             (* variabile *)
         |  <function> <rvar>                  (* applicazione di funzione *)
         
-<function> := NAME                            (* rvar -> nome_oggetto *)
+<function> := NAME                            (* URIREF -> nome_oggetto *)
           |  <property>
 
-<property> := THEORY                           (* URI -> valore_Proprieta' *)
-           |  TITLE                           (* URI -> valore_Prop_DC *)
+<property> := THEORY                           (* URIREF -> valore_Proprieta' *)
+           |  TITLE                           (* URIREF -> valore_Prop_DC *)
            |  CONTRIBUTOR
            |  CREATOR
            |  PUBLISHER
@@ -73,16 +71,14 @@ MATHEMATICAL QUERY LANGUAGE (MathQL)
              |  SUPER                         (* proprieta' e super-proprieta'
                                                   di *)
 
-<order>    := DESC                             (* ordinamento decrescente *)
-          |  ASC                              (* ordinamento crescente *) 
-
 <rvar> := <not-reserved-identifier>            (* variabile per risorse *)
 <svar> := $ <not-reserved-identifier>          (* variabile per stringhe *)
 
 - le stringhe sono "case sensitive" 
 - la funzione non definita sull'argomento restituisce la stringa nulla
-- le <rvar> si presuppongono essere istanziate come URI complete o
-  URI#xpointer_expression e identificano risorse 
+- le <rvar> si presuppongono essere istanziate come URI references costituite
+  da un URI e da un fragment identifier opzionalecomplete; esse identificano 
+  risorse 
 - ogni binding lega una variabile libera (nuova) 
 - Precedenza operatori:
   NOT (+)  DIFF
@@ -98,3 +94,36 @@ MATHEMATICAL QUERY LANGUAGE (MathQL)
   teorema ci sono? 
 - L'ordinamento di default e' quello alfabetico crescente in base al nome 
   delle rvar
+- Note su <pattern>
+  Contiene un'espressione regolare per selezionare delle "reference" 
+  (cioe` delle uri eventualmente seguite da un fragment identifier)
+  L'espressione regolare contiene i seguenti costrutti:
+
+  costrutto        semanticamente fa match con                       
+  ?                un singolo carattere diverso da / # :             
+  *                la piu' lunga sottostringa che non contiene / # : 
+  **               la piu' lunga sottostringa che non contiene # :
+  altro carattere  solo se' stesso
+
+  costrutto        puo' appareire in
+  ?                "body"
+  *                dovunque
+  **               "body" e "fragment"
+  altro carattere  dovunque
+
+  "body"     parte compresa fra le occorrenze di ":/" e "#1" escluse
+  "fragment" parte successiva all'occorrenza "#1"
+- FUTURO: operatore di ordinamento sul risultato finale della query.
+  <query> SORTEDBY <order> <function>   (* unione lista ordinata secondo
+                                           ordine e valore funzione *)
+  <order>    := DESC                           (* ordinamento decrescente *)
+            |  ASC                            (* ordinamento crescente *)     
+  DTD:
+  <!ENTITY % order '(ascendant|descendant)'>
+  <!ELEMENT Query %queryexpr;>
+  <!ELEMENT SortBy (Query, SortField)>
+  <!ELEMENT SortField %functexpr;>
+  <!ATTLIST SortField 
+            order %order; #IMPLIED>
+- RILASSAMENTO degli operatori UNION e INTERSECT. Operatori fuzzy con 
+  introduzione di pesi associati ai risultati.
\ No newline at end of file