Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.c > #18918

Re: Method to test a program against different C implementations

From Eric Sosman <esosman@ieee-dot-org.invalid>
Newsgroups comp.lang.c
Subject Re: Method to test a program against different C implementations
Date 2012-03-20 22:38 -0400
Organization A noiseless patient Spider
Message-ID <jkbf01$52h$1@dont-email.me> (permalink)
References <jji27a$d4e$1@nnrp.ngi.it> <slrnjm4q3t.1ls.grahn+nntp@frailea.sa.invalid> <jju1kn$q8t$1@dont-email.me> <slrnjmi0h7.1ls.grahn+nntp@frailea.sa.invalid>

Show all headers | View raw


On 3/20/2012 6:18 PM, Jorgen Grahn wrote:
> On Fri, 2012-03-16, Eric Sosman wrote:
>> On 3/15/2012 6:09 PM, Jorgen Grahn wrote:
>>> On Sun, 2012-03-11, pozz wrote:
>>>> [...]
>>>> I'm asking if there's a way to test a small C source (a function or a
>>>> small set of functions) against all possible C implementations.  Of
>>>> course I'm thinking of an automatic test, because the number of C
>>>> implementations is high.
>>>>   [...]
>>> Most/all of the responses have been surprisingly negative, so here's
>>> one in favor.
>>>
>>> Yes please, I'd like to have something like what you describe. I see
>>> practical problems, and I don't think I'll ever see such a system, but
>>> it's not a stupid idea.
>>
>>       It's not stupid, just frighteningly expensive.  Expensive, as in
>> "If you have to ask, you can't afford it."  Expensive, as in "All the
>> money in the world wouldn't buy it."  Expensive, as in "If every
>> proton in the Universe were a tester who'd been working since the
>> Big Bang was in beta ..."
>>
>>       So we search for admittedly inferior but attainable alternatives.
>
> Perhaps I should mention that I looked past his unfortunate choice of
> words ("all possible C implementations..."). The idea was too
> interesting to be shot down that easily.

     Even though "all possible" is easily and trivially shot down,
I believe that even "all of interest" is also expensive beyond
practicality.  It is certainly expensive beyond usefulness, that is,
more expensive than alternative approaches for assessing portability.

     And, once all the tests on all the platforms using all the
compilers with all their combinations of option flags have run and
passed, you're still left with Dijkstra's observation.  Pozz' idea
is interesting in a sort of mathematical existence-proof way, but I
don't believe it leads to a practical outcome.

-- 
Eric Sosman
esosman@ieee-dot-org.invalid

Back to comp.lang.c | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Method to test a program against different C implementations pozz <pozzugno@gmail.com> - 2012-03-11 12:27 +0100
  Re: Method to test a program against different C implementations "Joachim Schmitz" <nospam.jojo@schmitz-digital.de> - 2012-03-11 13:48 +0100
    Re: Method to test a program against different C implementations pete <pfiland@mindspring.com> - 2012-03-11 09:03 -0500
      Re: Method to test a program against different C implementations James Kuyper <jameskuyper@verizon.net> - 2012-03-11 10:43 -0400
  Re: Method to test a program against different C implementations Eric Sosman <esosman@ieee-dot-org.invalid> - 2012-03-11 09:08 -0400
    Re: Method to test a program against different C implementations pozz <pozzugno@gmail.com> - 2012-03-11 22:12 +0100
      Re: Method to test a program against different C implementations Eric Sosman <esosman@ieee-dot-org.invalid> - 2012-03-11 17:44 -0400
  Re: Method to test a program against different C implementations Don Y <this@isnotme.com> - 2012-03-11 09:39 -0700
  Re: Method to test a program against different C implementations Jorgen Grahn <grahn+nntp@snipabacken.se> - 2012-03-15 22:09 +0000
    Re: Method to test a program against different C implementations James Kuyper <jameskuyper@verizon.net> - 2012-03-15 18:32 -0400
      Re: Method to test a program against different C implementations pozz <pozzugno@gmail.com> - 2012-03-17 16:26 +0100
        Re: Method to test a program against different C implementations James Kuyper <jameskuyper@verizon.net> - 2012-03-17 11:52 -0400
    Re: Method to test a program against different C implementations Eric Sosman <esosman@ieee-dot-org.invalid> - 2012-03-15 20:31 -0400
      Re: Method to test a program against different C implementations Jorgen Grahn <grahn+nntp@snipabacken.se> - 2012-03-20 22:18 +0000
        Re: Method to test a program against different C implementations Eric Sosman <esosman@ieee-dot-org.invalid> - 2012-03-20 22:38 -0400
          Re: Method to test a program against different C implementations Jorgen Grahn <grahn+nntp@snipabacken.se> - 2012-03-22 21:48 +0000
            Re: Method to test a program against different C implementations James Kuyper <jameskuyper@verizon.net> - 2012-03-22 18:39 -0400
            Re: Method to test a program against different C implementations Eric Sosman <esosman@ieee-dot-org.invalid> - 2012-03-22 21:07 -0400
  Re: Method to test a program against different C implementations Robert Miles <robertmilesxyz@gmail.com> - 2012-03-15 17:41 -0700

csiph-web