Back to results

University of Illinois at Urbana-Champaign

Improving Efficiency and Safety of Program Generation

Abstract

dc:description

Program Generation (PG) is about writing programs that write programs. A program generator composes various pieces of code to construct a new program. When employed at runtime, PG can produce an efficient version of a program by specializing it according to inputs that become available at runtime. PG has been used in a wide range of applications to improve program efficiency and modularity as well as programmer productivity. There are two major problems associated with PG: (1) Program generation has its own cost, which may cause a performance loss even though PG is intended for performance gain. This is especially important for runtime program generation. (2) Compilability guarantees about the generated program are poor; the generator may produce a type-incorrect program. In this dissertation we focus on these two problems. We provide three techniques that address the first problem. First, we show that just-in-time generation can successfully reduce the cost of generation by avoiding unnecessary program generation. We do this by means of an experiment in the context of marshalling in Java, where we generate specialized object marshallers based on object types. Just-in-time generation improved the speedup from 1.22 to 3.16. Second, we apply source-level transformations to optimize the execution of program generators. Up to 15\% speedup has been achieved in runtime generation time for Jumbo, a PG system for Java. Third, we provide a technique to stage analysis of generated programs to perform a portion of the analysis at compile time rather than completing the entire analysis at runtime. We also give experimental evidence via several examples that this technique reduces runtime generation cost. To address the second problem of PG, we first show that operational semantics of record calculus and program generation are equivalent, and that a record type system can be used to type-check program generators. We also show that this is true in the presence of expressions with side-effects. We then make use of an already-existing record calculus feature, subtyping, to extend the program generation type system with subtyping constraints. As a result, we obtain a very expressive type system to statically guarantee that a generator will produce type-safe code. We state and prove the theorems based on an ML-like language with program generation constructs.

Degree

thesis:*
Name thesis:degree_name
Ph.D.
Level thesis:degree_level
Dissertation
Grantor
University of Illinois at Urbana-Champaign
Year dc:date
2009

Author and committee

dc:creator, dc:contributor.*
Author dc:creator
  • Aktemur, T. Baris
Contributors dc:contributor
  • Kamin, Samuel N.
  • Adve, Vikram S.
  • Marinov, Darko
  • Roşu, Grigore
  • Sestoft, Peter

Subjects

dc:subject × 5

Rights

dc:rights
Statement dc:rights
  • Copyright 2009 Baris Aktemur
Language dc:language
en

Identifiers

dc:identifier.*
Identifier
Submitted in partial fulfillment of the requirements for the degree of Doctor of Philosophy in Computer Science in the Graduate College of the University of Illinois at Urbana-Champaign, 2009
OAI identifier oai:identifier
oai:www.ideals.illinois.edu:2142/11868

Chain of custody

source
Harvested from
University of Illinois - Urbana-Champaign
Base URL
www.ideals.illinois.edu/oai-pmh
Last updated
2026-07-22
Source record
OAI-PMH GetRecord
citation

Aktemur, T. Baris. Improving Efficiency and Safety of Program Generation. Dissertation thesis, University of Illinois at Urbana-Champaign, 2009. http://hdl.handle.net/2142/11868