Mailing List Archive

Support open source code!


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

Re: Python discussion, anybody?



On Fri, 27 Oct 2000, Stephen J. Turnbull wrote:

> I see; you're talking about program verification; this is undecidable,
> to start with.  Shall I go on to mention the human factors
> difficulties?  :-)

  Uhhh.. No. I specifically dealt with the undecidability in a footnote. I
would not be checking to see what methods can possibly be called in a
mathematically rigerous fashion, including arguments about what the
program does when run, which, yes, is undecidable. I'd be assuming at
every program branch that either path _can_ happen. Even normal variable
liveness done by optimizing compilers does this--and the objections of
"that's not decidable!" are common, but are quite wrong. That is to say,
this method may claim that certain method calls can be made on an object,
when in reality the object (or even the program itself) can never get to
that line of code (e.g., because it'll go into an infinite loop before
that).

> Um, CORBA?  Oops.  You now have to worry about the whole World Wide
> Web.  I hope your net connection is up!

  No. Think about it again. Your interface to Corba must at some point
reference the methods in your object, or they could not be used. So
indeed, any object making itself available to a Corba engine would need to
define its entire interface.
  The advantage is that any object defining 'long getHashKey()' could be
used (e.g.) in some particular hash-table container, and you wouldn't have
to define any interface--because the HashTable class references
getHashKey, passing anything that doesn't have such a method would cause
an error. Furthermore, as soon as I add a call "convertToFoobar()" on
something I pull out of this HashTable, the tool would insist that
everything I COULD put on that same object implement this method. Get it?

> What you're talking about is far more powerful
> than strong typing could be.

  Unless I'm mistaken it's identical to strong typing, except the compiler
would generate all your interfaces for you, excluding the parts you
designed but happen not to reference in your particular program.

  cheers,
-- Todd


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links