Re: Test first as specification



On 3 Aug 2005 06:30:44 -0700, "Daniel Parker"
<danielaparker@xxxxxxxxxxx> wrote:

>a programming
>language is a counter example to "specification by tests" because it
>does not appear to be either realistic or desirable to specify a
>non-trivial programming language entirely through tests.

Isn't it Noether's theorem that says that every specification implies
the existence a test?

<giggle>

Anyway, how do you test that a compiler conforms to the spec? You
convert the spec into tests and apply those tests (whether manually or
automatically, but hopefully automatically). This means that there is
a mapping of tests to specs, and specs back to tests. So specs *are*
tests, and tests *are* specs.

If we wrote the specs in a formal enough language, an automatic engine
could interpret them and test a compiler.


-----
Robert C. Martin (Uncle Bob) | email: unclebob@xxxxxxxxxxxxxxxx
Object Mentor Inc. | blog: www.butunclebob.com
The Agile Transition Experts | web: www.objectmentor.com
800-338-6716


"The aim of science is not to open the door to infinite wisdom,
but to set a limit to infinite error."
-- Bertolt Brecht, Life of Galileo
.



Relevant Pages

  • Re: Cells compared to Flow-Based Programming
    ... Given that it's not even possible to proof hardware, ... With formal specs for starting ... higher-level language. ... without bothering to tell me what aspect of them is ...
    (comp.lang.lisp)
  • Re: The Promise of Forth
    ... is an end-user's language more than a programmer's language. ... fully understand either the hardware or the requirement. ... He isn't primarily a Forth programmer, he's primarily a domain expert. ... specs, and each section of the spec led to a more detailed layout of the ...
    (comp.lang.forth)
  • Re: File.lastModified *extremely* slow ?
    ... >>that it seems to violate the language and VM specs. ... to native code at class initialization time, ... > library is up for grabs for the platform implementor to handle in whatever way ...
    (comp.lang.java.programmer)
  • Re: Test first as specification
    ... >>non-trivial programming language entirely through tests. ... > a mapping of tests to specs, ... Consider a language like Algol 68 which defines types real, ... many tests are needed to specify the above? ...
    (comp.object)
  • Re: Processing IPV4 and Ethernet frames
    ... C language aside, what is it with people and absolute lack of resourcefulness? ... Look raghu, ... Of course, looking for the specs of IPV4, writing code to ...
    (comp.lang.c)