[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[CoFI] Re: question



Dear all,

concerning Michel's proposal:

>My proposal would be to simplify CASL w.r.t. this issue, and just decide
>that compound id do not interact w.r.t. subsorting relations (again,
>***but*** for the special case of fitting morphism). Thus:
>a) Nat < Int will not entail List[Nat] < List[Num], but the latter can
>of
>course be explicitly specified by the user.
>b) If in one generic spec we have Elem < List[Elem], and fit Elem to
>Nat,
>then we have in the resulting spec Nat < List[Nat].
>
>I believe the above suggested modification is easily implementable both
>in
>the summary and in the semantics.

>From a design point of view, I agree with Michel and do not think
that Bernd's proposal 

>As to you question: I think a better modelling would be to have a
>supertype "Interval" or "Bounds" or so, of which "FromOneToTen" and
>"FromOneToTwenty" would be subsorts, e.g. specified using a subsort
>definition constraining the bounds. 

solves the problem, because you still have that
ARRAY(FromOneToTen, Nat) is a subsort of ARRAY(Interval, Nat).

Coming to semantics:
I am writing the semantics of compound ids. Indeed, from the semantics
point of view, it is even easier to implement Michel's proposal
than that what we have so far. (But saving work is not my main argument
:-).

Greetings,
Till