Testing a context-free language compiler
Abstract
Systems and methods for testing a context-free language compiler. Given a description of a context-free grammar including a set of production rules, a test component applies the grammar description to generate one or more valid test strings of terminal symbols. A value generation component may replace one or more terminal symbols in the set of test strings with values appropriate for the class of the terminal symbol. The resulting set of test strings may be individually applied to a compiler, which returns a response based upon the applied test string that may be used to determine if the compiler is operating as expected. The set of test strings may be generated using every production rule of the given context-free grammar description. In addition to valid test strings, a set of invalid test strings may be generated by making use of a set of invalid production rules while generating test strings.
Interactive Citation Constellation Global Citation Ranking
Interactive SVG Citation Constellation renders in Rust/WebAssembly. Prior art cited: 7 · Forward citations: 3.
Claims (1 — 1 Independent, 0 Dependent)
- Claim 1Independent Claim
A method for testing operation of a context-free language compiler, the method comprising acts of: (a) generating a terminal string based, at least in part, on a grammar description comprising a set of production rules, each production rule comprising a replacement string for a non-terminal symbol, the terminal string comprising one or more instances of at least one terminal symbol; (b) generating a test string by replacing, with a value, one or more instances of a terminal symbol in the terminal string; (c) applying the test string to the compiler so that the context-free language compiler pr
Technical Overview & Description
Full multi-page specification text is archived at the issuing office. Read complete official specification ↗
Cited By — Indexed Forward Citations (3 of 3 total)
References Cited — Backward Prior Art (7)
Non-Patent Literature (4)
- Boujarwah, K. Saleh "Compiler test case generation methods: a survey and assessment", 1997, pp. 617-625.
- Hanford, "Automatic Generation of test cases", 1970, IEEE, pp. 242-257.
- Knuth, "Semantics of Context-Free Language", 1968, Springer-Verlang New York Inc., vol. 2, No. 2, pp. 127-145.
- Markus Freericks, "The nML Machine Description Formalism" 1993, 1-45 pages.