Role of Patterns in Automated Task-Driven Grammar Refactoring
Jan Kollar, Ivan Halupka
Journal of Information & Systems Management, Vol. 15, No. 3, 2025.
DOI: https://doi.org/10.6025/jism/2025/15/3/123-139
Link: https://www.dline.info/jism/fulltext/v15n3/jismv15n3_3.pdf
Abstract:
This paper examines the role of design patterns in automating task-driven grammar refactoring, with a
focus on how patterns can guide systematic transformations of grammars in software engineering. It introduces
a pattern specification schema that includes context, problem, and solution descriptions, enabling
structured modifications to grammar. The authors propose an approach that uses evolutionary algorithms
to generate random refactoring operators, which are then applied sequentially to evolve grammars toward
a desired form. This method supports semi-automatic grammar recovery and adaptation by leveraging
predefined transformation patterns. The work emphasizes the importance of preserving semantics during
transformations and demonstrates how patterns contribute to modular and maintainable grammar
refactoring processes. By integrating these patterns into automated systems, the approach enhances the
efficiency and reliability of support for semi-automatic grammar recovery and adaptation, particularly in
complex scenarios such as removing left recursion or adapting legacy grammars.