Inferring grammar rules of programming language dialects

  • Authors:
  • Alpana Dubey;Pankaj Jalote;Sanjeev Kumar Aggarwal

  • Affiliations:
  • Dept of Computer Science and Engineering, Indian Institute of Technology, Kanpur, India;Dept of Computer Science and Engineering, Indian Institute of Technology, Kanpur, India;Dept of Computer Science and Engineering, Indian Institute of Technology, Kanpur, India

  • Venue:
  • ICGI'06 Proceedings of the 8th international conference on Grammatical Inference: algorithms and applications
  • Year:
  • 2006

Quantified Score

Hi-index 0.00

Visualization

Abstract

In 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 languages are not available and have to be inferred from the source code; especially in the case of programming language dialects. We propose an approach for inferring the grammar of a programming language when an incomplete grammar along with a set of correct programs is given as input. The approach infers a set of grammar rules such that the addition of these rules makes the initial grammar complete. A grammar is complete if it parses all the input programs successfully. We also proposes a rule evaluation order, i.e. an order in which the rules are evaluated for correctness. A set of rules are correct if their addition makes the grammar complete. Experiments show that the proposed rule evaluation order improves the process of grammar inference.