Spectrum-Based Fault Localization for Context-Free Grammars
We describe and evaluate the first spectrum-based fault localization method aimed at finding faulty rules in a context-free grammar. It takes as input a test suite and a modified parser for the grammar that can collect grammar spectra, i.e., the sets of rules used in attempts to parse the individual test cases, and returns as output a ranked list of suspicious rules. We show how grammar spectra can be collected for both LL and LR parsers, and how the ANTLR and CUP parser generators can be modified and used to automate the collection of the grammar spectra. We evaluate our method over grammars with seeded faults as well as real world grammars and student grammars submitted in compiler engineering courses that contain real faults. The results show that our method ranks the seeded faults within the top five rules in more than half of the cases and can pinpoint it in 10%-40% of the cases. On average, it ranks the fault at around 25% of all rules, with results of better than 15% for a very large test suite. It also allowed us to identify deviations and faults in the real world and student grammars.
Mon 21 OctDisplayed time zone: Beirut change
11:00 - 12:30 | Session 2: GrammarsSLE 2019 at Templars Chair(s): Elizabeth Scott Royal Holloway University of London | ||
11:00 30mTalk | A Feature-Based Classification of Triple Graph Grammar Variants SLE 2019 | ||
11:30 30mTalk | Spectrum-Based Fault Localization for Context-Free Grammars SLE 2019 | ||
12:00 30mTalk | Consistency Management via a Combination of Triple Graph Grammars and Linear Programming SLE 2019 Nils Weidmann Paderborn University, Anthony Anjorin Paderborn University, Erhan Leblebici Technische Universität Darmstadt, Andy Schürr Technische Universität Darmstadt |