Re: more closed-world chatter
Date: 10 May 2007 13:53:02 -0700
Message-ID: <1178830382.169821.321770_at_p77g2000hsh.googlegroups.com>
On May 10, 9:32 am, Jon Heggland <jon.heggl..._at_idi.ntnu.no> wrote:
> 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.
I guess. I'm not too attached to either operator; I think closed relational operators are more interesting than ones that aren't closed.
> > (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.
If we are joining X with DUM, then there are necessarily no attributes in common, so we would not expect to perturb the attribute types from X. If X does have some attributes in common, then the question is exactly the sub vs. super question we've been discussing.
> The amount of type inference you will
> be able to do statically will be limited, won't it?
Dunno for sure; I'm still investigating. My intuition though, is that it is possible to produce a system that has proper superset of the capabilities of a more typical type theory.
> > 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.
Cool.
> > 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?
Marshall Received on Thu May 10 2007 - 22:53:02 CEST