A Task-driven Grammar Refactoring Algorithm
Ivan Halupka, Ján Kollár, Emília Pietriková · Acta Polytechnica · 2012
This paper presents our proposal and the implementation of an algorithm for automated refactoring of context-free grammars. Rather than operating under some domain-specific task, in our approach refactoring is perfomed on the basis of a refactoring task defined by its user. The algorithm and the corresponding refactoring system are called mARTINICA. mARTINICA is able to refactor grammars of arbitrary size and structural complexity. However, the computation time needed to perform a refactoring task with the desired outcome is highly dependent on the size of the grammar. Until now, we have successfully performed refactoring tasks on small and medium-size grammars of Pascal-like languages and parts of the Algol-60 programming language grammar. This paper also briefly introduces the reader to processes occurring in grammar refactoring, a method for describing desired properties that a refactored grammar should fulfill, and there is a discussion of the overall significance of grammar refactoring.
Cited by 8 works. doi:10.14311/1636 Open-access PDF
Authors
References
- Refactoring: Improving the Design of Existing Code
- Refactoring improving the design of existing code
- Toward an engineering discipline for grammarware
- Semi‐automatic grammar recovery
- Compiler Construction: Principles and Practice
- A Case Study in Grammar Engineering
- Semantics-preserving Migration of Semantic Rules During Left Recursion Removal in Attribute Grammars
- Grammar Recovery from Parse Trees and Metrics-Guided Grammar Refactoring
- A Learning Algorithm for Multimodal Grammar Inference
- Grammar inference algorithms and applications in software engineering