Abstract
The grammar of a programming language is important as it is used in developing software engineering tools. Sometimes grammars of programming languages are not readily available or they are incomplete; hence they are inferred from a set of valid programs. An exact grammar can not be learned from a set of positive samples (set of valid programs) alone as there exists many grammars which accept the given input programs; we call these grammars complete grammars. Therefore, given an incomplete grammar, there exists many sets of grammar rules which can make it complete. Due to many possible sets of grammar rules, the grammar inference process faces the problem of selecting a good set of grammar rules. We address the problem of grammar rule selection when they are inferred using an automatic are traditionally used for assessing the complexity of grammar based software. The experiments show that the grammar based metrics are not sufficient for this purpose as there exist several rules which have the same metric value. Hence we propose two rule selection criteria. Experiments are done to assess different criteria. Experiments show that proposed criteria, when coupled with grammar metrics, select reasonably good grammar rules.
- Compilers & interpreters. URL: http://www.angelfire.com/ar/CompiladoresUCSE/COMPILERS.html.Google Scholar
- Alfred V. Aho, Ravi Sethi, and Jeffrey D. Ullman. Compilers Principles, Techniques, and Tools. Pearson Education (Singapore) Pte. Ltd., 2002. Google Scholar
Digital Library
- Alfred V. Aho and Jeffrey D. Ullman. The Theory of Parsing, Translation, and Compiling. Prentice Hall Professional Technical Reference, 1972. Google Scholar
Digital Library
- Erzsébet Csuhaj-Varjú and Alica Kelemenová. Descriptional complexity of context-free grammar forms. Theor. Comput. Sci., 112(2):277--289, 1993. Google Scholar
Digital Library
- Alpana Dubey, Pankaj Jalote, and Sanjeev K. Aggarwal. A deterministic technique for extracting keyword based grammar rules from programs. In Proceedings of 21st Annual ACM Symposium on Applied Computing, PL track, pages 1631--1632, Dijon, France, April 2006. ACM SIGAPP. Google Scholar
Digital Library
- James F. Power and Brian A. Malloy. A metrics suite for grammar-based software. Special Issue: Analyzing the Evolution of Large-Scale Software, Journal of Software Maintenance and Evolution: Research and Practice, 16:405--426, 2004. Google Scholar
Digital Library
- R. Lämmel and C. Verhoef. Cracking the 500-Language Problem. IEEE Software, pages 78--88, November/December 2001. Google Scholar
Digital Library
- R. Lämmel and C. Verhoef. Semi-automatic Grammar Recovery. Software---Practice & Experience, 31(15):1395--1438, December 2001. Google Scholar
Digital Library
- Kaizhong Zhang and Dennis Shasha. Simple fast algorithms for the editing distance between trees and related problems. SIAM J. Comput., 18(6):1245--1262, 1989. Google Scholar
Digital Library
Recommendations
Grammar Recovery from Parse Trees and Metrics-Guided Grammar Refactoring
Many software development tools that assist with tasks such as testing and maintenance are specific to a particular development language and require a parser for that language. Because a grammar is required to develop a parser, construction of these ...
A deterministic technique for extracting keyword based grammar rules from programs
SAC '06: Proceedings of the 2006 ACM symposium on Applied computingThis paper presents a technique for extracting grammar rules, given a set of programs and an approximate grammar. Grammar is an important artifact used in the generation of tools for program analysis, modification, etc. Current grammar extraction ...
Inferring grammar rules of programming language dialects
ICGI'06: Proceedings of the 8th international conference on Grammatical Inference: algorithms and applicationsIn this paper we address the problem of grammatical inference in the programming language domain. The grammar of a programming language is an important asset because it is used in developing many software engineering tools. Sometimes, grammars of ...






Comments