Master's Thesis

PyJL: A Source-to-Source Python Compiler to Julia

Miguel Marcelino2022

Key information

Authors:

Miguel Marcelino (Miguel Marcelino)

Supervisors:

António Paulo Teles de Menezes Correia Leitão (António Paulo Teles de Menezes Correia Leitão)

Published in

11/25/2022

Abstract

Many high-level programming languages have emerged in recent years. Julia is one of these languages, claiming to offer the speed of C, the macro capabilities of Lisp, and the user-friendliness of Python. Julia's math-friendly syntax is one of its most prominent strengths, making it ideal for scientific and numerical computing. Furthermore, Julia's performance on modern hardware makes it an appealing alternative to Python. However, Python has a considerable advantage over Julia: its extensive library set. Python libraries can be made available to Julia through Foreign Function Interfaces (FFI's) or manual translation. Both of these approaches have their tradeoffs: FFI's do not take advantage of Julia's performance, and manual translation is demanding and time-consuming. In this regard, transpilation is a promising option. Transpilers translate between high-level programming languages, providing an efficient alternative to manually porting software from one language to another. To speedup the development of Julia libraries, we propose extending the Py2Many transpiler to translate Python source code into human-readable and maintainable Julia source code. Our results reveal that the generated code is capable of high performance and follows the pragmatics of Julia, allowing Julia programmers to further optimize and maintain it.

Publication details

Authors in the community:

Supervisors of this institution:

Fields of Science and Technology (FOS)

electrical-engineering-electronic-engineering-information-engineering - Electrical engineering, electronic engineering, information engineering

Publication language (ISO code)

eng - English

Rights type:

Embargo lifted

Date available:

09/27/2023

Institution name

Instituto Superior Técnico