Back to search

Brigham Young University - Provo

Enabling Optimizations Through Demodularization

Abstract

dc:description.abstract

Programmers want to write modular programs to increase maintainability and create abstractions, but modularity hampers optimizations, especially when modules are compiled separately or written in different languages. In languages with syntactic extension capabilities, each module in a program can be written in a separate language, and the module system must ensure that the modules interoperate correctly. In Racket, the module system ensures this by separating module code into phases for runtime and compile-time and allowing phased imports and exports inside modules. We present an algorithm, called demodularization, that combines all executable code from a phased modular program into a single module that can then be optimized as a whole program. The demodularized programs have the same behavior as their modular counterparts but are easier to optimize. We show that programs maintain their meaning through an operational semantics of the demodularization process and verify that performance increases by comparing modular Racket programs to the equivalent demodularized and optimized programs. We use the existing Racket optimizer to optimize the demodularized programs by decompiling them into an intermediate form that the optimizer uses. We also demonstrate a dead code elimination optimization that dramatically reduces the file size of demodularized Racket programs.

Degree

thesis:*
Name thesis:degree_name
MS
Grantor dc:publisher
Brigham Young University - Provo
Year dc:date
2016

Author and committee

dc:creator, dc:contributor.*
Author dc:creator
  • Johnson, Blake Dennis

Subjects

dc:subject × 5

Rights

Licence dc:rights.license
Language dc:language
english

Identifiers

dc:identifier.*
Repository record dc:identifier
https://scholarsarchive.byu.edu/etd/5722

Chain of custody

source
Harvested from
Brigham Young University
Base URL
scholarsarchive.byu.edu/do/oai/
Last updated
2026-11-19
Source record
OAI-PMH GetRecord
related terms
citation

Johnson, Blake Dennis. Enabling Optimizations Through Demodularization. Brigham Young University - Provo, 2016. https://scholarsarchive.byu.edu/etd/5722