Re: Proposal: 6NF

From: Jan Hidders <hidders_at_gmail.com>
Date: 19 Oct 2006 01:43:35 -0700
Message-ID: <1161247415.871216.20900_at_k70g2000cwa.googlegroups.com>


vc wrote:
> Jan Hidders wrote:
> > vc wrote:
> > > Jan Hidders wrote:
> > Demonstrating that there is a problem should be simple. You could give
> > a well-typed expression that has a certain result, and if you replace
> > certain constants of type t1 in that expression with the corresponding
> > constants in a subtype t2 then the result of the expression changes.
> > Can you give me such an expression?
>
> A, B and C are real;
> D, E are integer;
>
> C = A / B -- is OK
> C = D / E -- the LSP requires that should be OK too but it is not
> because D / E is undefined.

No, it is defined. D and E are in the domain of integers, and therefore also in the domain of reals, so the result is the real D/E with / the operator (in both expressions) as defined by the reals. So if A is the integer counterpart of the real D (i.e. A=D) and B the integer counterpart of the real E (i.e. B=E), then this is the same as A/B. So LSP holds.

  • Jan Hidders
Received on Thu Oct 19 2006 - 10:43:35 CEST

Original text of this message