-DIRS = ocaml hbugs gTopLevel searchEngine mathql_test hxp
+DIRS = ocaml gTopLevel searchEngine mathql_test hxp
DIRS_BYTE = $(patsubst %,%.byte,$(DIRS))
DIRS_OPT = $(patsubst %,%.opt,$(DIRS))
interactive_user_uri_choice ~selection_mode ?ok
?enable_button_for_non_vars ~title ~msg
let interactive_interpretation_choice = interactive_interpretation_choice
- let input_or_locate_uri ~title ?id = input_or_locate_uri ~title
+ let input_or_locate_uri ~title ?id () = input_or_locate_uri ~title
end
;;
title:string -> msg:string -> id:string -> string list -> string list
val interactive_interpretation_choice :
(string * string) list list -> int list
- val input_or_locate_uri : title:string -> ?id:string -> UriManager.uri
+ val input_or_locate_uri : title:string -> ?id:string -> unit -> UriManager.uri
end
;;
[] ->
[UriManager.string_of_uri
(C.input_or_locate_uri
- ~title:("URI matching \"" ^ id ^ "\" unknown.") ~id)]
+ ~title:("URI matching \"" ^ id ^ "\" unknown.") ~id ())]
| [uri] -> [uri]
| _ ->
C.interactive_user_uri_choice
title:string -> msg:string -> id:string -> string list -> string list
val interactive_interpretation_choice :
(string * string) list list -> int list
- val input_or_locate_uri : title:string -> ?id:string -> UriManager.uri
+ val input_or_locate_uri : title:string -> ?id:string -> unit -> UriManager.uri
end
type domain_and_interpretation =
\documentclass{llncs}
\usepackage{mathql_macros}
+\newcommand\xcomment[1]{}
\title{MathQL-1 Version 4\\Reference Documentation}
\author{Ferruccio Guidi%
\begin{abstract}
\end{abstract}
-\tableofcontents
+\addtocounter{tocdepth}{2}
+
+\section*{\contentsname}{
+\catcode`@=11
+\def\l@title#1#2{}
+\def\l@author#1#2{}
+\@starttoc{toc}
+\catcode`@=12}
\input{mathql_overview}
\input{mathql_introduction}
-\section{The language}
+\section{Introduction}
This paper presents {\MathQL} version 4 which is the latest version of the
language, fully developed by the Author.
Example 7: inverse traversal of the head path:
property inverse /"date" attr /"first" in "" gives
"A" attr {/"first" = "2002-01-01"}; "B" attr {/"first" = "2002-02-01"}
+
+Example 8: some triples of an access relation:
+The triples formalizing the property "date" of the resource "A":
+("A", /"date", "");
+("A", /"date"/"first", "2002-01-01");
+("A", /"date"/"modified", "2002-03-01")
\end{verbatim} \end{footnotesize}
\vspace{-1pc}
\caption{The ``property'' operator}
\end{enumerate}
See for instance \figref{Property} (example 7).
+
+Formally \TT{property} accesses the {\RDF} graph through an \emph{access
+relation} which is a set of triples $ (r_1, p, r_2) $ where $ r_1 $ and
+$ r_2 $ are strings, and $ p $ is a path.
+Each triple is a sort of ``extended {\RDF} triple'' in the sense that $ r_1 $
+is a resource for which some metadata is provided, $ p $ is a path in the
+{\RDF} graph and $ r_2 $ is the main value of the end-node of the instance of
+$ p $ starting from $ r_1 $ (this includes the instances of sub- and
+super-arcs of $ p $ if necessary).
+See for instance \figref{Property} (example 8).
+{\MathQL} does not provide for any built-in access relation so any query
+engine can freely define the access relations that are appropriate with
+respect to the metadata it can access.
+
+It is worth remarking, as it was already stressed in \cite{Gui03,GS03}, that
+the concept of access relation corresponds to the abstract concept of property
+in the basic {\RDF} data model which draws on well established principles from
+various data representation communities.
+In this sense an {\RDF} property can be thought of either as an attribute of a
+resource (traditional attribute-value pairs model), or as a relation between
+a resource and a value (entity-relationship model).
+This observation leads us to conclude that {\MathQL} is sound and complete
+with respect to querying an abstract {\RDF} metadata model.
+Finally note that access relations are close to {\RDF} entity-relationship
+model, but they do not work if we allow paths with an arbitrary number of
+loops ({\ie} with an arbitrary length) because this would lead to creating
+infinite sets of triples.
+If we want to handle this case, we need to turn these relations into
+multivalued functions.
-\section{Textual syntax} \label{Textual}
+\subsection{Textual syntax} \label{Textual}
In this section we present {\MathQL}.4 textual syntax using the same notation
that we adopted in \cite{GS03,Gui03}. In particular the grammatical
\newcommand\T{\TT{T}}
\newcommand\GP[1]{\TT{<#1>}}
+
+\newcommand\Set{\textsf{Set}}
+\newcommand\Prop{\textsf{Prop}}
+\newcommand\MainConclusion{\textsf{MainConclusion}}
+\newcommand\MainHypothesis{\textsf{MainHypothesis}}
+\newcommand\occurrence{\textsf{occurrence}}
+\newcommand\refObj{\textsf{refObj}}
-\section {Operational semantics} \label {Operational}
+\section {Operational Semantics} \label {Operational}
This section describes {\MathQL} semantics, that we present in a natural
operational style \cite{Lan98,Win93}.
Here $ \Property\ h $ gives the appropriate access relation according to
the $ h $ flag (this is the primitive function that inspects the {\RDF}
-graph, see \subsecref{HighAccess}).
-
+graph).
+
$ \Src\ k\ P\ V $ is a helper function giving the source set
according to the $ k $ flag. $ \Src $ is based on $ \Match $, the helper
function handling {\POSIX} regular expressions.
\GP{query} $ is the primitive function performing the low level invocation.
The core language does not include any external function of this kind and it
is a mistake to invoke an undefined function.
-The construction ``\TT{gen} p \TT{in} x'' rewrites to ``\TT{gen} p \{x\}''.
+The construction ``\TT{gen} p \TT{in} x'' rewrites to ``\TT{gen} p \verb+{+x\verb+}+''.
\end{itemize}
in let $trans = select @uri from $trans1 where ex (not @uri./"extra" and
(@uri./"premises" sub {@uri./"rel", @uri./"set"})) in keep $trans
\end{verbatim} \end{footnotesize} %$
+
+\input{mathql_tests_transitive}
match uris with
| [] ->
[UriManager.string_of_uri (C.input_or_locate_uri
- ~title:("URI matching \"" ^ id ^ "\" unknown.") ~id)]
+ ~title:("URI matching \"" ^ id ^ "\" unknown.") ~id ())]
| [uri] -> [uri]
| _ ->
C.interactive_user_uri_choice ~selection_mode:`MULTIPLE
title:string -> msg:string -> id:string -> string list -> string list
val interactive_interpretation_choice :
(string * string) list list -> int list
- val input_or_locate_uri : title:string -> ?id:string -> UriManager.uri
+ val input_or_locate_uri : title:string -> ?id:string -> unit -> UriManager.uri
end
let string_of_domain_item = function
(** @param title gtk window title for user prompting
* @param id unbound identifier which originated this callback invocation *)
- val input_or_locate_uri : title:string -> ?id:string -> UriManager.uri
+ val input_or_locate_uri : title:string -> ?id:string -> unit -> UriManager.uri
end
val string_of_domain_item: domain_item -> string
let prefixes = NewConstraints.prefixes just_factor t in
(match prefixes with
Some main, all_concl ->
+(*
NewConstraints.pp_prefixes all_concl;
- (* in some cases, max_prefix_length could be less than n *)
+*)
+ (* in some cases, max_prefix_length could be less than n *)
let max_prefix_length =
match all_concl with
[] -> assert false
interactive_interpretation_choice_TPL;
raise Chat_unfinished
- let input_or_locate_uri ~title =
- UriManager.uri_of_string "cic:/Coq/Init/DataTypes/nat_ind.con"
+ let input_or_locate_uri ~title ?id () =
+ assert false
end
in