2002.<br>
<br>
<b>Ferruccio Guidi</b> obtained a Master degree in Mathematics
-at the Univerity of Padova and a PhD in Computer Science at the University
+at the University of Padova and a PhD in Computer Science at the University
of Bologna. His research interests include computer-assisted proof development,
Martin-Löf type theory and substructural logic. He is a member of
the <a href="http://helm.cs.unibo.it/">HELM Working Group</a> and
Research Group in Logic</a>.<br>
<br>
<b>Irene Schena</b> obtained a Master Degree in Computer Science
-and a Ph.D. in Computer Science at the Univerity of Bologna. Her research
-interests include Linear Logic and Web Tecnologies. She is a member of the
+and a Ph.D. in Computer Science at the University of Bologna. Her research
+interests include Linear Logic and Web Technologies. She is a member of the
<a href="http://helm.cs.unibo.it/">HELM Working Group</a> and of the
<a href="http://www.w3c.org/Math">W3C Math Working Group</a>.<br>
<br>
</li>
</ul>
- <b>Papers concerning the erlier versions of MathQL-1:</b><br>
+ <b>Papers concerning the earlier versions of MathQL-1:</b><br>
<ul>
<li>F. Guidi and I. Schena: <i>A Query Language for a Metadata
<ul>
<li>MathQL-1 query results have a 4-dimensional geometry whereas
other languages assume that query results are returned in 1-dimensional
-structures (ie lists of resources) or 2-dimensional structures (ie relational
+structures (i.e. lists of resources) or 2-dimensional structures (i.e. relational
database tables). This allows to get better outcomes from queries returning
structured results.<br>
</li>
href="http://www.cs.unibo.it/cgi-bin/cvsweb/helm/ocaml/mathql_generator/">mathql_generator</a>)
allows to build specific kinds of MathQL-1 queries, which are meaningful
in the context of HELM, starting from a high-level description of the wanted
- results. These queries are descibed at an abstract level in the following
+ results. These queries are described at an abstract level in the following
paper:</li>
</ol>
<ol start="4">
<li>The testing software for the MathQL-1 Suite (<a
href="http://www.cs.unibo.it/cgi-bin/cvsweb/helm/mathql_test/">mathql_test</a>)
- providides three textual interfaces (one for the basic package, one for
+ provides three textual interfaces (one for the basic package, one for
the interpreter and one for the query generator) with specific features meant
for testing.<br>
</li>
</ol>
The current version of the Suite, realized entirely by F. Guidi, implements
MathQL-1 version 3 (i.e. MathQL-1.3). The newly implemented features, which
- are not included in the ufficial <a href="documentation.html">documentation</a>
+ are not included in the official <a href="documentation.html">documentation</a>
yet, are reported in the <a href="whatsnew.html">What's new</a> section.<br>
<br>
The latest <a
<head>
<title>MathQL</title>
-
+
<meta http-equiv="content-type"
content="text/html; charset=ISO-8859-1">
-
+
<meta name="author" content="Ferruccio Guidi">
-
+
<meta name="description" content="MathQL Home Page">
</head>
<body>
-
+
<h1 align="center">MathQL-1</h1>
-
+
<h2 align="center">A query language for RDF metadata</h2>
-
+
<table cellpadding="10" cellspacing="2" border="0" width="95%"
bgcolor="#ffffff">
- <tbody>
- <tr>
- <td valign="top" align="left">
+ <tbody>
+ <tr>
+ <td valign="top" align="left">
-
+
<ul>
- <li>Forward<br>
- </li>
+ <li>Forward<br>
+ </li>
-
+
</ul>
-
+
<ul>
- <li><a href="features.html">Features</a></li>
+ <li><a href="features.html">Features</a></li>
-
+
</ul>
-
+
<ul>
- <li><a href="whatsnew.html">What's new</a></li>
-
+ <li><a href="whatsnew.html">What's new</a></li>
+
</ul>
-
+
<ul>
- <li><a href="documentation.html">Documentation</a></li>
+ <li><a href="documentation.html">Documentation</a></li>
-
+
</ul>
-
+
<ul>
- <li><a href="implementation.html">Implementation</a><br>
- </li>
+ <li><a href="implementation.html">Implementation</a><br>
+ </li>
-
+
</ul>
-
+
<ul>
- <li><a href="authors.html">The authors</a><br>
- </li>
+ <li><a href="authors.html">The authors</a><br>
+ </li>
-
+
</ul>
-
+
<ul>
- <li><a href="links.html">Links</a><br>
- </li>
+ <li><a href="links.html">Links</a><br>
+ </li>
-
+
</ul>
- <br>
- </td>
- <td valign="top">
-
+ <br>
+ </td>
+ <td valign="top">
+
<div align="right"><b>Forward</b><br>
- </div>
- <br>
- The MathQL proposal rises in the context of the <a
- href="http://helm.cs.unibo.it/">HELM project</a>, which aims at the
-development of a suitable technology for the creation and maintenance
-of a virtual, distributed, hypertextual library of structured mathematical
- knowledge based on <a href="http://www.w3.org/XML/">XML</a> technology,
-through the integration of the current proof assistants and logical frameworks
-with the most recent technologies for the development of Web applications
-and electronic publishing.<br>
- <br>
- The objective of the MathQL proposal is the development of a
-set of query languages enabling the retrieval of formalized mathematical
-Web resources on the basis of content-aware requests. The first of these
- languages, <b>MathQL-1</b>, is focused on querying an arbitrary
- <a href="http://www.w3.org/RDF/">RDF</a> database because RDF is the
- <a href="http://www.w3.org/">W3C</a> standartd for describing Web
- resources at the general-purpose content level.<br>
- <br>
- As an RDF query language, MathQL-1 provides the main features
-required by the RDF community while complying with the needs of HELM.
-The peculiar aspects of this language concern the query results, which
-are highly structured and possess their own syntax, formally explained
-by a rigorous semantics.<br>
+ </div>
+ <br>
+ The MathQL proposal rises in the context of the <a
+ href="http://helm.cs.unibo.it/">HELM project</a>, which aims at the development
+of a suitable technology for the creation and maintenance of a virtual,
+distributed, hypertextual library of structured mathematical knowledge
+based on <a href="http://www.w3.org/XML/">XML</a> technology, through the
+ integration of the current proof assistants and logical frameworks with
+the most recent technologies for the development of Web applications and
+electronic publishing.<br>
+ <br>
+ The objective of the MathQL proposal is the development of a
+set of query languages enabling the retrieval of formalized mathematical
+Web resources on the basis of content-aware requests. The first of these
+ languages, <b>MathQL-1</b>, is focused on querying an arbitrary
+ <a href="http://www.w3.org/RDF/">RDF</a> database because RDF is
+the <a href="http://www.w3.org/">W3C</a> standard for describing
+Web resources at the general-purpose content level.<br>
<br>
- MathQL-1 is particularly helpful in distributed systems where
- query engines are implemented as stand-alone units, because in this
-situation the query results are exchanged between the system components
-as well as the queries, and thus both the queries and the query results
+ As an RDF query language, MathQL-1 provides the main features
+ required by the RDF community while complying with the needs of HELM.
+ The peculiar aspects of this language concern the query results, which
+ are highly structured and possess their own syntax, formally explained
+ by a rigorous semantics.<br>
+ <br>
+ MathQL-1 is particularly helpful in distributed systems where
+ query engines are implemented as stand-alone units, because in this
+situation the query results are exchanged between the system components
+as well as the queries, and thus both the queries and the query results
need to be encoded in a clearly defined format.<br>
- <br>
- Other languages to be developed in the context of the MathQL proposal
- will be suitable for queries about the semantic structure of mathematical
- data: this will include content-based pattern-matching (MathQL-2) and possibly
- other forms of formal matching involving for instance isomorphism, unification
- and definitions expansion (MathQL-3).<br>
- </td>
- </tr>
-
- </tbody>
+ <br>
+ Other languages to be developed in the context of the MathQL proposal
+ will be suitable for queries about the semantic structure of mathematical
+ data: this will include content-based pattern-matching (MathQL-2) and possibly
+ other forms of formal matching involving for instance isomorphism, unification
+ and definitions expansion (MathQL-3).<br>
+ </td>
+ </tr>
+
+ </tbody>
</table>
- <br>
- <br>
-
+ <br>
+ <br>
+
<div align="center">This site is maintained by <a
href="mailto://fguidi@cs.unibo.it">Ferruccio Guidi</a>, last update: July
-10, 2003.<br>
- <br>
- </div>
+30, 2003.<br>
+ <br>
+ </div>
+ <br>
<br>
<br>
<br>
<head>
<title>MathQL</title>
-
+
<meta http-equiv="content-type"
content="text/html; charset=ISO-8859-1">
-
+
<meta name="author" content="Ferruccio Guidi">
-
+
<meta name="description" content="MathQL Home Page">
</head>
<body>
-
+
<h1 align="center">MathQL-1</h1>
-
+
<h2 align="center">A query language for RDF metadata</h2>
-
+
<table cellpadding="10" cellspacing="2" border="0" width="95%"
bgcolor="#ffffff">
- <tbody>
- <tr>
- <td valign="top" align="left">
-
+ <tbody>
+ <tr>
+ <td valign="top" align="left">
+
<ul>
- <li><a href="index.html">Forward</a><br>
- </li>
+ <li><a href="index.html">Forward</a><br>
+ </li>
-
+
</ul>
-
+
+
<ul>
- <li><a href="features.html">Features</a></li>
-
+ <li><a href="features.html">Features</a></li>
+
+
</ul>
-
+
+
<ul>
- <li><a href="whatsnew.html">What's new</a></li>
-
+ <li><a href="whatsnew.html">What's new</a></li>
+
</ul>
-
+
<ul>
- <li><a href="documentation.html">Documentation</a></li>
+ <li><a href="documentation.html">Documentation</a></li>
-
+
</ul>
-
+
<ul>
- <li><a href="implementation.html">Implementation</a><br>
- </li>
-
+ <li><a href="implementation.html">Implementation</a><br>
+ </li>
+
</ul>
-
+
<ul>
- <li><a href="authors.html">The authors</a><br>
- </li>
+ <li><a href="authors.html">The authors</a><br>
+ </li>
-
+
</ul>
-
+
<ul>
- <li>Links<br>
- </li>
-
+ <li>Links<br>
+ </li>
+
</ul>
- <br>
- </td>
- <td valign="top">
-
+ <br>
+ </td>
+ <td valign="top">
+
<div align="right"><b>Links</b><br>
- </div>
-
+ </div>
+
<ul>
- <li><a href="http://helm.cs.unibo.it/">HELM</a> Project homepage,
+ <li><a href="http://helm.cs.unibo.it/">HELM</a> Project homepage,
<a href="http://mowgli.cs.unibo.it/">MOWGLI</a> Project homepage</li>
-
+
</ul>
-
+
<ul>
- <li>W3C <a href="http://www.w3.org/XML/">XML</a> resources,
+ <li>W3C <a href="http://www.w3.org/XML/">XML</a> resources,
W3C <a href="http://www.w3c.org/RDF/">RDF</a> resources</li>
-
+
</ul>
-
+
<ul>
- <li>Some RDF query languages having a homepage</li>
-
- </ul>
+ <li>Some RDF query languages having a homepage</li>
+ </ul>
+
<blockquote><a href="http://www.daml.org/">DAML+OIL</a> <a
href="http://guha.com/rdfdb/">rdfDB</a> <a
href="http://logicerror.com/RDFPath">RDFPath</a> <a
href="http://triple.semanticweb.org/">TRIPLE</a> <a
href="http://swordfish.rdfweb.org/rdfquery/">SquishQL</a> <a
href="http://kr.cs.ait.ac.th/XDD/">XDD</a><br>
- </blockquote>
-
- <blockquote>The Developers wishing to have their RDF query language
-listed here may contact the <a href="authors.html">authors</a>.<br>
- </blockquote>
- </td>
- </tr>
-
- </tbody>
+ </blockquote>
+
+ <blockquote>The developers wishing to have their RDF query language
+ listed here may contact the <a href="authors.html">authors</a>.<br>
+ </blockquote>
+ </td>
+ </tr>
+
+ </tbody>
</table>
- <br>
+ <br>
+ <br>
<br>
<br>
</body>
<head>
<title>MathQL</title>
-
+
<meta http-equiv="content-type"
content="text/html; charset=ISO-8859-1">
-
+
<meta name="author" content="Ferruccio Guidi">
-
+
<meta name="description" content="MathQL Home Page">
</head>
<body>
-
+
<h1 align="center">MathQL-1</h1>
-
+
<h2 align="center">A query language for RDF metadata</h2>
-
+
<table cellpadding="10" cellspacing="2" border="0" width="95%"
bgcolor="#ffffff">
- <tbody>
- <tr>
- <td valign="top" align="left">
-
+ <tbody>
+ <tr>
+ <td valign="top" align="left">
+
<ul>
- <li><a href="index.html">Forward</a><br>
- </li>
+ <li><a href="index.html">Forward</a><br>
+ </li>
-
+
</ul>
-
+
+
<ul>
- <li><a href="features.html">Features</a></li>
-
+ <li><a href="features.html">Features</a></li>
+
</ul>
-
+
<ul>
- <li>What's new<br>
- </li>
-
+ <li>What's new<br>
+ </li>
+
+
</ul>
-
+
+
<ul>
- <li><a href="documentation.html">Documentation</a></li>
+ <li><a href="documentation.html">Documentation</a></li>
-
+
</ul>
-
+
<ul>
- <li><a href="implementation.html">Implementation</a><br>
- </li>
-
+ <li><a href="implementation.html">Implementation</a><br>
+ </li>
+
</ul>
-
+
<ul>
- <li><a href="authors.html">The authors</a><br>
- </li>
+ <li><a href="authors.html">The authors</a><br>
+ </li>
-
+
</ul>
-
+
<ul>
- <li><a href="links.html">Links</a><br>
- </li>
-
+ <li><a href="links.html">Links</a><br>
+ </li>
+
</ul>
- <br>
- </td>
- <td valign="top">
-
+ <br>
+ </td>
+ <td valign="top">
+
<div align="right"><b>What's new</b><br>
- <br>
- </div>
- This page reports the newly <a href="implementation.html">implemented</a>
- features of MathQL-1 that are not included in the ufficial <a
+ <br>
+ </div>
+ This page reports the newly <a href="implementation.html">implemented</a>
+ features of MathQL-1 that are not included in the official <a
href="documentation.html">documentation</a> yet.<br>
- <br>
- Changes and additions to MathQL-1 operators:<br>
-
+ <br>
+ <hr width="100%" size="2">
+ <div align="center">
+ <h3> Changes and additions to MathQL-1 operators:</h3>
+ </div>
+
<ul>
- <li>The <b>add</b> operator now accepts a syntax extension allowing
-to specify more than one explicit attribute group.</li>
-
+ <li>The <b>add</b> operator now accepts a syntax extension allowing
+ to specify more than one explicit attribute group.</li>
+
</ul>
-
+
<blockquote>The syntax now is:</blockquote>
-
- <blockquote><query> := "add" [ "distr" ]? [ <groups> | <avar>
-] "in" <query><br>
- <groups> := <group> [ ";" <group> ]*<br>
- <group> := <attribute> [ "," <attribute> ]*<br>
- <attribute> := <value> "as" <path><br>
- <br>
- Examples:<br>
- the query <b>add "1" as "a", "2" as "b" in subj "A"</b> gives the result
- <b>"A" attr {"a"="1"; "b"="2"}</b> while<br>
- the query <b>add "1" as "a"; "2" as "b" in subj "A"</b> gives the result
- <b>"A" attr {"a"="1"}, {"b"="2"}</b>.<br>
- </blockquote>
-
- <ul>
- <li>The new <b>align</b> operator takes an integer <i>i</i> (represented
-as a string), a multiple string value <i>v</i> and returns the same <i>v</i>
-where each string with length <i>n < i</i> is prefixed with <i>i - n</i>
-spaces. The syntax of the add operator is:</li>
-
- </ul>
-
+
+ <blockquote><query> := "add" [ "distr" ]? [ <groups> |
+<avar> ] "in" <query><br>
+ <groups> := <group> [ ";" <group> ]*<br>
+ <group> := <attribute> [ "," <attribute> ]*<br>
+ <attribute> := <value> "as" <path><br>
+ <br>
+ Examples:<br>
+ the query <b>add "1" as "a", "2" as "b" in subj "A"</b> gives the result
+ <b>"A" attr {"a"="1"; "b"="2"}</b> while<br>
+ the query <b>add "1" as "a"; "2" as "b" in subj "A"</b> gives the result
+ <b>"A" attr {"a"="1"}, {"b"="2"}</b>.<br>
+ </blockquote>
+
+ <ul>
+ <li>The new <b>align</b> operator takes an integer <i>i</i> (represented
+ as a string), a multiple string value <i>v</i> and returns the same <i>v</i>
+ where each string with length <i>n < i</i> is prefixed with <i>i - n</i>
+ spaces. The syntax of the add operator is:</li>
+
+ </ul>
+
<blockquote><value> := "align" <string> "in" <value><br>
- <br>
- This operators aligns strings containing numbers so that their alphabetic
-order agrees with their numeric order.<br>
- </blockquote>
-
- <ul>
- <li>The <b>intersect</b> operator now intersects the attribute groups
-of the mathing subject strings set-theoretically rather than making their
-"Cartesian product". This semantics reduces the computational costs and makes
-intersection the dual of union.</li>
-
- </ul>
-
- <ul>
- <li>The <b>property</b> operator now accepts more than one <b>isfalse</b>
-clause to increase the complexity of the constraint condition used to filter
-the raw query results. This feature is exploited in the queries produced
-by the <a href="implementation.html">HELM query generator</a>.
<br>
- </li>
-
+ This operators aligns strings containing numbers so that their alphabetic
+ order agrees with their numeric order.<br>
+ </blockquote>
+
+ <ul>
+ <li>The <b>intersect</b> operator now intersects the attribute
+groups of the matching subject strings set-theoretically rather than making
+their "Cartesian product". This semantics reduces the computational costs
+and makes intersection the dual of union.</li>
+
</ul>
- </td>
- </tr>
-
- </tbody>
+
+ <ul>
+ <li>The <b>property</b> operator now accepts more than one <b>isfalse</b>
+ clause to increase the complexity of the constraint condition used to filter
+ the raw query results. This feature is exploited in the queries produced
+by the <a href="implementation.html">HELM query generator</a>.</li>
+
+ </ul>
+ <br>
+ <hr width="100%" size="2">
+ <div align="center">
+ <h3>The PostgreSQL database map:</h3>
+ </div>
+The <b>PostgreSQL database map</b> is a file describing how the MathQL-1
+interpreter must interact with the underlying PostgreSQL database, when it
+is run in Postgres mode. Currently this file contains the following information:<br>
+ <ul>
+ <li>the <i>database connection string</i> to be used when the interpreter
+opens a connection with the database;</li>
+ </ul>
+ <ul>
+ <li>the <i>map</i> describing the correspondence between the metadata
+access paths used by the <i>property</i> operator and the fields of the database
+tables.</li>
+ </ul>
+The format of the file is textual and line oriented, but a corresponding
+XML syntax will be provided soon.<br>
+The first line must contain the database connection string and the subsequent
+lines contain the map with the following syntax:<br>
+ <ul>
+ <li>blank lines: ignored (used for separation);</li>
+ </ul>
+ <ul>
+ <li>lines starting with a # followed by a space: ignored (used for
+comments);<br>
+ </li>
+ </ul>
+ <ul>
+ <li><table_name> <field_name> "<-"
+[ <path_component> ]*<br>
+ </li>
+ </ul>
+ <blockquote>the information about the metadata denoted by the given
+path is found in the given field of the given table in the database. For
+example the line:<br>
+ <br>
+refobj h_occurrence <- refObj h:occurrence<br>
+ <br>
+tells that the metadata denoted by the path <b>/"refObj"/"h:occurrence"</b>
+is found in the field "h_occurrence" of the table "refobj" in the database,
+while:<br>
+ <br>
+refobj source <-<br>
+ <br>
+tells that the metadata denoted by the path <b>/</b> is found in the field
+"source" of the table "refobj" in the database;<br>
+ </blockquote>
+ <ul>
+ <li><table_name> <field_name> "<+"
+[ <path_component> ]*<br>
+ </li>
+ </ul>
+ <blockquote>same as the previous but defines a default table and field
+for the given path. This is used to force the interpreter to query a particular
+table when the information denoted by a path can be found in more than one
+table and field. For example:<br>
+ <br>
+objectname source <+<br>
+refobj source <-<br>
+refrel source <-<br>
+refsort source <-<br>
+ <br>
+tells that the metadata denoted by the path <b>/</b> is found in the "source"
+field of the "objectname", "refobj", "refrel" and "refsort" tables, and that
+the first choice is preferred;<br>
+ </blockquote>
+ <ul>
+ <li><table_name> "<-" [ <path_component> ]*</li>
+ </ul>
+ <blockquote>the given path denotes a structured metadata whose components
+are found in the fields of the given table. For example:<br>
+ <br>
+refobj <- refObj<br>
+ <br>
+tells that the path <b>/"refObj"</b> denotes a structured metadata whose
+components are found in the fields of the table "refobj"; <br>
+ </blockquote>
+ <ul>
+ <li><table_name> "<+" [ <path_component> ]*</li>
+ </ul>
+ <blockquote>same as the previous but tells that this is a default correspondence;
+ <br>
+ </blockquote>
+ <ul>
+ <li><virtual_table_name> "->" <concrete_table_name></li>
+ </ul>
+ <blockquote>defines a correspondence between a virtual table name an
+a concrete table name. All the <table_name> entries represent virtual
+table names that are mapped to concrete table names using the identity function
+unless a particular mapping is defined for them using the above construction.
+This mechanism allows to define several set of metadata on the same database
+table as in:<br>
+ <br>
+refobj source
+ <-<br>
+refobj h_occurrence <-
+ refObj h:occurrence<br>
+backpointer source
+ <- backPointer h:occurrence<br>
+backpointer h_occurrence <-<br>
+backpointer
+ -> refobj<br>
+ </blockquote>
+ <blockquote>which defines four path accessing two virtual tables ("refobj"
+and "backpointer") and then maps these tables in a single concrete table;<br>
+ </blockquote>
+ <ul>
+ <li>"->" <br>
+ </li>
+ </ul>
+ <blockquote>a line like this must end the map file. <br>
+ </blockquote>
+Here you can find the <a
+ href="http://www.cs.unibo.it/cgi-bin/cvsweb/helm/mathql_db_map.txt">current
+version of PostgreSQL database map for HELM</a>.<br>
+ <br>
+ <b>How does the interpreter use the map?</b> The map file is read during
+the interpreter initialization process from the file pointed by the MATHQL_DB_MAP
+environment variable and is used during the execution of each <i>property</i>
+operation in the issued queries.When executing a <i>property</i> operation,
+the interpreter uses the map to find the smallest set of database tables
+containing the information required by the given access paths and then queries
+these tables to obtain the wanted information. <br>
+ </td>
+ </tr>
+
+ </tbody>
</table>
- <br>
- <br>
+ <br>
</body>
</html>