Loading...
Thumbnail Image
Publication

Dynamically attributed grammatical evolution: function-based attribute grammars for flexible and context-aware mapping

Citations
Google Scholar:
Altmetric:
Date
2026-06-10
Abstract
Grammatical Evolution (GE) has demonstrated broad success across various domains, from automated circuit synthesis to explainable machine learning. Traditional GE systems, which rely on Context-Free Grammars (CFGs) for genotype-to-phenotype mapping, ensure syntactic correctness but inherently lack mechanisms to enforce semantic constraints. While Attribute Grammars (AGs) were introduced to GE to address this by embedding semantic checks into grammar productions, their rigid structure and computational overhead restrict adaptability to dynamic, context-sensitive requirements. This paper introduces Dynamically Attributed Grammatical Evolution (DAGE), a framework that augments CFGs by allowing the use of functions as non-terminals within the grammar. This enables direct function invocation during genotype-to-phenotype mapping, making semantic checks more straightforward and facilitating runtime-aware behaviour that traditional AGs struggle to capture. By embedding functions directly into the grammar, DAGE can perform on-the-fly constraint checking, adapt to runtime conditions, and interact with external systems as needed. This leads to more expressive representations tailored to complex requirements. Furthermore, offloading complexity into reusable functions simplifies grammar design and maintenance. DAGE is implemented in Python, leveraging the GRAPE and DEAP frameworks. Empirical evaluations on symbolic regression, multiple knapsack, artificial ant, and program synthesis benchmarks show that DAGE adapts well to domains requiring semantic or context-sensitive checking. The results show consistent benefits on constraint-heavy construction tasks. As expected, this comes with a trade-off between improved semantic control and additional mapping overhead.
Supervisor
Description
Publisher
Springer Nature
Citation
Genetic Programming and Evolvable Machines 27, 13
Funding code
Funding Information
Sustainable Development Goals
External Link
License
Attribution-NonCommercial-ShareAlike 4.0 International
Embedded videos