[Mulgara-dev] No such variable

Paul Gearon gearon at ieee.org
Fri May 2 20:57:40 UTC 2008


Hi David,

On Fri, May 2, 2008 at 1:50 PM, David Moll <DMoll at myaperio.com> wrote:
> I have several questions - I'm not certain how helpful they are to the
>  discussion at hand as they are more for my own elucidation.
>
>
>  >Actually we only agonized over disjunctions until Simon managed to
>  >identify the isomorphism with FoL.
>
>  What is FoL, and what is the isomorphism?  Am I correct in assuming it
>  is an isomorphism between the abelian semiring that describes TQL and
>  FoL?

FoL = First Order Logic.

Basically, Andrae is stating that everything found in FoL has an
equivalent in TQL, and vice versa. This is important, as it means that
we can use algebraic properties from FoL and apply them to TQL. This
lets us apply distributive properties to operations like conjunction
and disjunction. This in turn lets us manage a number of complex
expressions, such as evaluating a query against a complex graph
expression.

>  >2. UNBOUND is not a value; which immediately solved the type-
>  >theoretic problems that NUC-Disjunction poses.
>
>  What is the definition of a non-union compatible disjunction?  I am
>  unable to find a definition for this, and I'm failing to come up with
>  one through a combination of the terms.

This is where tuples don't share exactly the same variables. As an
example, if we have one Tuples with variables $a, $b, $c, and values:
$a  $b  $c
a1  b1  c1
a2  b2  c2

and another tuples has the variables $a, $b, $d with bindings of:
$a  $b  $d
a1  b1  d1
a2  b2  d2

Then these are non-union compatible because their variables differ.
The result is:
$a  $b  $c  $d
a1  b1  c1  --
a2  b2  c2  --
a1  b1  --  d1
a2  b2  --  d2

Note the missing values in $c and $d? If you iterate over a Mulgara
Answer then you'll get "null" in those columns.

>  (Andrae)
>
> >We already draw a distinction between Answers and Tuples.  Tuples are
>  >objects within an algebra.  Answers are globalized Tuples, but are
>  >primarily an API concern.  Allowing Answers to have DONT_CARE columns
>  >is alright, introducing them into Tuples though will cause problems.
>  <snip>
>
>  So, the projection operation is not in the algebra.  If a projection is
>  performed between two Tuples sets, is the resulting set an Answer?  I am
>  wondering what specifically is meant by an Answer being a "globalized"
>  Tuple.

Tuples contain an internal representation of the data, which in our
case means "long" values we call "graph nodes". These are then
"globalized" into URIs, literals, and blank nodes. We are also
globalizing an unbound variable into a null. Note that this is not
necessarily a good thing, but it's consistent with other approaches.

>  Also, is the algebra of the semiring for TQL defined somewhere, or is it
>  implicit in the TQL grammar definition file?

It *was* defined somewhere, but this was before trans and walk were
defined. "Trans" should work in the algebra, but I'm skeptical about
"walk".

As for where this "somewhere" is, after spending a week back in 2001
working it out with Simon, it was submitted as a patent application.
This was done to add "value" for the company, not because we thought
it was worth the application. To my knowledge, it's still pending.
(Ideally, the patent system will collapse before it ever gets looked
at).  :-)

Paul



More information about the Mulgara-dev mailing list