]> matita.cs.unibo.it Git - helm.git/commitdiff
Modified Files:
authorIrene Schena <irene.schena@unibo.it>
Thu, 29 Aug 2002 14:41:02 +0000 (14:41 +0000)
committerIrene Schena <irene.schena@unibo.it>
Thu, 29 Aug 2002 14:41:02 +0000 (14:41 +0000)
1)core_grammar.txt grammar.txt query.xml xmathql.dtd: new grammar

helm/mathql/core_grammar.txt
helm/mathql/grammar.txt
helm/mathql/query.xml
helm/mathql/xmathql.dtd

index 737741c483c98cb359e8cda4bd06d86fb562f422..2ef292c99782ec25e47a3380e5996f5b2eec70d3 100644 (file)
@@ -17,7 +17,7 @@ MATHEMATICAL QUERY LANGUAGE (MathQL)
        |  SELECT <rvar> IN <set> WHERE <bool>  (* selezione *)
        |  LET <svar> BE <set> IN <set>         (* assegnazione a set-var in 
                                                   contesto *)
-       |  RELATION <quoted-constant-string> <set> ATTR <vvar-list>           
+       |  <relation> <quoted-constant-string> <set> ATTR <vvar-list>           
                                                (* unione insieme risorse in
                                                  relazione specificata con le
                                                  risorse in set, ognuna con 
@@ -25,6 +25,12 @@ MATHEMATICAL QUERY LANGUAGE (MathQL)
        |  <set> UNION <set>                    (* unione *)
        |  <set> INTERSECT <set>                (* intersezione *)
 
+<relation> := RELATION                        (* relazione (proprieta') *)
+          |  SUBRELATION                      (* proprieta' e 
+                                                 sotto-proprieta' *)
+          |  SUPERRELATION                    (* proprieta' e 
+                                                 super-proprieta' *)
+
 <vvar-list> := <vvar>
             |  <vvar> , <vvar-list>
 
@@ -50,9 +56,10 @@ MATHEMATICAL QUERY LANGUAGE (MathQL)
              |  <rvar>.<vvar>                      (* variabile per insieme
                                                      stringhe, relativa a 
                                                      riferimento *)
-            |  <function> <quoted-constant-string> <rvar
+            |  <function> <quoted-constant-string> <string-set
                                                   (* applicazione di funzione
-                                                     specificata a riferim. *)
+                                                     specificata a riferimento
+                                                     o insiemi di rif. o var*)
 
 <quoted-constant-string-set> := <quoted-constant-string>
                             |  <quoted-constant-string> , <quoted-constant-string-set>                                           
@@ -99,4 +106,8 @@ MATHEMATICAL QUERY LANGUAGE (MathQL)
                    HYPOTHESIS, MAINCONCLUSION, CONCLUSION, BODY
   CONSTRUCTORS
   INTHEORY con attributo ITEMTYPE (riferimenti oggetti contenuti in teorie)
-  THEORYREFTO con attributo ITEMTYPE (riferimenti teorie referenti a oggetti)
\ No newline at end of file
+  THEORYREFTO con attributo ITEMTYPE (riferimenti teorie referenti a oggetti)
+- <string-set> invece di <set> come argomento di <function> poiche' la REF non
+  e' piu' restrittiva su argomento/i e quindi e' inutile imporne l'uso quando
+  si passano i riferimenti alle funzioni. Con <string-set> l'utente e' libero
+  di passare direttamente le stringhe dei riferimenti.
\ No newline at end of file
index 48d3a63836fbefbaf6a1b4fc4a267293a929d5ea..979b4c549cd2f21fb0437ea10f4e18086769cd64 100644 (file)
@@ -16,21 +16,25 @@ MATHEMATICAL QUERY LANGUAGE (MathQL)
        |  SELECT <rvar> IN <set> WHERE <bool>  (* selezione *)
        |  LET <svar> BE <set> IN <set>         (* assegnazione a set-var in 
                                                   contesto *)
-       |  RELATION <quoted-constant-string> <set> ATTR <vvar-list>           
+       |  <relation> <quoted-constant-string> <set> ATTR <vvar-list>           
                                                (* unione insieme risorse in
                                                  relazione specificata con le
                                                  risorse in set, ognuna con 
                                                  attributi (ATTR) *)
-       |  <set> OFTYPE <set>                  (* unione oggetti in base a 
-                                                  classi RDF *)
-       |  <set> OFSUPERTYPE <set>             (* unione oggetti in base a 
-                                                  classi e loro superclassi *)
-       |  <set> OFSUBTYPE <set>               (* unione oggetti in base a 
-                                                  classi e loro sottoclassi *)   
        |  <set> UNION <set>                    (* unione *)
        |  <set> INTERSECT <set>                (* intersezione *)
        |  <set> DIFF <set>                     (* differenza *)
 
+<relation> := RELATION                        (* relazione (proprieta') *)
+          |  SUBRELATION                      (* proprieta' e 
+                                                 sotto-proprieta' *)
+          |  SUPERRELATION                    (* proprieta' e 
+                                                 super-proprieta' *)
+
+<vvar-list> := <vvar>
+            |  <vvar> , <vvar-list>
+
+
 <bool> := ( <bool> )                           (* parentesizzazione *)
        |  TRUE                                 (* vero *)
        |  FALSE                                (* falso *)
@@ -45,10 +49,6 @@ MATHEMATICAL QUERY LANGUAGE (MathQL)
                                                  insiemi stringhe *)
        |  EX <bool>                           (* existential on attributes
                                                  of references *)
-
-<vvar-list> := <vvar>
-            |  <vvar> , <vvar-list>
-
 <string-set> := {}                                (* insieme vuoto*)
             |  <quoted-constant-string-set>       (* stringa singoletto *)
              |  {<quoted-constant-string-set>}    (* insieme stringhe *)
@@ -56,9 +56,10 @@ MATHEMATICAL QUERY LANGUAGE (MathQL)
              |  <rvar>.<vvar>                      (* variabile per insieme
                                                      stringhe, relativa a 
                                                      riferimento *)
-            |  <function> <quoted-constant-string> <rvar
+            |  <function> <quoted-constant-string> <string-set
                                                   (* applicazione di funzione
-                                                     specificata a riferim. *)
+                                                     specificata a riferimento
+                                                     o insiemi di rif. o var*)
 
 <quoted-constant-string-list> := <quoted-constant-string>
                              |  <quoted-constant-string> , <quoted-constant-string-list>                                                 
@@ -67,11 +68,11 @@ MATHEMATICAL QUERY LANGUAGE (MathQL)
 <function> := FUN                         (* funzione generale *)
           |  <property>        
 
-<property> := VALUEOF                     (* funzione proprieta': restituisce
+<property> := ATTRIBUTE                           (* funzione proprieta': restituisce
                                              suoi  valori*)
-           |  SUBVALUE                    (* restituisce valori proprieta' e 
+           |  SUBATTR                     (* restituisce valori proprieta' e 
                                              sotto-proprieta' di *) 
-           |  SUPERVALUE                  (* restituisce valori proprieta' e 
+           |  SUPERATTR                           (* restituisce valori proprieta' e 
                                              super-proprieta' di *)
 
 <rvar> := @ <not-reserved-identifier>          (* variabile per riferimento *)
@@ -81,7 +82,7 @@ MATHEMATICAL QUERY LANGUAGE (MathQL)
                                                  riferimenti *)
 
 
-
+- Idea di base: grammatica del linguaggio semplice e permissiva (duttile)
 - MEET e' definito come "esiste almeno un elemento che appartiene 
   all'interserzione tra due insiemi"
 - le stringhe sono "case sensitive" 
@@ -109,6 +110,18 @@ MATHEMATICAL QUERY LANGUAGE (MathQL)
   linguaggio
 - EX verfica che la sua condizione sia vera per almeno un insieme di attributi
   associato all'URI in rvar 
+- Possibili RELATION sono:
+  USE con attributo POSITION (riferimenti backward) e valori MAINHYPOTHESIS, 
+                   HYPOTHESIS, MAINCONCLUSION, CONCLUSION, BODY
+  USEBY con attributo POSITION (riferimenti forward) e valori MAINHYPOTHESIS, 
+                   HYPOTHESIS, MAINCONCLUSION, CONCLUSION, BODY
+  CONSTRUCTORS
+  INTHEORY con attributo ITEMTYPE (riferimenti oggetti contenuti in teorie)
+  THEORYREFTO con attributo ITEMTYPE (riferimenti teorie referenti a oggetti)
+- <string-set> invece di <set> come argomento di <function> poiche' la REF non
+  e' piu' restrittiva su argomento/i e quindi e' inutile imporne l'uso quando
+  si passano i riferimenti alle funzioni. Con <string-set> l'utente e' libero
+  di passare direttamente le stringhe dei riferimenti.
 - Il costrutto di ordinamento:
   <set> SORTEDBY <function> <order>   (* unione insieme ordinato secondo
                                          valore funzione e ordine *)
@@ -121,4 +134,6 @@ MATHEMATICAL QUERY LANGUAGE (MathQL)
   le DC: TITLE, CONTRIBUTOR, CREATOR, PUBLISHER, SUBJECT, DESCRIPTION, DATE,
   TYPE, FORMAT, IDENTIFIER, LANGUAGE, RELATION, SOURCE, COVERAGE, RIGHTS, 
   RIGHTS; and INSTITUTION, CONTACT, FIRSTVERSION, MODIFIED, THEORY
-
+- Il concetto di Classe, sottoclasse, superclasse, puo' essere visto come una
+  particolare proprieta' (type o tipo) di una risorsa, e quindi codificabile
+  da RELATION
\ No newline at end of file
index 748ab0098a88a6526d861ffdef613dc8526b3205..4efca730d4e72a6b8697adc2471fe174a785c673 100644 (file)
@@ -21,7 +21,7 @@
      <CONST>MainHypothesis</CONST>
     </EQ>
     <EQ>
-     <PROPERTY name="TITLE"><Rvar name="@result"/></PROPERTY>
+     <PROPERTY name="TITLE"><REFOF><Rvar name="@result"/></REFOF></PROPERTY>
      <CONST>Uguaglianza</CONST>
     </EQ>
    </AND>
index bcff12560dcdff29eee10b572e51561f23dac911..8d74cadc5d88ba6d8372a2dbfd3397f09528885b 100644 (file)
@@ -53,7 +53,7 @@
 <!-- MathQL query expression declaration -->
 
 <!ENTITY % setexpr '(Rvar|Lvar|Ref|Pattern|Select|LetIn|Relation|
-                      TypeOf|SuperTypeOf|SubTypeOf|Union|Intersect|Diff)'>
+                     Union|Intersect|Diff)'>
 
 <!-- MathQL boolean expression declaration -->
 
@@ -61,7 +61,7 @@
 
 <!-- MathQL string-set expression declaration -->
 
-<!ENTITY % functexpr '(FUN|PROPERTY|SUPERPROPERTY|SUBPROPERTY)'>
+<!ENTITY % functexpr '(FUN|PROPERTY)'>
 
 <!ENTITY % stringsetexpr '(CONST|CONSTLIST|REFOF|BINDER|%functexpr;)'>
 
 
 <!ELEMENT LetIn (%setexpr;, Target)>
 
-<!ELEMENT Relation (%setexpr;, Attr+)>
+<!ELEMENT Relation (Refine?,%setexpr;, Attr+)>
 <!ATTLIST Relation
-          name CDATA #REQUIRED>
-
-<!ELEMENT TypeOf %setexpr;>
-<!ATTLIST TypeOf
-          binder CDATA #REQUIRED>
-
-<!ELEMENT SuperTypeOf %setexpr;>
-<!ATTLIST SuperTypeOf
-          binder CDATA #REQUIRED>
-
-<!ELEMENT SubTypeOf %setexpr;>
-<!ATTLIST SubTypeOf
-          binder CDATA #REQUIRED>
+          name CDATA #REQUIRED
+          refine (sub|super) #IMPLIED>
 
 <!ELEMENT Union (%setexpr;, %setexpr;)>
 
 <!ATTLIST BINDER
           name CDATA #REQUIRED>
 
-<!ELEMENT FUN (Rvar)>
+<!ELEMENT FUN %stringsetexpr;>
 <!ATTLIST FUN
           name CDATA #REQUIRED>
 
-<!ELEMENT PROPERTY (Rvar)>
+<!ELEMENT PROPERTY %stringsetexpr;>
 <!ATTLIST PROPERTY
-          name CDATA #REQUIRED>
-
-<!ELEMENT SUPERPROPERTY (Rvar)>
-<!ATTLIST SUPERPROPERTY
-          name CDATA #REQUIRED>
-
-<!ELEMENT SUBPROPERTY (Rvar)>
-<!ATTLIST SUBPROPERTY
-          name CDATA #REQUIRED>
\ No newline at end of file
+          name CDATA #REQUIRED
+          refine (sub|super) #IMPLIED>
\ No newline at end of file