Latra: A Template-Based Language-Agnostic Transformation Framework for Effective Program Reduction
Zhenyang Xu, Yiran Wang, Yongqiang Tian, Mengxiao Zhang, Chengnian Sun
Abstract
Essential for debugging compilers and interpreters, existing reduction tools face a fundamental trade-off. Language-Specific reducers, such as C-Reduce and ddSMT, offer highly effective reductions but require substantial engineering effort for each target language. Conversely, language-agnostic reducers, like Vulcan, sacrifice effectiveness for broad applicability.To bridge this gap, we present Latra, a novel template-based framework that balances both aspects, enabling general, effective, targeted program reduction. Latra combines language-agnostic reduction with user-defined, language-specific transformations. It facilitates user-defined transformations through a user-friendly domain-specific language based on simple matching and rewriting templates. This minimizes the need for deep formal grammar knowledge. Latra empowers users to tailor reductions to specific languages with reduced implementation overhead.Our evaluation shows that Latra significantly outperforms Vulcan. On average, it reduces 33.77% more tokens in C and 9.17% more tokens in SMT-LIB, with 32.27% faster execution in SMT-LIB. Notably, Latra closely matches the effectiveness of language-specific reducers, i.e., C-Reduce and ddSMT (89 vs. 85, 103 vs. 109 tokens on average), while significantly reducing engineering effort (167 vs. 5,685, 62 vs. 118 lines of code). We strongly believe that Latra provides a practical and cost-efficient approach to program reduction, effectively balancing language-specific effectiveness with language-agnostic generality.
Ask about this paper
Ask your agent about it.
Lune has read the top-tier papers around this one, so every answer names the papers it rests on.
Your agent calls
Lunesearch_papers
Free to start. No credit card required.
Terminal
Install the CLIlune papers get f1a8c855-0ce6-4fd4-8c22-3ed69dc4e173Related papers
- Pushing the Limit of 1-Minimality of Language-Agnostic Program ReductionZhenyang Xu, Yongqiang Tian, Mengxiao Zhang, Gaosen Zhao et al.OOPSLA 2023 · 21 citations
- LPR: Large Language Models-Aided Program ReductionMengxiao Zhang, Yongqiang Tian, Zhenyang Xu, Yiwen Dong et al.ISSTA 2024 · 13 citations
- Boosting Program Reduction with the Missing Piece of Syntax-Guided TransformationsZhenyang Xu, Yongqiang Tian, Mengxiao Zhang, Chengnian SunOOPSLA 2025 · 1 citation
- VULCANBOOST: Boosting ReDoS Fixes through Symbolic Representation and Feature NormalizationYeting Li, Yecheng Sun, Zhiwu Xu, Haiming Chen et al.USENIX Security 2025
- PPR: Pairwise Program ReductionMengxiao Zhang, Zhenyang Xu, Yongqiang Tian, Yu Jiang et al.FSE 2023 · 13 citations
