Re: more closed-world chatter

From: Jon Heggland <jon.heggland_at_idi.ntnu.no>
Date: Thu, 10 May 2007 18:32:32 +0200
Message-ID: <f1vhi7$c3e$1_at_orkan.itea.ntnu.no>


Marshall wrote:
> On May 9, 2:21 am, Jon Heggland <jon.heggl..._at_idi.ntnu.no> wrote:

>> D&D's point is that intersection is a special case of join,
>> as well as a special case of difference, so the rules
>> for type inference ought to produce the same result
>> in all three cases.

>
> Right; and I disagree. "Special case" does not imply
> logical equivalence, nor any particular obligation on
> the codomain of functions.

Seems a shame to lose the set intersection/complement identities, though.

> (Under the relational lattice, T WHERE FALSE and
> T JOIN TABLE_DUM are not merely equivalent,
> but are actually the same expression. The RL
> WHERE is JOIN, and the RL FALSE is TABLE_DUM.)

As in TTM's A. But what are the types of the attributes of the result? The same as in T, or the bottom type? And what if you use a more complex expression than FALSE/TABLE_DUM. The amount of type inference you will be able to do statically will be limited, won't it?

> As to A INTERSECT B and A \ (A \ B), I would again
> draw an arithmetic comparison. On the natural numbers,
> what the type of a + b? Is it natural, or integer? I would
> say natural. However, subtraction of naturals is not
> closed; the result type has to be integer. So
> a - (0-b) will have the result type integer.

Thanks; I see your point now.

> My feeling is that INTERSECT isn't worthy of
> much inspection, because it's not a generic
> relational operator and it can't do anything that
> we can't already do with generic relational
> operators. The same goes for specialized
> MINUS. Generalized MINUS, on the other
> hand, is worthy of attention.

Is generalized minus the same as semiminus?

-- 
Jon
Received on Thu May 10 2007 - 18:32:32 CEST

Original text of this message