Re: RM and abstract syntax trees

From: Marshall <>
Date: Fri, 09 Nov 2007 20:29:07 -0000
Message-ID: <>

On Nov 9, 11:02 am, Ed Prochak <> wrote:
> On Oct 31, 5:23 am, "David Cressey" <> wrote:
> > If you need the concept of arbitrary meaningless identifier in order to make
> > a point about how RM represents trees, go ahead. Just don't call them
> > "pointers" and don't assert that they are the quivalent of pointers when
> > they are not.
> But they behave like pointers.

Sure. They have some behavior in common. One is "like" the other. It's an analogy. One doesn't get in to trouble unless one does what David was warning about, which is saying they are "equivalent."

> Most often these "arbitrary meaningless
> identifier" values are generated by a sequence. If you have one such
> value, you often can find other data simply by incrementing of
> decrementing the identifier value. You can manipulate or print the
> identifier value (IOW the pointer value is exposed unlike references
> in some languages.) If that isn't an example of some fundamental
> properties of pointers, then I'd like to hear why not.

The "fundamental properties" you are describing are fundamental properties of integers, which are what one often uses as a surrogate. Other types can be used as surrogates just as easily, however. One could even have a type whose only defined operator was equality (and a constructor) at which point none of the above arguments work anymore.

> Why isn't
> select * from objecttable where objectID=<arbitrary pointer value>;
> equivalent to dereferencing a pointer?
> printf("%objectformat", *<arbitrary pointer value> );
> Syntax may differ but the symantics feel the same to me.

Your feeling can be explained by the fact that there are similarities. However the semantics are not identical.

> Okay, you might next argue that the objectID is a virtual value and
> not a physical address. But I would argue that on modern virtual
> memory computers, a C pointer value is not the real physical address
> in memory, it is an "arbitrary pointer value" in the virtual address
> space.

Low level memory architecture is not relevant to the conversation.

> So both have a level of abstraction removed from the physical
> address. So tell me again, how are they different really???

The issue is that pointers need referencing and dereferencing operators which are not part of the relational algebra. Pointers have an associated address space. Pointers are volatile and anchored to a specific run of a specific program on a specific machine, whereas relational ids are durable. Pointers are physical and ids are logical.

You probably have a bunch of cards in you wallet, and they probably have a bunch of numbers on them. Do you think your bank account number, driver's license number, etc. are pointers or ids?

If you want to argue that the two have similarities, or that they remind you of each other, or that they have operational aspects in common, fine. No one disagrees with that. If you want to claim they are identical, that's just incorrect.

Marshall Received on Fri Nov 09 2007 - 21:29:07 CET

Original text of this message