Related articles |
---|
[2 earlier articles] |
Re: What should I prepare for a PL PhD program DrDiettrich1@netscape.net (Hans-Peter Diettrich) (2022-10-20) |
Re: What should I prepare for a PL PhD program spibou@gmail.com (Spiros Bousbouras) (2022-10-21) |
Re: What should I prepare for a PL PhD program tkoenig@netcologne.de (Thomas Koenig) (2022-10-21) |
Re: random debugging, What should I prepare for a PL PhD program gah4@u.washington.edu (gah4) (2022-10-21) |
Re: random debugging, What should I prepare for a PL PhD program tkoenig@netcologne.de (Thomas Koenig) (2022-10-22) |
Re: random debugging, What should I prepare for a PL PhD program DrDiettrich1@netscape.net (Hans-Peter Diettrich) (2022-10-23) |
Re: random debugging, What should I prepare for a PL PhD program gah4@u.washington.edu (gah4) (2022-10-23) |
Re: random debugging, What should I prepare for a PL PhD program tkoenig@netcologne.de (Thomas Koenig) (2022-10-23) |
From: | gah4 <gah4@u.washington.edu> |
Newsgroups: | comp.compilers |
Date: | Sun, 23 Oct 2022 00:00:54 -0700 (PDT) |
Organization: | Compilers Central |
References: | 22-10-029 22-10-031 22-10-035 22-10-036 22-10-039 22-10-040 22-10-042 22-10-049 |
Injection-Info: | gal.iecc.com; posting-host="news.iecc.com:2001:470:1f07:1126:0:676f:7373:6970"; logging-data="83671"; mail-complaints-to="abuse@iecc.com" |
Keywords: | debug, comment |
Posted-Date: | 23 Oct 2022 12:29:39 EDT |
In-Reply-To: | 22-10-049 |
On Saturday, October 22, 2022 at 7:51:45 PM UTC-7, Hans-Peter Diettrich wrote:
(snip)
> Isn't it good practice to maintain a test suite at least for compilers,
> that contains both selected valid and invalid code snippets?
> For error reports on obviously weird input I'd prepare an equally weird
> answer ;-)
The only one I know that actually, really, did that was TeX.
There is a test program that is supposed to execute all code
except for fatal errors.
To do that, you need some type of flow analysis to figure out which
parts of the program are, and especially are not, being executed.
The figure out what to add to the input to execute those that aren't.
I don't think I am quite as good now, but in my early programming days,
I had a tendency to try out features just to try them out, and often enough
find bugs that no-one thought about before.
The only one I can remember now is using ++ in C on a double variable.
There is no rule against using it on floating point types, but it seems that
compiler writers aren't so good at testing it.
[There are certainly code coverage tools that are supposed to let you exercise
all of the code in a program. Again, not just compilers. -John]
Return to the
comp.compilers page.
Search the
comp.compilers archives again.