An Automated Approach to Grammar Recovery for a Dialect of the C++ Language

In this paper we present the design and implementation of a fully automated technique for reverse engineering or recovering a grammar from existing language artifacts. The technique that we describe uses only test cases and a parse tree, and we apply the technique to a dialect of the C++ language. However, given test cases and a parse tree for a language or a dialect of a language, our technique can be used to recover a grammar for the language, including languages such as Java, C, Python or Ruby.

[1]  Andrei Alexandrescu,et al.  Modern C++ design: generic programming and design patterns applied , 2001 .

[2]  John Sharp,et al.  Microsoft Visual J# .Net (Core Reference) , 2002 .

[3]  Brian A. Malloy,et al.  Progression Toward Conformance for C++ Language Compilers , 2003 .

[4]  Cristina Marinescu,et al.  iPlasma: An Integrated Platform for Quality Assessment of Object-Oriented Design , 2005, ICSM.

[5]  Tibor Gyimóthy,et al.  Columbus : A Reverse Engineering Approach , 2005 .

[6]  Andy Oram,et al.  Managing Projects with Make , 1993 .

[7]  Ralf Lämmel,et al.  Semi‐automatic grammar recovery , 2001, Softw. Pract. Exp..

[8]  Eelco Visser,et al.  Grammar Engineering Support for Precedence Rule Recovery and Compatibility Checking , 2007, LDTA@ETAPS.

[9]  Scott Robert Ladd Active Visual J , 1997 .

[10]  Ralf Lämmel,et al.  The Grammar Deployment Kit - System Demonstration , 2002, Electron. Notes Theor. Comput. Sci..

[11]  Ralf Lämmel,et al.  Towards an engineering discipline for GRAMMARWARE Draft as of August 17 , 2003 , 2003 .

[12]  Harry M. Sneed,et al.  Restructuring of COBOL/CICS legacy systems , 2002, Sci. Comput. Program..

[13]  David Robson,et al.  Smalltalk-80: The Language and Its Implementation , 1983 .

[14]  J. Clark,et al.  RELAX NG specification , 2001 .

[15]  Alfred V. Aho,et al.  Compilers: Principles, Techniques, and Tools , 1986, Addison-Wesley series in computer science / World student series edition.

[16]  Chris Verhoef,et al.  Current parsing techniques in software renovation considered harmful , 1998, Proceedings. 6th International Workshop on Program Comprehension. IWPC'98 (Cat. No.98TB100242).

[17]  Guy L. Steele,et al.  The Java Language Specification , 1996 .

[18]  C. L. Cox,et al.  FISIM: an integrated model for simulation of industrial fibre and film processes , 2004 .

[19]  Guido Rossum,et al.  Python Library Reference , 1999 .

[20]  Harald C. Gall,et al.  TUAnalyzer - analyzing templates in C++ code , 2004, 11th Working Conference on Reverse Engineering.

[21]  Jim Law,et al.  Review of "The boost graph library: user guide and reference manual by Jeremy G. Siek, Lie-Quan Lee, and Andrew Lumsdaine." Addison-Wesley 2002. , 2003, SOEN.

[22]  Stéphane Ducasse,et al.  Object-Oriented Metrics in Practice , 2005 .

[23]  Brian A. Malloy,et al.  A metrics suite for grammar-based software , 2004, J. Softw. Maintenance Res. Pract..

[24]  Ralf Lämmel,et al.  Grammar Testing , 2001, FASE.