Path: csiph.com!weretis.net!feeder6.news.weretis.net!news.misty.com!news.iecc.com!.POSTED.news.iecc.com!nerds-end From: Thomas Koenig Newsgroups: comp.compilers Subject: Re: random debugging, What should I prepare for a PL PhD program Date: Sun, 23 Oct 2022 09:28:43 -0000 (UTC) Organization: news.netcologne.de Sender: news@iecc.com Approved: comp.compilers@iecc.com Message-ID: <22-10-054@comp.compilers> References: <22-10-029@comp.compilers> <22-10-031@comp.compilers> <22-10-035@comp.compilers> <22-10-036@comp.compilers> <22-10-039@comp.compilers> <22-10-040@comp.compilers> <22-10-042@comp.compilers> <22-10-049@comp.compilers> Injection-Info: gal.iecc.com; posting-host="news.iecc.com:2001:470:1f07:1126:0:676f:7373:6970"; logging-data="84775"; mail-complaints-to="abuse@iecc.com" Keywords: testing Posted-Date: 23 Oct 2022 12:31:15 EDT X-submission-address: compilers@iecc.com X-moderator-address: compilers-request@iecc.com X-FAQ-and-archives: http://compilers.iecc.com Xref: csiph.com comp.compilers:3224 Hans-Peter Diettrich schrieb: > On 10/22/22 10:49 AM, Thomas Koenig wrote: > >> An automated code generator which generates valid programs according >> to the syntax and semantics rules of a langauge and then systematically >> violates the rules (especially those prescribed outside the formal >> grammar) one by one might be possible. Alternatively, it might >> also be feasible to parse an existing code base and systematically >> insert violations there. > > Isn't it good practice to maintain a test suite at least for compilers, > that contains both selected valid and invalid code snippets? Very much so. For example, gcc requires two things for a patch: There needs to be a test case to make sure that the bug is fixed, or the added feature keeps on working, and the submitter needs to run the testsuite to make sure that all other tests continue to work. This is a good approach, but it has the same basic limitations of all testsuites: They are never complete, and they also contain compiler-specific code and also some errors. > For error reports on obviously weird input I'd prepare an equally weird > answer ;-) If you have seen enough strange bug reports, it might be equally challenging to come up with something new as to actually fix the bug :-)