LLMs as Compiler for Arabic Programming Language
Serry Sibaee, Omar Najar, Lahouri Ghouti, Anis Koubaa
TL;DR
The paper proposes Arabic Programming Language (APL), which uses Large Language Models as a semi-compiler to translate Arabic instructions into Python code and execute it, addressing the gap in Arabic programming tooling. It presents a two-part methodology focused onCompiler Architecture (with an LLM Planner, Task Fetching Unit, and Executor) and Prompt Engineering to convert natural-language prompts into runnable code, plus an API and interface for integration. The approach is demonstrated through an end-to-end pipeline and illustrative examples, while discussing challenges such as keyword translation, string preservation, and API costs, and suggesting future work with open-source model fine-tuning. Overall, the work aims to democratize programming for Arabic speakers by providing an end-to-end, testable pipeline from Arabic text to executable Python, enabled by an actionable API and interface.
Abstract
In this paper we introduce APL (Arabic Programming Language) that uses Large language models (LLM) as semi-compiler to covert Arabic text code to python code then run the code. Designing a full pipeline from the structure of the APL text then a prompt (using prompt engineering) then running the prodcued python code using PyRunner. This project has a three parts first python library, a playground with simple interface and this research paper.
