• Re: random debugging, What should I prepare for a PL PhD program

    From Thomas Koenig@tkoenig@netcologne.de to comp.compilers on Sun Oct 23 09:28:43 2022
    From Newsgroup: comp.compilers

    Hans-Peter Diettrich <DrDiettrich1@netscape.net> 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 :-)
    --- Synchronet 3.21b-Linux NewsLink 1.2