Metalevel transformation of strategies
Rubén Rubio, Narciso Martí-Oliet, Isabel Pita, Alberto Verdejo
TL;DR
The paper tackles the challenge of metaprogramming strategies within Maude by showing how reflective manipulation and generation of strategies can be achieved inside the framework. It introduces a general transformation workflow to (i) derive μ-normalization-based context-sensitive strategies from module annotations, (ii) extend the strategy language with congruence operators and generic traversals while translating extensions to the core subset, and (iii) support multistrategies for coordinating multiple agents or components under concurrent or turn-based global control. Three concrete demonstrations illustrate these ideas: generating a normalization strategy from a given module, extending the language with new combinators, and implementing multistrategy control for distributed systems and games like tic-tac-toe, with model-checking integration via umaudemc. The approach preserves object-level interfaces and leverages Maude's efficient strategy engine, offering a general blueprint for reflective strategy construction applicable to other rewriting-based tools and encouraging broader adoption of strategy-driven metaprogramming.
Abstract
In the reflective Maude specification language, based on rewriting logic, a strategy language has been introduced to control rule rewriting while avoiding complex and verbose metalevel programs. However, just as multiple levels of reflection are required for some metaprogramming tasks, reflective manipulation and generation of strategies are convenient in multiple situations. Some examples of reflective strategy transformations are presented, which implement special forms of evaluation or extend the strategy language while preserving its advantages.
