The Artima Developer Community
Sponsored Link

Weblogs Forum
Programming with "Duh" Typing

370 replies on 371 pages. Most recent reply: Aug 8, 2007 9:54 AM by James Watson

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 370 replies on 371 pages [ « | 1 ... 357 358 359 360 361 362 363 364 365 ... 371  | » ]
Isaac Gouy

Posts: 527
Nickname: igouy
Registered: Jul, 2003

Re: word games Posted: Aug 3, 2007 10:31 AM
Reply to this message Reply
Advertisement
James Watson wrote
> I you define correctness as passing all tests, creating a
> new test that exposed an existing issue (with regard to
> specifications) would make the code incorrect.

And why would we create a new test?


> > How are implementations normally checked against
> > specs? ...
>
> Testing.

So normally tests represent the specification?


> How is this incompatible with what I am arguing?

The only way we can validate a program 'meets all requirements' is to ask someone "is this what you wanted?".

We can verify that a program is 'correct' by demonstrating that it satisfies the spec.


> > When we use tests to check the program conforms to
> > spec, and the program passes all tests, and we're using
> > an ordinary definition of program correctness, then the
> > program is obviously 'correct'.
>
> If all tests pass, it doesn't mean that the spec is
> completely satisfied unless the spec is defined by the
> tests.

It isn't true unless it's true! What a tortuous way to avoiding saying - if the spec is defined by tests and all the tests pass then the spec is completely satisfied.


> In practical terms, it's possible to test a program and
> have a good confidence in it's correctness. But you can
> never prove a program to be correct in the terms that
> Achilleas Margaritis describes as "proving correctness
> means to mathematically prove that a piece of software
> does what it should do." And this the commonly understood
> defintion between myself and Achilleas when you decided to
> start an argument about what correct means.

You can never mathematically prove a program to be correct when your idea of 'correct' is 'meets all requirements' - it's a category error - 'meets all requirements' is outside the formal domain of mathematics.

Flat View: This topic has 370 replies on 371 pages [ « | 357  358  359  360  361  362  363  364  365 | » ]
Topic: Programming with "Duh" Typing Previous Topic   Next Topic Topic: Python 3000 Plea for Help

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use