A type-based analysis for stack allocation in functional languages

Research output: Chapter in Book/Report/Conference proceedingConference contribution

5 Scopus citations

Abstract

We consider the problem of detecting when bindings for variables in a higher-order, call-by-value functional language can be allocated on a stack. We use an annotated type system to infer information about the occurrence and extent of variables in a simple higher-order functional language and combine this system with a translation to an annotated language which explicitly indicates when stack allocation can be performed. This technique supports both stack and heap allocation of variable bindings. Only the stack allocated bindings need follow the protocol for stacks: their extent must coincide with their scope. Heap allocated bindings can have any extent and their allocation has no impact on the stack allocated ones. The type system uses a simple notion of annotated types in which types encode not only the typical simple type information, but also information about the use of variables. We demonstrate the use of our analysis by defining both an operational semantics and an abstract machine which utilize both a stack and an environment for variable allocation.

Original languageEnglish (US)
Title of host publicationStatic Analysis - 2nd International Symposium, SAS 1995, Proceedings
EditorsAlan Mycroft
PublisherSpringer Verlag
Pages172-188
Number of pages17
ISBN (Print)9783540603603
StatePublished - Jan 1 1995
Event2nd International Static Analysis Symposium, SAS 1995 - Glasgow, United Kingdom
Duration: Sep 25 1995Sep 27 1995

Publication series

NameLecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics)
Volume983
ISSN (Print)0302-9743
ISSN (Electronic)1611-3349

Other

Other2nd International Static Analysis Symposium, SAS 1995
Country/TerritoryUnited Kingdom
CityGlasgow
Period9/25/959/27/95

All Science Journal Classification (ASJC) codes

  • Theoretical Computer Science
  • General Computer Science

Fingerprint

Dive into the research topics of 'A type-based analysis for stack allocation in functional languages'. Together they form a unique fingerprint.

Cite this