Type-Directed Continuation Allocation

Abstract

Suppose we translate two different source languages, L(sub1) and L(sub2), into the same intermediate language; can they safely interoperate in the same address space and under the same runtime system? If L(sub1) supports first-class continuations (call/cc) and L(sub2) does not, can L(sub2) programs call arbitrary L(sub1) functions? Would the fact of possibly calling L(sub1) impose restrictions on the implementation strategy of L(sub2)? Can we compile L(sub1) functions that do not invoke call/cc using more efficient techniques borrowed from the implementation? Our view is that the implementation of a common intermediate language ought to support the so-called pay-as-you-go efficiency: first-order monomorphic functions should be compiled as efficiently as in C and assembly languages, even though they may be passed to arbitrary polymorphic functions that support advanced control primitives (e.g. call/cc). In this paper, we present a typed intermediate language with effect and resource annotations, ensuring the safety of inter-language calls while allowing the compiler to choose continuation allocation strategies.

Open PDF

Document Details

Document Type
Technical Report
Publication Date
Jan 01, 2005
Accession Number
ADA436476

Entities

People

  • Valery Trifonov
  • Zhong Shao

Organizations

  • Yale University

Tags

DTIC Thesaurus Topics

  • Abstracts
  • Availability
  • Classification
  • Compilers
  • Computations
  • Contracts
  • Efficiency
  • Environment
  • Governments
  • Information Operations
  • Instructions
  • Interoperability
  • Language
  • Linearity
  • Monitoring
  • Standards
  • Switches

Fields of Study

  • Computer science

Readers

  • Applied Combinatorial Optimization and Logic Circuit Design.
  • Computational Linguistics

Technology Areas

  • Space