Continuation-Passing C, compiling threads to events through continuations

Gabriel Kerneis1, Juliusz Chroboczek1
1Laboratoire PPS, Université Paris Diderot, Case 7014, 75205, Paris Cedex 13, France

Tóm tắt

Từ khóa


Tài liệu tham khảo

Adya, A., Howell, J., Theimer, M., Bolosky, W.J., Douceur, J.R.: Cooperative task management without manual stack management. In: Proceedings of the 2002 USENIX Annual Technical Conference, pp. 289–302. USENIX Association, Berkeley (2002)

Appel, A.W.: Compiling with Continuations. Cambridge University Press, Cambridge (1992)

Attar, P., Canal, Y.: Réalisation d’un seeder bittorrent en CPC (2009). http://www.pps.univ-paris-diderot.fr/~jch/software/hekate/hekate-attar-canal.pdf

von Behren, R., Condit, J., Zhou, F., Necula, G.C., Brewer, E.: Capriccio: scalable threads for internet services. SIGOPS Oper. Syst. Rev. 37(5), 268–281 (2003)

Berdine, J., O’Hearn, P., Reddy, U., Thielecke, H.: Linear continuation-passing. High.-Order Symb. Comput. 15, 181–208 (2002)

Boussinot, F.: FairThreads: mixing cooperative and preemptive threads in C. Concurr. Comput., Pract. Exp. 18(5), 445–469 (2006)

Bruggeman, C., Waddell, O., Dybvig, R.K.: Representing control in the presence of one-shot continuations. In: Proceedings of the ACM SIGPLAN 1996 Conference on Programming Language Design and Implementation, PLDI ’96, pp. 99–107. ACM, New York (1996)

Chroboczek, J.: Continuation-passing for C: a space-efficient implementation of concurrency. Tech. rep., PPS, Université Paris 7 (2005). http://hal.archives-ouvertes.fr/hal-00135160/

Claessen, K.: A poor man’s concurrency monad. J. Funct. Program. 9(3), 313–323 (1999)

Clinger, W.D.: Proper tail recursion and space efficiency. In: Proceedings of the ACM SIGPLAN 1998 Conference on Programming Language Design and Implementation, PLDI ’98, pp. 174–185. ACM, New York (1998)

Danvy, O., Schultz, U.: Lambda-lifting in quadratic time. In: Functional and Logic Programming. Lecture Notes in Computer Science, vol. 2441, pp. 134–151. Springer, Berlin (2002)

Drepper, U., Molnar, I.: The Native POSIX Thread Library for Linux (2005). http://people.redhat.com/drepper/nptl-design.pdf

Duff, T.: Duff’s device (1983). http://www.lysator.liu.se/c/duffs-device.html . Electronic mail to R. Gomes, D.M. Ritchie and R. Pike

Dunkels, A., Schmidt, O., Voigt, T., Ali, M.: Protothreads: simplifying event-driven programming of memory-constrained embedded systems. In: Proceedings of the 4th International Conference on Embedded Networked Sensor Systems, SenSys ’06, pp. 29–42. ACM, New York (2006)

Dybvig, R.K., Hieb, R.: Engines from continuations. Comput. Lang. 14, 109–123 (1989)

Engelschall, R.S.: Portable multithreading: the signal stack trick for user-space thread creation. In: Proceedings of the 2000 USENIX Annual Technical Conference. USENIX Association, Berkeley (2000)

Fischbach, A., Hannan, J.: Specification and correctness of lambda lifting. J. Funct. Program. 13, 509–543 (2003)

Fischer, J., Majumdar, R., Millstein, T.: Tasks: language support for event-driven programming. In: Proceedings of the 2007 ACM SIGPLAN Symposium on Partial Evaluation and Semantics-Based Program Manipulation, PEPM ’07, pp. 134–143. ACM, New York (2007)

Ganz, S.E., Friedman, D.P., Wand, M.: Trampolined style. In: Proceedings of the Fourth ACM SIGPLAN International Conference on Functional Programming, ICFP ’99, pp. 18–27. ACM, New York (1999)

Haller, P., Odersky, M.: Scala actors: unifying thread-based and event-based programming. Theor. Comput. Sci. 410(2–3), 202–220 (2009)

Harris, T., Abadi, M., Isaacs, R., McIlroy, R.: AC: composable asynchronous IO for native languages. In: Proceedings of the 2011 ACM International Conference on Object Oriented Programming Systems Languages and Applications, OOPSLA ’11, pp. 903–920. ACM, New York (2011)

Haynes, C.T., Friedman, D.P., Wand, M.: Continuations and coroutines. In: Proceedings of the 1984 ACM Symposium on LISP and Functional Programming, LFP ’84, pp. 293–298. ACM, New York (1984)

Hoare, C.A.R.: Monitors: an operating system structuring concept. Commun. ACM 17(10), 549–557 (1974)

International Organization for Standardization: ISO/IEC 9899:1999 “Programming Languages----C” (1999)

Johnsson, T.: Lambda lifting: transforming programs to recursive equations. In: Functional Programming Languages and Computer Architecture. Lecture Notes in Computer Science, vol. 201, pp. 190–203. Springer, Berlin (1985)

Kerneis, G., Chroboczek, J.: Are events fast? Tech. rep., PPS, Université Paris 7 (2009). http://hal.archives-ouvertes.fr/hal-00434374/

Kerneis, G., Chroboczek, J.: CPC: programming with a massive number of lightweight threads. In: Proceedings of the Workshop on Programming Language Approaches to Concurrency and Communication-Centric Software, PLACES’11 (2011)

Kerneis, G., Chroboczek, J.: Lambda-lifting and CPS conversion in an imperative language. Tech. rep., PPS, Université Paris 7 (2012). http://hal.archives-ouvertes.fr/hal-00669849/

Key, A.: Weave: translated threaded source (with annotations) to fibers with context passing (ca. 1995–2000). As used within RAID-1 code in IBM SSA RAID adapters. Personal communication

Krohn, M., Kohler, E., Kaashoek, M.F.: Events can make sense. In: Proceedings of the 2007 USENIX Annual Technical Conference, pp. 1–14. USENIX Association, Berkeley (2007)

Landin, P.J.: Correspondence between ALGOL 60 and Church’s lambda-notation, part I. Commun. ACM 8, 89–101 (1965)

Leroy, X., Doligez, D., Frisch, A., Garrigue, J., Rémy, D., Vouillon, J.: The Objective-Caml system (2010). http://caml.inria.fr/

Li, P., Zdancewic, S.: Combining events and threads for scalable network services implementation and evaluation of monadic, application-level concurrency primitives. In: Proceedings of the 2007 ACM SIGPLAN Conference on Programming Language Design and Implementation, PLDI ’07, pp. 189–199. ACM, New York (2007)

Miller, J.S., Rozas, G.J.: Garbage collection is fast, but a stack is faster. AI Memo 1462, Artificial Intelligence Laboratory, Massachusetts Institute of Technology, Cambridge, MA, USA (1994)

Necula, G., McPeak, S., Rahul, S., Weimer, W.: CIL: Intermediate language and tools for analysis and transformation of C programs. In: Compiler Construction. Lecture Notes in Computer Science, vol. 2304, pp. 209–265. Springer, Berlin (2002)

Pai, V.S., Druschel, P., Zwaenepoel, W.: Flash: an efficient and portable web server. In: Proceedings of the 1999 USENIX Annual Technical Conference. USENIX Association, Berkeley (1999)

Plotkin, G.D.: Call-by-name, call-by-value and the lambda-calculus. Theor. Comput. Sci. 1(2), 125–159 (1975)

Reppy, J.: Concurrent ML: Design, application and semantics. In: Functional Programming, Concurrency, Simulation and Automated Reasoning. Lecture Notes in Computer Science, vol. 693, pp. 165–198. Springer, Berlin (1993)

Reynolds, J.C.: The discoveries of continuations. LISP Symb. Comput. 6(3), 233–247 (1993)

Rompf, T., Maier, I., Odersky, M.: Implementing first-class polymorphic delimited continuations by a type-directed selective cps-transform. In: Proceedings of the 14th ACM SIGPLAN International Conference on Functional Programming, ICFP ’09, pp. 317–328. ACM, New York (2009)

Scholz, E.: A concurrency monad based on constructor primitives, or, being first-class is not enough. Tech. Rep. B 95-01, Fachbereich Mathematik und Informatik, Freie Universität Berlin, Berlin, Germany (1995)

Shekhtman, G., Abbott, M.: State Threads for internet applications (2009). http://state-threads.sourceforge.net/docs/st.html

Srinivasan, S., Mycroft, A.: Kilim: Isolation-typed actors for java. In: ECOOP 2008—Object-Oriented Programming. Lecture Notes in Computer Science, vol. 5142, pp. 104–128. Springer, Berlin (2008)

Steele, G.L., Jr.: Rabbit: A compiler for Scheme. Master’s thesis, Artificial Intelligence Laboratory, Massachusetts Institute of Technology, Cambridge, MA, USA (1978). Technical report AI-TR-474

Steele, G.L., Jr., Sussman, G.J.: Lambda, the ultimate imperative. AI Memo 353, Artificial Intelligence Laboratory, Massachusetts Institute of Technology, Cambridge, MA, USA (1976)

Strachey, C., Wadsworth, C.P.: Continuations: a mathematical semantics for handling full jumps. Technical Monograph PRG-11, Oxford University Computing Laboratory, Programming Research Group, Oxford, England (1974). Reprinted in Higher-Order and Symbolic Computation 13(1/2), 135–152 (2000). With a foreword [51]

Tatham, S.: Coroutines in C (2000). http://www.chiark.greenend.org.uk/~sgtatham/coroutines.html

Thielecke, H.: Continuations functions and jumps. SIGACT News 30(2), 33–42 (1999)

Tismer, C.: Continuations and stackless Python. In: Proceedings of the 8th International Python Conference (2000)

Vouillon, J.: Lwt: a cooperative thread library. In: Proceedings of the 2008 ACM SIGPLAN Workshop on ML, ML ’08, pp. 3–12. ACM, New York (2008)

Wadsworth, C.P.: Continuations revisited. High.-Order Symb. Comput. 13(1–2), 131–133 (2000)

Wand, M.: Continuation-based multiprocessing. In: Proceedings of the 1980 ACM Conference on LISP and Functional Programming, LFP ’80, pp. 19–28. ACM, New York (1980)

Welsh, M., Culler, D., Brewer, E.: SEDA: an architecture for well-conditioned, scalable internet services. SIGOPS Oper. Syst. Rev. 35(5), 230–243 (2001)

van Wijngaarden, A.: Recursive definition of syntax and semantics. In: Formal Language Description Languages for Computer Programming, pp. 13–24. North-Holland, Amsterdam (1966)