Re: RM and abstract syntax trees

From: paul c <toledobythesea_at_ooyah.ac>
Date: Tue, 30 Oct 2007 18:59:29 GMT
Message-ID: <laLVi.160835$1y4.93435_at_pd7urf2no>


Bob Badour wrote:
> paul c wrote:
>

>> paul c wrote:
>> ...
>>
>>> (ps: I don't agree that RM can't represent nested lists but I would 
>>> agree that it's not much fun to manipulate them, I wish Codd had said 
>>> more about nested relations as I have a feeling he spent some time 
>>> considering them.)
>>
>>
>> Here's my favourite nested relation, although I admit it's probably 
>> useless in practice.  It's a recursive one.  Sorry I don't have much 
>> mastery of conventional syntax, what I mean here is something like R: 
>> <attribute list> where <attribute list> is a set of attribute name, 
>> attribute type pairs and typeof is swiped from C-language:
>>
>> R: (A typeof R)
>>
>> I don't know how to display a value for R but I guess it could have 
>> either no tuples or one tuple.

>
> It could have any number of tuples. See formalism under "philosophy of
> mathematics".
>
> Example values are:
> zero tuples:
> {}
>
> one tuple:
> {{}}
> {{{}}}
> {{{{}}}}
> {{{},{{}}}}
> ...
>
> two tuples:
> {{},{{}}}
> {{{}},{{{}}}}
> {{},{{{}}}}
> ...
>
> three tuples:
> {{},{{}},{{},{{}}}}
> {{},{{}},{{{}}}}
> ...
>
> four tuples:
> {{},{{}},{{},{{}}},{{},{{}},{{},{{}}}}}
> etc.
>
>
>> Also guessing that R <OR> (<NOT> R) has one tuple and R <AND> (<NOT> 
>> R) has no tuples (where <OR>, <AND>, <NOT> come from D&D syntax).

>
> I suspect you guess incorrectly for at least one of them.

I was thinking that the recursion (within an "outer" tuple, if you will) must end with a tuple that is an empty relation, what I think you are writing as "{}". If what I suggested is possible, I must have left something out! Received on Tue Oct 30 2007 - 19:59:29 CET

Original text of this message