[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Partial OSA
Don,
You wrote:
> Could you please briefly explain why
>
> > the only way to have Nat as a subsort of Int is to specify naturals
> > and integers in the same module (similarly for rationals Rat, etc.)
>
> I don't see this, myself. (I'm not sure that I know what you mean by
> "module", but I assume that it is synonymous with "specification".)
> What's wrong with
>
> INT = ... specification of Int ...
>
> NAT = enrich INT by ... specification of Nat as subsort of Int ...
Ah, I hadn't imagined anyone wanting to do it that way round; thanks.
So I'd overstated my claim. It should now be more like:
The only ways that I can see to have Nat as a subsort of Int are
(i) to specify naturals and integers in the same specification body,
or (ii - thanks, Don) to first specify integers and then extend with
the specification of naturals as a subsort. If one ever wants
integers to be a subsort of rationals, however, one has to start with
Rat as the primary sort instead. Moreover, (ii) wouldn't cater for
using naturals without integers around - although one could provide
an alternative version of NAT as well, I suppose.
> If your assertion is indeed false, then I don't see the problem with
> the present CL treatment of subsorts. I like it because it's so
> simple. And as you said on Wed, 19 Jun 1996:
>
> > I can't hide
> > a personal preference for simplicity!
I still can't - and I was quite happy with the present CL treatment,
until I noticed the extension problem. I still think it is a problem,
despite your suggestion.
Cheers
Peter