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.

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call

Disclaimer: All third-party content on this website/platform is and will remain the property of their respective owners and is provided on "as is" basis without any warranties, express or implied. Use of third-party content does not indicate any affiliation, sponsorship with or endorsement by them. Any references to third-party content is to identify the corresponding services and shall be considered fair use under The CopyrightLaw.