Porting Software Libraries to OpenHarmony: Transitioning from TypeScript or JavaScript to ArkTS
This program is tentative and subject to change.
OpenHarmony emerges as a potent force in the mobile app domain, poised to stand alongside established industry giants. ArkTS is its main language, enhancing TypeScript (TS) and JavaScript (JS) with strict typing for improved performance. Developers are encouraged to port popular TS/JS libraries to OpenHarmony, supported by detailed guidelines. However, this requires a deep understanding of ArkTS syntax, following porting specifications, and making manual changes. An automated solution is crucial to streamline this process and foster a robust software ecosystem.
As a new programming language, ArkTS currently lacks essential analysis tools for automated analysis and porting of software libraries. However, the rise of Large Language Models (LLMs) shows promise for effectively addressing automated porting tasks. There are two challenges in using LLMs to automate the porting of TS/JS libraries to OpenHarmony: (1) \emph{LLMs have limited exposure to ArkTS code, making it difficult for them to grasp the syntactical differences between ArkTS and JS/TS, as well as the various adaptation scenarios.} (2) \emph{Project-level code adaptation often involves correcting numerous syntax mismatches, which complicates matters for LLMs as they must handle the interactions between different mismatches and interdependent code.} In response, we introduce \texttt{ArkAdapter}, a project-level automatic code adaptation approach. \texttt{ArkAdapter} addresses \textit{Challenge 1} by establishing an adaptation knowledge repository for ArkTS syntax comprehension. It expands a collection of real code adaptation examples based on expert experience across various scenarios, improving the adaptation capabilities of LLMs through few-shot learning. \texttt{ArkAdapter} overcomes \textit{Challenge 2} based on an adaptation priority strategy by considering both the dependency structure and the granularity of syntax-mismatching code. This strategy helps prevent interference among various syntax mismatches and their interdependent code. Evaluation shows \texttt{ArkAdapter} achieves high precision (86.84%) and full recall rates (100%) in locating syntax-mismatching code. 80.14% code adaptions inferred by \texttt{ArkAdapter} with LLM exactly or plausibly match the actual adaptations made by OpenHarmony developers. We utilized \texttt{ArkAdapter} to port 79 widely-used TS/JS libraries. \textbf{70 ArkTS libraries (88.6%) were validated by \emph{ArkCompiler}, passed tests, and were approved by the reviewers of the OpenHarmony’s library central repository}, showcasing its potential to streamline the porting process and enhance the growth of the OpenHarmony software landscape.
This program is tentative and subject to change.
Fri 27 JunDisplayed time zone: Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna change
11:00 - 12:30 | |||
11:00 25mTalk | KEENHash: Hashing Programs into Function-aware Embeddings for Large-scale Binary Code Similarity Analysis Research Papers Zhijie Liu ShanghaiTech University, China, Qiyi Tang Tencent Security Keen Lab, Sen Nie Tencent Security Keen Lab, Shi Wu Tencent Security Keen Lab, Liangfeng Zhang School of Information Science and Technology, ShanghaiTech University, Yutian Tang University of Glasgow, United Kingdom | ||
11:25 25mTalk | Porting Software Libraries to OpenHarmony: Transitioning from TypeScript or JavaScript to ArkTS Research Papers | ||
11:50 25mTalk | STRUT: Structured Seed Case Guided Unit Test Generation for C Programs using LLMs Research Papers Jinwei Liu Xidian University, Chao Li Beijing Institute of Control Engineering; Beijing Sunwise Information Technology, Rui Chen Beijing Institute of Control Engineering; Beijing Sunwise Information Technology, Shaofeng Li Xidian University, Bin Gu Beijing Institute of Control Engineering, Mengfei Yang China Academy of Space Technology | ||
12:15 15mDemonstration | COOLer: A Language Support Extension for COOL in VS Code Tool Demonstrations |