Please use this identifier to cite or link to this item: https://www.um.edu.mt/library/oar/handle/123456789/150152
Title: Implementing the Linear Lambda Calculus in rust
Authors: Scerri, Robert (2026)
Keywords: Lambda calculus
Rust (Computer program language)
Domain-specific programming languages
Programming languages (Electronic computers) -- Semantics
Type theory
Issue Date: 2026
Citation: Scerri, R. (2026). Implementing the Linear Lambda Calculus in rust (Bachelor’s dissertation).
Abstract: Linearity ensures that resources are used exactly once by prohibiting both duplication anddiscarding. The linear lambda calculus extends the traditional lambda calculus with linear abstractions to formalise this constraint within a computational setting. A related but distinct notion is uniqueness, which ensures that at any point during execution, there exists at most one reference to a resource,enabling safein-place mutation. Rust incorporates uniqueness through its ownership-based type system,eliminating the need for garbage collection while preventing data races. Despite their conceptual similarities, linearity and uniqueness diverge in the presence of unrestricted values. This work investigates the feasibility of embedding the linear lambda calculus as a Domain-specific Language (DSL) within Rust to establish a formal correspondence between these two paradigms and to then better understand their similarities and differences. We propose a design that exploits Rust’s ownership and move semantics to enforce linear resource usage. Our implementation uses procedural macros to compile well-typed DSL terms into well-typed Rust code, leveraging the host language’s type system to preserve correctness. This approach illustrates how uniqueness can approximate linear typing in practice and provides a concrete framework for systematically comparing linearity and uniqueness within a unified setting.
Description: B.Sc. (Hons)(Melit.)
URI: https://www.um.edu.mt/library/oar/handle/123456789/150152
Appears in Collections:Dissertations - FacICT - 2026

Files in This Item:
File Description SizeFormat 
2608ICTICT391400018718_1.PDF
  Restricted Access
882.52 kBAdobe PDFView/Open Request a copy


Items in OAR@UM are protected by copyright, with all rights reserved, unless otherwise indicated.