Selective tail call elimination

  • Authors:
  • Yasuhiko Minamide

  • Affiliations:
  • Institute of Information Sciences and Electronics, University of Tsukuba and PRESTO, JST

  • Venue:
  • SAS'03 Proceedings of the 10th international conference on Static analysis
  • Year:
  • 2003

Quantified Score

Hi-index 0.00

Visualization

Abstract

Tail calls are expected not to consume stack space in most functional languages. However, there is no support for tail calls in some environments. Even in such environments, proper tail calls can be implemented with a technique called a trampoline. To reduce the overhead of trampolining while preserving stack space asymptotically we propose selective tail call elimination based on an effect system. The effect system infers the number of successive tail calls generated by the execution of an expression, and trampolines are introduced only when they are necessary.