Master's Thesis

Liberalitas - A Metaobject Protocol for Julia

Eduardo Miguel Caetano Espadeiro — 2024

Key information

Authors:

Eduardo Miguel Caetano Espadeiro (Eduardo Miguel Caetano Espadeiro)

Supervisors:

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

Published in

November 8, 2024

Abstract

The Julia programming language’s data abstraction features are currently very limited, constraining de- velopers when creating advanced abstractions. To address this, we can take advantage of metaobject protocols to bring object-oriented features to Julia. Furthermore, Julia’s Just-In-Time (JIT) compiler opti- mization strategies mitigate the typical performance penalties that come from using these protocols. Metaobject protocols are mechanisms that bring object-oriented features to programming languages. These protocols are implemented to be extensible. They allow programmers to override and modify the underlying algorithms by making incremental changes to the existing protocols. This makes the object system more expressive as it is possible to extend the language to suit the programmer’s needs and introduce new mechanisms easily. In this thesis, we tackle the aforementioned problem by developing a metaobject protocol for Julia named Liberalitas. Liberalitas was designed to introduce object-oriented features to Julia while staying as idiomatic as possible to the language and taking advantage of its code optimization capabilities. We have also conducted benchmarks, comparing Liberalitas to normal Julia code and other metaobject protocols. These benchmarks showed the penalty from using Liberalitas is not very noticeable in typical code, and its performance was very similar to other Metaobject Protocols (MOPs).

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:

September 7, 2025

Institution name

Instituto Superior Técnico