Goodness criteria for programming language grammar rules

  • Authors:
  • Alpana Dubey

  • Affiliations:
  • Indian Institute of Technology, Kanpur, India

  • Venue:
  • ACM SIGPLAN Notices
  • Year:
  • 2006

Quantified Score

Hi-index 0.00

Visualization

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.