As an emerging operating system, HarmonyOS has a significant demand for software migration, where the User Interface (UI) translation accounts for a critical link. However, recent UI development has shifted to declarative paradigms, e.g., Kotlin Jetpack Compose (KJC) for Android, SwiftUI for iOS, and ArkUI for HarmonyOS, making prior translation approaches inapplicable because they target either backend logic or legacy imperative UIs. Thus, related research is limited. To systematically evaluate KJC/SwiftUI-to-ArkUI migration, we build a parallel benchmark of 100 KJC and 100 SwiftUI files across eight scenarios, plus 52 real-world UI pages from nine open-source apps. Evaluating nine direct-translation setups (including diverse LLMs and agents), we find Compilation Success Rate (CSR) spans 0.00%-35.00%; common strategies (reference screenshots and compiler-guided repair) lift capable setups to 94.00%-99.00% CSR but fail on lightweight LLMs. By manually analyzing a 3,102-sample subset, deriving a regular-expression pattern for each failure family, and applying these patterns to generalize the resulting taxonomy to the full 29,593-sample set, we find residual errors rooted in (1) broken structure, (2) nonexistent APIs, and (3) missing resources (e.g., colors, strings, and icons). Accordingly, we propose ArkTrans, a declarative UI translation framework that maps these roots to deterministic structure supply, ArkUI knowledge and resource reference injection via a demonstration example, and iterative repair targeting residual errors, via four steps: Metadata Extraction, Skeleton Construction, LLM-driven Translation, and Compiler-Guided Iterative Repair. With Qwen3.6-27B, ArkTrans raises CSR from 0.00% to 70.00% on KJC and 64.00% on SwiftUI, achieving strong visual fidelity, and attains 65.63%/80.00% CSR on real-world pages, far outperforming the best common strategy at lower token cost.


翻译:暂无翻译

0
下载
关闭预览

相关内容

揭示生成式人工智能 / 大型语言模型(LLMs)的军事潜力
专知会员服务
32+阅读 · 2024年9月26日
大型语言模型(LLMs),附Slides与视频
专知会员服务
71+阅读 · 2024年6月30日
《将大型语言模型(LLM)整合到海军作战规划中》
专知会员服务
132+阅读 · 2024年6月13日
A Technical Overview of AI & ML in 2018 & Trends for 2019
待字闺中
18+阅读 · 2018年12月24日
资源 | 清华大学开源OpenKE:知识表示学习平台
机器之心
10+阅读 · 2017年11月4日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
4+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
8+阅读 · 2015年12月31日
国家自然科学基金
7+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
VIP会员
最新内容
俄罗斯如何拦截乌克兰无人机与巡航导弹
专知会员服务
9+阅读 · 10月15日
《武器-目标分配问题:精确与近似求解算法》
专知会员服务
14+阅读 · 10月15日
综述|谁来改进机器人?迈向物理递归自我改进
专知会员服务
11+阅读 · 10月14日
软件定义无人机蜂群给防空带来全新压力
专知会员服务
10+阅读 · 10月13日
《半自主无人地面战车的互操作性》66页
专知会员服务
14+阅读 · 10月13日
相关基金
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
4+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
8+阅读 · 2015年12月31日
国家自然科学基金
7+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员