Re: RM and abstract syntax trees

From: David BL <davidbl_at_iinet.net.au>
Date: Fri, 09 Nov 2007 20:38:26 -0800
Message-ID: <1194669506.370588.158480_at_q5g2000prf.googlegroups.com>


On Nov 10, 12:33 pm, Marshall <marshall.spi..._at_gmail.com> wrote:
> On Nov 9, 4:15 pm, David BL <davi..._at_iinet.net.au> wrote:
>
>
>
>
>
> > On Nov 10, 7:29 am, "David Cressey" <cresse..._at_verizon.net> wrote:
>
> > > One of the fundamental properties of a pointer is that you can "dereference"
> > > it by using it as an address in an address space, in order to retrieve the
> > > thing pointed to directly. There is no corresponding property in
> > > sequentially generated arbitrary meaningless identifiers.
>
> > The mathematician in me axiomatizes the concept of pointer in terms of
> > its abstract properties, which (ignoring null pointers) are
>
> > 1) the existence of an associated address space, which is just a
> > set of objects
> > 2) a bijection between objects in the address space and pointer
> > values
> > In one direction this bijection is "address of" and in the
> > other
> > it is "dereference"
> > 3) the ability to compare pointer values
>
> > This encompass physical address spaces, virtual address spaces, C++
> > smart pointers, persistent OIDs and pointer swizzling etc.
>
> > It also encompass node identifiers of an AST if we regard the DB as
> > defining an address space of AST nodes, and an appropriate select
> > query represents a dereference that logically binds to precisely one
> > node of the AST.
>
> One can make an abstraction in which pointers and
> keys are the same, simply by abstracting over their
> differences. But if one does that, that doesn't mean
> that the underlying unabstracted differences cease
> to exist.

Don't you mean abstracting over similarities?

I don't want to put words in your mouth but an analogy of what you are saying is that both the following are metric spaces

    R^2 with d1(x,y) = Euclidean distance     R^3 with d2(x,y) = Manhattan distance

and yet (R^2,d1) is quite different to (R^3,d2). Of course! So what? They are still metric spaces.

Do I misunderstand you?

> > My perspective conflicts with your statement above.
>
> Your perspective is relative to your "axiomatization,"
> not to the relational model; it cannot speak to the
> attributes of the model that your axiomatization
> does not capture.

So? If X satisfies all the axioms of Y then X is a Y. It is easy to define a pointer value type and its dereference operator on an RDB representing an AST.

I think the distinction you make is merely syntactic. ie there is no simple syntax in your favourite relational language that resembles the pointer dereference.

IMO you have yet to show an example where there are dangers in thinking of node identifiers as pointer values. You have suggested it is the case, but your justification seems to have relied on the idea that a pointer value is only meaningful in its associated address space which is volatile.

If your argument were that the term "pointers" should be reserved for virtual memory addresses then I could understand you. Received on Sat Nov 10 2007 - 05:38:26 CET

Original text of this message