@brazovayeye

Inferring Context-Free Grammars for Domain-Specific Languages

, , , , and . Electronic Notes in Theoretical Computer Science, 141 (4): 99--116 (12 December 2005)Proceedings of the Fifth Workshop on Language Descriptions, Tools, and Applications (LDTA 2005).
DOI: doi:10.1016/j.entcs.2005.02.055

Abstract

In the area of programming languages, context-free grammars (CFGs) are of special importance since almost all programming languages employ CFG's in their design. Recent approaches to CFG induction are not able to infer context-free grammars for general-purpose programming languages. In this paper it is shown that syntax of a small domain-specific language can be inferred from positive and negative programs provided by domain experts. In our work we are using the genetic programming approach in grammatical inference. Grammar-specific heuristic operators and nonrandom construction of the initial population are proposed to achieve this task. Suitability of the approach is shown by examples where underlying context-free grammars are successfully inferred.

Links and resources

Tags