Hostname: page-component-77f85d65b8-7lfxl Total loading time: 0 Render date: 2026-03-26T21:39:07.016Z Has data issue: false hasContentIssue false

Implicit self-adjusting computation for purely functional programs

Published online by Cambridge University Press:  31 March 2014

YAN CHEN
Affiliation:
Max Planck Institute for Software Systems, Kaiserslautern and Saarbrücken, Germany (e-mails: chenyan@mpi-sws.org, jana.dunfield@gmail.com)
JANA DUNFIELD
Affiliation:
Max Planck Institute for Software Systems, Kaiserslautern and Saarbrücken, Germany (e-mails: chenyan@mpi-sws.org, jana.dunfield@gmail.com)
MATTHEW A. HAMMER
Affiliation:
University of Maryland, College Park, MD, USA (e-mail: hammer@mpi-sws.org)
UMUT A. ACAR
Affiliation:
Carnegie Mellon University, Pittsburgh, PA, USA and INRIA Paris-Rocquencourt, Paris, France (e-mail: umut@cs.cmu.edu)
Rights & Permissions [Opens in a new window]

Abstract

Core share and HTML view are not available for this content. However, as you have access to this content, a full PDF is available via the 'Save PDF' action button.

Computational problems that involve dynamic data, such as physics simulations and program development environments, have been an important subject of study in programming languages. Building on this work, recent advances in self-adjusting computation have developed techniques that enable programs to respond automatically and efficiently to dynamic changes in their inputs. Self-adjusting programs have been shown to be efficient for a reasonably broad range of problems, but the approach still requires an explicit programming style, where the programmer must use specific monadic types and primitives to identify, create, and operate on data that can change over time. We describe techniques for automatically translating purely functional programs into self-adjusting programs. In this implicit approach, the programmer need only annotate the (top-level) input types of the programs to be translated. Type inference finds all other types, and a type-directed translation rewrites the source program into an explicitly self-adjusting target program. The type system is related to information-flow type systems and enjoys decidable type inference via constraint solving. We prove that the translation outputs well- typed self-adjusting programs and preserves the source program's input–output behavior, guaranteeing that translated programs respond correctly to all changes to their data. Using a cost semantics, we also prove that the translation preserves the asymptotic complexity of the source program.

Information

Type
Articles
Copyright
Copyright © Cambridge University Press 2014 
Submit a response

Discussions

No Discussions have been published for this article.