TY - GEN
T1 - Delimited control in OCaml, abstractly and concretely
T2 - 10th International Symposium on Functional and Logic Programming, FLOPS 2010
AU - Kiselyov, Oleg
PY - 2010
Y1 - 2010
N2 - We describe the first implementation of multi-prompt delimited control operators in OCaml that is direct in that it captures only the needed part of the control stack. The implementation is a library that requires no changes to the OCaml compiler or run-time, so it is perfectly compatible with existing OCaml source code and byte-code. The library has been in fruitful practical use for four years. We present the library as an implementation of an abstract machine derived by elaborating the definitional machine. The abstract view lets us distill a minimalistic API, scAPI, sufficient for implementing multiprompt delimited control.We argue that a language system that supports exception and stack-overflow handling supports scAPI. Our library illustrates how to use scAPI to implement multi-prompt delimited control in a typed language. The approach is general and can be used to add multi-prompt delimited control to other existing language systems.
AB - We describe the first implementation of multi-prompt delimited control operators in OCaml that is direct in that it captures only the needed part of the control stack. The implementation is a library that requires no changes to the OCaml compiler or run-time, so it is perfectly compatible with existing OCaml source code and byte-code. The library has been in fruitful practical use for four years. We present the library as an implementation of an abstract machine derived by elaborating the definitional machine. The abstract view lets us distill a minimalistic API, scAPI, sufficient for implementing multiprompt delimited control.We argue that a language system that supports exception and stack-overflow handling supports scAPI. Our library illustrates how to use scAPI to implement multi-prompt delimited control in a typed language. The approach is general and can be used to add multi-prompt delimited control to other existing language systems.
UR - http://www.scopus.com/inward/record.url?scp=78650723721&partnerID=8YFLogxK
UR - http://www.scopus.com/inward/citedby.url?scp=78650723721&partnerID=8YFLogxK
U2 - 10.1007/978-3-642-12251-4_22
DO - 10.1007/978-3-642-12251-4_22
M3 - Conference contribution
AN - SCOPUS:78650723721
SN - 3642122507
SN - 9783642122507
T3 - Lecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics)
SP - 304
EP - 320
BT - Functional and Logic Programming - 10th International Symposium, FLOPS 2010, Proceedings
Y2 - 19 April 2010 through 21 April 2010
ER -