Re: RM and abstract syntax trees

From: David BL <>
Date: Thu, 01 Nov 2007 05:03:17 -0700
Message-ID: <>

On Nov 1, 1:59 pm, Marshall <> wrote:

> I mentioned previously that pointers are only meaningful or
> functional within the context of a specific, typically non-portable
> address space. Without the address space, pointers might as
> well be random numbers. So if you are going to pack up some
> data and move it from, say, one machine to another, you
> have to go through all sorts of contortions to preserve some
> semblance of pointer semantics. And as anyone who's dug
> through the code for Java serialization, this is quite ugly
> and error prone. Whereas if you want to copy some
> relations from one place to another no transformations of
> any kind are necessary.

Most of the time but not always. Meaningless identifiers (such as used for identifiers of an AST) can pose problems with merging relational data between DB's even though they have compatible schema. A solution is to introduce local namespaces for surrogate id generation, and that parallels the common solution used for merging (distributed) persistent object stores, which is to qualify local address spaces so they are distinct. This leads to the technique of pointer swizzling which is a fancy name for mapping persistent OIDs to virtual memory pointers as objects are faulted into memory.

I don't find it at all surprising that we see this parallel, considering the analogy of meaningless attribute values with pointer values.

To avoid the problems with clashing identifiers/pointers when sending something like source code between computers then it seems better to send the original text rather than to parse it into an AST and then try to send the AST. This seems to be true regardless of how you represent the AST. ie RM doesn't magically solve that problem.

I hate <ugly>XML</ugly>) but it can be seen as an interchange format for nested expressions that avoids transmission of node identifiers. But wouldn't it be so much nicer to send text representations of Sexpressions,  or better still use a more efficient binary format. I rather like the idea of binary grammars.

> Which rather highlights how the
> relational form is a logical form, and not a physical form.

Interesting observation. Received on Thu Nov 01 2007 - 13:03:17 CET

Original text of this message