BXAgent: LLM-Driven Code Generation for Bidirectional and Incremental EMF Model Transformations
Published in Joint Proceedings of the STAF 2026 Workshops: AgileMDE, GCM, ICMM, LLM4SE, TTC, 2026
Download: Paper
Abstract
Bidirectional model transformations (BX) are notoriously difficult to implement correctly. Developers must ensure that forward and backward directions remain consistent, that incremental changes are propagated without overwriting unrelated model elements, and that concurrent modifications on both sides can be reconciled. In this paper, we present BXAgent, an LLM-driven code generator that automatically produces fully functional Java classes for bidirectional, incremental, and synchronizing EMF model transformations from two Ecore metamodels and a natural-language mapping description. BXAgent employs a five-stage pipeline comprising metamodel parsing, LLM-based mapping extraction, bidirectionality checking, template-driven code generation, and an optional LLM-based compilation repair loop. The generated transformation code supports batch execution, incremental change propagation in both directions, and a novel fingerprint-based synchronization algorithm that handles concurrent modifications, conflict resolution, and fuzzy matching of independently created objects. We evaluate BXAgent on the well-known Families-to-Persons benchmark and a simpler database synchronization scenario, demonstrating that the approach produces correct transformations covering complex cases such as role changes and bidirectional synchronization.
