Back to search

Chalmers University of Technology

Towards a Practical Execution Model for Functional Languages with Linear Types

Abstract

dc:description.abstract

Typed functional programming has an attractive logical foundation which ensures safety and modularity. System-level programming, on the other hand, offers finegrained control over program execution. Is there a way to combine those two strengths? In this thesis, we take a first step in compiling functional languages to a C-like paradigm. Specifically, we propose a functional compiler intermediate language designed to bridge the gap between high-level functional programming and low-level system programming. To retain the generality of functional programming while allowing for finer control, we adopt a modular design where higher-level features decompose into lower-level constructs within a shared language. Our design is not solely driven by practical considerations but rather we achieve memory control by following the structure of linear logic. In fact, our language is heavily based on the proof structure of a sequent calculus presentation of linear logic. In leveraging this formal system, our language gain theoretical interest and many desirable properties while simultaneously enabling a more direct execution model. To demonstrate the viability of our design, we compile our language into a virtual machine language. The virtual machine language, which is specifically design as a target for our intermediate language, has an assembly-like style that maps naturally onto existing computer architecture. This suggest the potential for compiling our language into actual machine code. Given that this work represents an initial effort of compiling functional languages to a C-like paradigm, we do not address all aspects of language design. Our primary contribution focuses on the treatment of functions, with particular emphasis on their representation and calling conventions.

Degree

thesis:*
Level thesis:degree_level
H
Department dc:contributor.department
Chalmers tekniska högskola / Institutionen för data och informationsteknik
Year dc:date.issued
2024

Author and committee

dc:creator, dc:contributor.*
Author dc:creator
  • Nordmark, Filip
Advisor dc:contributor.supervisor
  • Seger, Carl-Johan
Committee member dc:contributor.committeemember
  • Russo, Alejandro

Subjects

dc:subject × 1

Rights

Language dc:language.iso
eng

Identifiers

dc:identifier.*
Dc Identifier Coursecode
DATX05

Chain of custody

source
Harvested from
Chalmers University of Technology
Base URL
odr.chalmers.se/oai/request
Last updated
2026-11-19
Source record
OAI-PMH GetRecord
citation

Nordmark, Filip. Towards a Practical Execution Model for Functional Languages with Linear Types. H thesis, 2024. https://hdl.handle.net/20.500.12380/309314