一句话:提出统一中间表示 CIR,使同一模型一次翻译即可支撑仿真、测试、验证与部署等多种下游任务。
模型驱动设计中,同一模型常需支持仿真、测试、验证与部署等多种下游任务,但现有工具往往为不同任务分别搭建翻译流程,造成模型重复解析、语义重建冗余以及工具链复用受限。本文提出 UCT,一个基于统一中间表示(CIR)的多用途代码翻译框架。UCT 将模型一次性翻译为 CIR,并在其中保留可执行语义、结构信息、调度关系以及模型与代码之间的映射,随后通过统一的插桩机制与后端翻译生成面向具体任务的定制代码。作者实现了 UCT 并在 Simulink 基准模型上开展评估,结果表明 UCT 能为仿真、测试、验证和部署生成可用的定制代码;其生成的二进制产物还带来额外收益,模型测试覆盖率平均提升 85.9%,相比 Simulink Rapid Accelerator 仿真平均加速 19.8 倍。
Model-driven design often requires the same model to support multiple downstream tasks, such as simulation, testing, verification, and deployment. However, existing tools usually build separate translation workflows for different tasks, causing repeated model parsing, redundant semantic reconstruction, and limited reuse across toolchains. In this paper, we present UCT, a versatile code translation framework based on a unified intermediate representation (CIR). UCT translates models into CIR once, preserves executable semantics, structural information, scheduling relations, and model-code mappings, and then generates task-specific code through unified instrumentation and backend translation. We implemented UCT and evaluated it on Simulink benchmark models. The results show that UCT can generate usable customized code for simulation, testing, verification, and deployment. The generated binary artifacts also provide additional benefits, improving model testing coverage by 85.9% on average and accelerating simulation by 19.8× on average over Simulink Rapid Accelerator. The video is presented at https://youtu.be/CCu5iO853p4. The implementation is available at https://github.com/CodeGen123/UCT.
@inproceedings{paperbot12310,
title = {UCT: A Versatile Code Translation Framework Based on a Unified Intermediate Representation},
author = {Wangcai Li and Dongyan Wang and Zehong Yu and Yifan Cheng and Ning Ge and Chunming Hu and Zhuo Su},
booktitle = {ASE},
year = {2026},
doi = {10.1145/3832783.3834636}
}