[BLD] Action on Uniterms in XML

This expands on the case for Uniterms in XML I made in
today's telecon (ACTION-445).

-- Harold


When moving upward the hierarchy of language extensions
one should be allowed to reuse instance documents of
less expressive layers unchanged as instance documents
of more expressive layers.

E.g., when moving upward from Datalog to Horn logic,
the function-free atomic Datalog terms should be legal
as Horn logic terms, where function applications can
then be added as well.

Also, when moving upward from BLD to HLD (HiLog Dialect),
the contextually differentiated BLD uniterms should be
legal as HLD terms, where cross-contextual use is then
permitted as well.

If we don't use Uniterms with contextual differentiation
but go back to an explicit Atom/Expr differentiation,
such uniform instance-document reuse would be prevented.

In the following let's employ a simplified XML-like
presentation, where <Element>c1 ... cN</Element> is
transformed to Element(c1' ... cN'), with primes
indicating recursive transformation.

Then, for example, a BLD instance document using facts
of the form Atom(a Expr(f c d) e) could not be imported
unchanged into an HLD instance document.

However, our current BLD with facts of the neutral form
Uniterm(a Uniterm(f c d) e) could be imported unchanged
into HLD.

With uniterms, HLD also allows cross-contextual uses
such as

And ( ?x = Uniterm(f c d)
      Uniterm(a ?x e)
      ?x )

After two ?x substitutions this becomes

And ( ?x = Uniterm(f c d)
      Uniterm(a Uniterm(f c d) e)
      Uniterm(f c d) )

Since ?x = Uniterm(f c d) uses a neutral Uniterm, the
first ?x substitution can be contextually interpreted
as if it was Expr(f c d), and the second as if it was
Atom(f c d):

And ( ?x = Uniterm(f c d)
      Atom(a Expr(f c d) e)
      Atom(f c d) )

Uniterm neutrality is particularly important for an
interchange format.

Received on Wednesday, 12 March 2008 00:05:52 UTC