Porting Declarative UI to HarmonyOS: A Heuristic-guided LLM Approach
- URL: http://arxiv.org/abs/2606.07085v1
- Date: Fri, 05 Jun 2026 09:31:21 GMT
- Title: Porting Declarative UI to HarmonyOS: A Heuristic-guided LLM Approach
- Abstract summary: This paper proposes an automatic translation approach, namely ArkTrans, to port UI files from Android and iOS to HarmonyOS.<n>ArkTrans overcomes two salient challenges during the translation: (1) Programming Language (PL) unfamiliarity, and (2) severe syntactic chaos.<n>To examine the effectiveness of ArkTrans, we construct a 100-sample parallel UI page translation benchmark from KJC/SwiftUI to ArkUI at the file level.
- Score: 12.690352638092746
- License: http://creativecommons.org/publicdomain/zero/1.0/
- Abstract: As an emerging operating system, HarmonyOS has a significant demand for software migration from platforms such as Android and iOS, where the User Interface (UI) translation accounts for a critical link. However, the latest UI development has shifted to declarative paradigms, e.g., Kotlin Jetpack Compose (KJC) for Android, SwiftUI for iOS, and ArkUI for HarmonyOS, rendering prior translation approaches inapplicable, as they target either backend logic or legacy imperative UIs. As such, this paper targets ArkUI and proposes an automatic translation approach, namely ArkTrans, to port UI files from Android and iOS to HarmonyOS. ArkTrans overcomes two salient challenges during the translation: (1) Programming Language (PL) unfamiliarity, and (2) severe syntactic chaos. Towards the first challenge, ArkTrans heuristically constructs ArkUI skeletons by extracting metadata from source PL, thereby guiding LLMs' initial translation. As for the second challenge, ArkTrans executes empirically revealed post-fixing rules via pattern matching to repair most of the remaining syntactic errors. To examine the effectiveness of ArkTrans, we construct a 100-sample parallel UI page translation benchmark from KJC/SwiftUI to ArkUI at the file level. Extensive experiments demonstrate that LLMs with direct/one-shot prompting cannot translate a single compilable UI page. In contrast, at most 90.67\% ArkTrans-translated files can be successfully compiled with high visual fidelity.
Related papers
- LLaDA-UI: Bringing Block-wise Diffusion to Vision-Language GUI Agents [52.61417375636918]
We present LLaDA-UI, a 16.7B- parameter MoE-based, block-wise diffusion vision-language GUI agent.<n>We show that LLaDA-UI substantially outperforms Qwen2.5-VL-7B and surpasses Qwen3-VL-8B on four of six reported GUI benchmarks.
arXiv Detail & Related papers (2026-09-09T05:53:39Z) - CoPiT: Cognitive Pivot Translation for Digraphic Low-Resource Mongolian in the Traditional Script [6.45127767060449]
Mongolian is written in both Cyrillic and Traditional scripts.<n>Traditional script remains extremely data-scarce and orthographically ambiguous, leading to substantial performance degradation in direct translation.<n>We propose CoPiT, a pivot-based translation pipeline that exploits this internal resource hierarchy by routing translation through the Cyrillic script.
arXiv Detail & Related papers (2026-07-07T05:12:13Z) - Bootstrapping Code Translation with Weighted Multilanguage Exploration [22.90890448332095]
We propose BootTrans, a bootstrapping method for code translation across languages.<n>Its key idea is to leverage the functional invariance and cross-lingual portability of test suites.<n>Our method introduces a dual-pool architecture with seed and exploration pools to progressively expand training data.
arXiv Detail & Related papers (2026-01-07T01:56:44Z) - Direct Simultaneous Translation Activation for Large Audio-Language Models [58.03785696031301]
Simultaneous speech-to-text translation (Simul-S2TT) aims to translate speech into target text in real time.<n>We introduce bf Simultaneous bf Self-bf Augmentation (bf SimulSA), a strategy that utilizes LALMs' inherent capabilities to obtain simultaneous data.
arXiv Detail & Related papers (2025-09-19T07:12:18Z) - Function-to-Style Guidance of LLMs for Code Translation [59.487054943812836]
We propose F2STrans, a function-to-style guiding paradigm designed to improve the performance of large language models in code translation.<n>Our approach comprises two key stages: (1) Functional learning, which optimize translation correctness using high-quality source-target code pairs.<n>We introduce a novel code translation benchmark that includes up-to-date source code, extensive test cases, and manually annotated ground-truth translations.
arXiv Detail & Related papers (2025-07-15T08:25:02Z) - UITrans: Seamless UI Translation from Android to HarmonyOS [20.2752697820237]
We present UITrans, the first automated UI translation tool designed for Android to HarmonyOS.<n>Our evaluation of six Android applications demonstrates that our UITrans translation success rates of over 90.1%, 89.3%, and 89.2% at the component, page, and project levels, respectively.
arXiv Detail & Related papers (2024-12-18T10:33:55Z) - Improving Language Transfer Capability of Decoder-only Architecture in Multilingual Neural Machine Translation [28.07831604833682]
We investigate the issue of the decoder-only architecture to its lack of language transfer capability.<n>We propose dividing the decoding process into two stages so that target tokens are explicitly excluded in the first stage.<n>We impose contrastive learning on translation instructions, resulting in improved performance in zero-shot translation.
arXiv Detail & Related papers (2024-12-03T02:52:14Z) - RustRepoTrans: Repository-level Code Translation Benchmark Targeting Rust [50.65321080814249]
RustRepoTrans is the first repository-level context code translation benchmark targeting incremental translation.<n>We evaluate seven representative LLMs, analyzing their errors to assess limitations in complex translation scenarios.
arXiv Detail & Related papers (2024-11-21T10:00:52Z) - A Rule-Based Approach for UI Migration from Android to iOS [11.229343760409044]
We propose a novel approach called GUIMIGRATOR, which enables the cross platform migration of existing Android app UIs to iOS.
GuiMIGRATOR extracts and parses Android UI layouts, views, and resources to construct a UI skeleton tree.
GuiMIGRATOR generates the final UI code files utilizing target code templates, which are then compiled and validated in the iOS development platform.
arXiv Detail & Related papers (2024-09-25T06:19:54Z) - TransFace: Unit-Based Audio-Visual Speech Synthesizer for Talking Head
Translation [54.155138561698514]
Direct speech-to-speech translation achieves high-quality results through the introduction of discrete units obtained from self-supervised learning.
Existing methods invariably rely on cascading, synthesizing via both audio and text, resulting in delays and cascading errors.
We propose a model for talking head translation, textbfTransFace, which can directly translate audio-visual speech into audio-visual speech in other languages.
arXiv Detail & Related papers (2023-12-23T08:45:57Z) - Simple Yet Effective Neural Ranking and Reranking Baselines for
Cross-Lingual Information Retrieval [50.882816288076725]
Cross-lingual information retrieval is the task of searching documents in one language with queries in another.
We provide a conceptual framework for organizing different approaches to cross-lingual retrieval using multi-stage architectures for mono-lingual retrieval as a scaffold.
We implement simple yet effective reproducible baselines in the Anserini and Pyserini IR toolkits for test collections from the TREC 2022 NeuCLIR Track, in Persian, Russian, and Chinese.
arXiv Detail & Related papers (2023-04-03T14:17:00Z) - Anticipation-free Training for Simultaneous Translation [70.85761141178597]
Simultaneous translation (SimulMT) speeds up the translation process by starting to translate before the source sentence is completely available.
Existing methods increase latency or introduce adaptive read-write policies for SimulMT models to handle local reordering and improve translation quality.
We propose a new framework that decomposes the translation process into the monotonic translation step and the reordering step.
arXiv Detail & Related papers (2022-01-30T16:29:37Z)
This list is automatically generated from the titles and abstracts of the papers in this site.
This site does not guarantee the quality of this site (including all information) and is not responsible for any consequences.