Re: LSP



On Sat, 23 Feb 2008 07:28:06 -0500, Daniel T. wrote:

"Dmitry A. Kazakov" <mailbox@xxxxxxxxxxxxxxxxx> wrote:
On Fri, 22 Feb 2008 20:15:01 -0500, Daniel T. wrote:
S Perryman <q@xxxxx> wrote:

Completeness and decidability are the ultimate arbiters of
proof systems.

Given any two types, it is easy to discern wither one is
substitutable for the other and once a type is defined, the
properties that determine if it is substitutable for another type
are immutable, so I see no problem.

The problem is that your statement is wrong:

No, it's not.

class T
{
public :
int One (P& x) { return 1; }
};

class S
{
public :
int One (P& x) { return HALT (x); }
};

Is S substitutable for T?

First, you have to properly specify the types. All you have above is
some random code, not type specifications. Specify the types according
their Liskov contracts and it will be easy to tell.

q.e.d.

[ for whatever reason, but you were unable to prove substitutability. Or
maybe you have a method to determine which code is random? That would be
undecidable as well. ]

--
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de
.



Relevant Pages

  • Re: LSP
    ... you have to properly specify the types. ... but you were unable to prove substitutability. ... Not "for whatever reason", for the reason that you have not specified ...
    (comp.object)
  • Re: LSP
    ... you have to properly specify the types. ... but you were unable to prove substitutability. ... Not "for whatever reason", for the reason that you have not specified ...
    (comp.object)
  • Re: LSP
    ... you have to properly specify the types. ... substitutability. ...
    (comp.object)
  • Re: LSP
    ... you have to properly specify the types. ... define subtyping in terms of some formal meta language of contracts ... not in terms of substitutability. ...
    (comp.object)