Abstract
Security folklore holds that a security mechanism based on stack inspection is incompatible with a global tail call optimization policy. An implementation of such a language may have to allocate memory for a source-code tail call, and a program that uses only tail calls (and no other memory-allocating construct) may nevertheless exhaust the available memory. In this paper, we prove this widely held belief wrong. We exhibit an abstract machine for a language with security stack inspection whose space consumption function is equivalent to that of the canonical tail call optimizing abstract machine. Our machine is surprisingly simple and suggests that tail-calls are as easy to implement in a security setting as they are in a conventional one.
Chapter PDF
Similar content being viewed by others
Keywords
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.
References
Nick Benton, Andrew Kennedy, and George Russell. Compiling standard ML to Java bytecodes. In ACM SIGPLAN International Conference on Functional Programming, pages 129–140, 1998.
Don Box. Essential.NET, Volume I: The Common Language Runtime. Addison-Wesley, To Appear.
John Clements, Matthew Flatt, and Matthias Felleisen. Modeling an algebraic stepper. Lecture Notes in Computer Science, 2028:320–334, 2001.
William D. Clinger. Proper tail recursion and space efficiency. In ACM SIGPLAN Conference on Programming Language Design and Implementation, pages 174–185, 1998.
Matthias Felleisen and Matthew Flatt. Programming languages and their calculi. Unpublished Manuscript. Online at http://www.ccs.neu.edu/home/matthias/3810-w02/mono.ps.gz>, 1989–2002.
Matthew Flatt. PLT MzScheme: Language manual. Online at http://www.plt-scheme.org>, 1995-2002.
Cedric Fournet and Andrew D. Gordon. Stack inspection: theory and variants. In Symposium on Principles of Programming Languages, pages 307–318, 2002.
Erich Gamma, Richard Helm, Ralph Johnson, and John Vlissides. Design Patterns. Addison-Wesley, 1995.
Guy Lewis Steele Jr. Debunking the “expensive procedure call” myth. In ACM Conference, pages 153–162, 1977.
Günter Karjoth. An operational semantics of Java 2 access control. In The Computer Security Foundations Workshop, pages 224–232, 2000.
Richard Kelsey, William D. Clinger, and Jonathan Rees. Revised5 report on the algorithmic language scheme. SIGPLAN Notices, 33(9):26–76, 1998.
Gordon D. Plotkin. Call-by-name, call-by-value and the λ-calculus. Theoretical Computer Science, pages 125–159, 1975.
F. Pottier, Christian Skalka, and Scott Smith. A systematic approach to static access control. Lecture Notes in Computer Science, 2028:30–45, 2001.
Michel Schinz and Martin Odersky. Tail call elimination on the Java virtual machine. In SIGPLAN BABEL Workshop on Multi-Language Infrastructure and Interoperability, pages 155–168, 2001.
Christian Skalka and Scott Smith. Static enforcement of security with types. ACM SIGPLAN Notices, 35(9):34–45, 2000.
Dan Wallach, Dirk Balfanz, Drew Dean, and Ed Felten. Extensible security architectures for Java. In The 16th Symposium on Operating Systems Principles, pages 116–128, october 1997.
Dan Wallach, Edward Felten, and Andrew Appel. The security architecture formerly known as stack inspection: A security mechanism for language-based systems. ACM Transactions on Software Engineering and Methodology, 9(4):341–378, October 2000.
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2003 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Clements, J., Felleisen, M. (2003). A Tail-Recursive Semantics for Stack Inspections. In: Degano, P. (eds) Programming Languages and Systems. ESOP 2003. Lecture Notes in Computer Science, vol 2618. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-36575-3_3
Download citation
DOI: https://doi.org/10.1007/3-540-36575-3_3
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-00886-6
Online ISBN: 978-3-540-36575-4
eBook Packages: Springer Book Archive