Re: RM and abstract syntax trees

From: Bob Badour <bbadour_at_pei.sympatico.ca>
Date: Tue, 30 Oct 2007 21:45:11 -0300
Message-ID: <4727d018$0$14862$9a566e8b_at_news.aliant.net>


paul c wrote:

> Bob Badour wrote:
>

>> paul c wrote:
>>
>> ...
>>
>>> 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.
>>
>> ...

>
>
> Thanks for the formalism suggestions, will try to absorb.
>
> I know you've tried to explain various flavours of this to me before,
> but an example that prompts this for me, only with two attributes, is:
>
> R2: {A integer, B typeof R2}
>
> In R2, I can see that a value for B isn't necessarily empty, but if it
> is, that must be the end of the "descent", for I don't see how an empty
> recursive relation can recurse "any further" as it were. (I think this
> would be the case even if R2 defined several "levels" of conventional
> non-recursive RVA's.)
>
> Now, I admit I'm slow (but not heavy!) but I can see only one possible
> value for R.A which is an empty relation of type R and two possible
> values for R, one where R is empty and the other where R has one tuple
> where R.A is empty. I don't see how a relation defined recursively can
> "descend" from an empty value!
>
> So far, it looks like a peculiar kind of constraint to me. As somebody
> else say, go ahead and attack it, I can take it!
{ 0, {} }
{ 1, {} }
{ 2, {} }
{ 3, { -1, { 3, {} } } }
Received on Wed Oct 31 2007 - 01:45:11 CET

Original text of this message