Stackless programming in Miller

Open access


Compilers generate from the procedure or function call instruction a code that builds up an ”activation record” into the stack memory in run time. At execution of this code the formal parameters, local variables, data of visibility and the scope are pushed into the activation record, and in this record there are fields for the return address and the return value as well. In case of intensive recursive calls this is the reason of the frequent occurrences of the stack-overflow error messages. The classical technique for fixing such stack-overflows is to write programs in stackless programming style using tail recursive calls; the method is usually realised by Continuation Passing Style. This paper describes this style and gives an introduction to the new, special purpose stackless programming language Miller, which provides methods to avoid stack-overflow errors.

[1] I. Baxter, Answer # 1,, 2013. ⇒167

[2] O. Danvy, K. Millikin, On One-Pass CPS Transformations, BRICS, Department of Computer Science, University of Aarhus, RS-07-6, 2007. ⇒170

[3] K. Driesen, U. Hölzle, The direct cost of virtual function calls in C++, SIGPLAN Not., 31, 10 (1996) 306-323. ⇒172

[4] D. P. Friedman, M. Wand, Essentials of Programming Languages (3rd edition), The MIT Press, Cambridge, MA, 2008. ⇒169

[5] A. Gill, Hackage, The Monad Transformer Library package, (16. 07. 2013.), ⇒174

[6] The Glasgow Haskell Team, Haskell, The Data.List module, (16. 07. 2013.), ⇒173

[7] Haskell Wiki, Tail recursion, (16. 07. 2013.), ⇒173

[8] S. Krishnamurthi, Programming Languages: Application and Interpretation (2nd edition), ebook,, 2007. ⇒170

[9] T. Lindholm, F. Xellin, G. Bracha, A. Buckley, The Java Virtual Machine Specification, (28. 02. 2013.), ⇒172

[10] A. Myers, Continuation-passing style, Lecture notes for CS 6110, Cornell University, 2013. ⇒171

[11] W. Sundaresan, L. J. Hendren, C. Razafimahefa, R. Vallée-Rai, P. Lam, E. Gagnon, C. Godin, Practical Virtual Method Call Resolution for Java, SIGPLAN Not., 35, 10 (2000) 264-280. ⇒172

[12] Wikipedia, George Armitage Miller, (16. 07. 2013.), ⇒ 175

Acta Universitatis Sapientiae, Informatica

The Journal of "Sapientia" Hungarian University of Transylvania

Journal Information


All Time Past Year Past 30 Days
Abstract Views 0 0 0
Full Text Views 67 67 8
PDF Downloads 24 24 4