Re: RM and abstract syntax trees
Date: Wed, 31 Oct 2007 14:55:28 -0000
On Oct 31, 5:53 am, David BL <davi..._at_iinet.net.au> wrote:
>From these integrity constraints we can deduce that joins used to
> traverse down through the AST give us back precisely one tuple in the
> result set.
I have to give you credit as the best educated, best argued "the RM doesn't work well here" arguer I've seen. And in fact you've picked the one example I've wanted to look at for a while now: parse trees.
But I still don't agree with you. Not yet anyway.
> I find it interesting that LISP and Prolog have far simpler integrity
> constraints. RM is trying to *emulate* pointers, and the shoe
> doesn't fit too well.
If we are using nested structures, then the structure itself provides the integrity. (I don't think "trying to emulate pointers" is accurate, at least not strictly.)
> Anyway, what matters is whether RM is suited to representing ASTs. I
> find it significant that RM forces one to generate unique but
> otherwise meaningless identifiers on all the nodes and exposes them
> for all to see, whereas LISP, Prolog and even C/C++ allow the user/
> programmer to work at a level of abstraction where node identifiers
> are hidden.
I think this is largely a distraction of no real import.
> I find it particularly telling that Prolog provides the choice of
> 1. using the approach above (which is how RM would be used); or
> 2. using nested terms, (which is outside of RM's scope)
> and the clear winner is 2.
Your conception of the RM is too narrow. There is nothing in the RM that precludes nested structures, nor union types.
Marshall Received on Wed Oct 31 2007 - 15:55:28 CET