Space-Efficient manifest contracts

Research output: Chapter in Book/Report/Conference proceedingConference contributionpeer-review

22 Scopus citations

Abstract

The standard algorithm for higher-order contract checking can lead to unbounded space consumption and can destroy tail recursion, altering a program's asymptotic space complexity. While space efficiency for gradual types-contracts mediating untyped and typed code-is well studied, sound space efficiency for manifest contracts-contracts that check stronger properties than simple types, e.g., "is a natural" instead of "is an integer"-remains an open problem. We show how to achieve sound space efficiency for manifest contracts with strong predicate contracts. The essential trick is breaking the contract checking down into coercions: structured, blame-annotated lists of checks. By carefully preventing duplicate coercions from appearing, we can restore space efficiency while keeping the same observable behavior.

Original languageEnglish
Title of host publicationPOPL 2015 - Proceedings of the 42nd Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages
Pages181-194
Number of pages14
ISBN (Electronic)9781450333009
DOIs
StatePublished - 14 Jan 2015
Event42nd Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, POPL 2015 - Mumbai, India
Duration: 12 Jan 201518 Jan 2015

Publication series

NameConference Record of the Annual ACM Symposium on Principles of Programming Languages
Volume2015-January
ISSN (Print)0730-8566

Conference

Conference42nd Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, POPL 2015
Country/TerritoryIndia
CityMumbai
Period12/01/1518/01/15

Keywords

  • Coercions
  • Contracts
  • Function proxy
  • Pre- And post-conditions
  • Space efficiency

Fingerprint

Dive into the research topics of 'Space-Efficient manifest contracts'. Together they form a unique fingerprint.

Cite this