Affiliation:
1. Indian Institute of Technology, Kanpur, India
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.
Publisher
Association for Computing Machinery (ACM)
Subject
Computer Graphics and Computer-Aided Design,Software
Reference9 articles.
1. Compilers & interpreters. URL: http://www.angelfire.com/ar/CompiladoresUCSE/COMPILERS.html. Compilers & interpreters. URL: http://www.angelfire.com/ar/CompiladoresUCSE/COMPILERS.html.
2. Descriptional complexity of context-free grammar forms
3. A deterministic technique for extracting keyword based grammar rules from programs