Search papers, labs, and topics across Lattice.
MergirafSemi is a language-agnostic semistructured merge tool designed to improve merge conflict resolution by utilizing lightweight Concrete Syntax Trees for structural guidance without the overhead of full structural modeling. The tool strikes a balance between reducing spurious conflicts and maintaining competitive accuracy and runtime performance across various programming languages. Empirical evaluations demonstrate that MergirafSemi outperforms unstructured tools in reducing false conflicts and matches the effectiveness of semistructured language-specific tools while offering lower runtime costs.
MergirafSemi cuts spurious merge conflicts significantly while maintaining high accuracy and low computational overhead across multiple programming languages.
Developers frequently face merge conflicts when integrating concurrent changes. Most merge tools rely on unstructured, line-based comparisons, often producing spurious conflicts and missing actual conflicts. To address these limitations, structure-aware merge tools have been proposed, which leverage syntactic representations to improve merge accuracy. However, fully structured tools may incur higher computational cost, and language-specific tools require significant development and maintenance effort. To balance these trade-offs, we propose MergirafSemi, a language-agnostic semistructured merge tool that captures structural information without requiring full structural modeling or language-specific implementations, and applies line-based merging within specific program regions, such as method bodies in Java. Our tool leverages lightweight Concrete Syntax Trees to guide merging decisions while preserving flexibility and efficiency across languages. We evaluate our tool through an empirical study on real-world merge scenarios across multiple programming languages, comparing it with unstructured, semistructured, and structured tools. Our results show that increasing structural granularity improves automatic conflict resolution but can also lead to more aggressive merge decisions, increasing the number of missed actual conflicts. In contrast, MergirafSemi achieves a more balanced trade-off, reducing spurious conflicts while maintaining competitive accuracy and better runtime performance in most common scenarios. Compared to an unstructured tool, it substantially reduces spurious conflicts, and when compared to a semistructured language-specific tool, it achieves comparable effectiveness while exhibiting more robust execution behavior and significantly lower runtime overhead.