Back to results

University of Connecticut

AMIBE: an Imperative Programming Language with First Class Continuations

Abstract

dc:description.abstract

<p>A continuation represents the future of an execution. It is often used as an intermediate representation(IR) to compile functional programming languages, make control flow explicit and full beta-reduction(function inlining) possible. Continuations are also a language feature that gives user the ability to completely control the execution control flow(first class continuation). Efficient implementation of first class continuation is important for languages that need non-determinism and backtracking(e.g., COMET). We present a prototype imperative programming language with first class continuation -- AMIBE. AMIBE uses the LLVM compiler infrastructure which is attractive for its optimizing tools and overall modern organization. However, LLVM does not support the implementation of continuation via a direct manipulation of the system stack. To move the execution state out of the system stack into a separate AMIBE stack, AMIBE adopts the Continuation Passing Style compilation technique(CPS). With CPS, states on the system stack are never reused since functions never return. Portable implementation for first class continuation becomes possible because the compiler only needs to save and restore the AMIBE stack which it fully controls. In CPS, function calls are tail calls. By exploiting the optimization for tail calls in LLVM, function calls are reduced to jumps, so that the system stack never grows on calls. AMIBE programs are first compiled into an AMIBE IR closely related to LLVM IR, then transformed into CPS form. Finally the AMIBE IR in CPS is translated into LLVM IR. The performance of the optimizing compiler based on LLVM and CPS is compared against a naive just-in-time compiler based on GNU lightning and currently used by COMET.</p>

Degree

thesis:*
Name thesis:degree_name
Master of Science
Discipline thesis:degree_discipline
Computer Science and Engineering
Year dc:date.available
2011

Author and committee

dc:creator, dc:contributor.*
Author dc:creator
  • Wang, Yuting
Contributors dc:contributor
  • Robert McCartney;Yufeng Wu;Zhijie Jerry Shi
  • Laurent Michel

Subjects

dc:subject × 5

Identifiers

dc:identifier.*
Repository record dc:identifier
https://digitalcommons.lib.uconn.edu/gs_theses/142
OAI identifier oai:identifier
oai:digitalcommons.lib.uconn.edu:gs_theses-1180

Chain of custody

source
Harvested from
University of Connecticut
Base URL
digitalcommons.lib.uconn.edu/do/oai/
Last updated
2026-07-24
Source record
OAI-PMH GetRecord
citation

Wang, Yuting. AMIBE: an Imperative Programming Language with First Class Continuations. 2011. https://digitalcommons.lib.uconn.edu/gs_theses/142