Delimited control in OCaml, abstractly and concretely: System description

Research output: Chapter in Book/Report/Conference proceedingConference contributionpeer-review

16 Citations (Scopus)


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.

Original languageEnglish
Title of host publicationFunctional and Logic Programming - 10th International Symposium, FLOPS 2010, Proceedings
Number of pages17
Publication statusPublished - 2010
Event10th International Symposium on Functional and Logic Programming, FLOPS 2010 - Sendai, Japan
Duration: 2010 Apr 192010 Apr 21

Publication series

NameLecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics)
Volume6009 LNCS
ISSN (Print)0302-9743
ISSN (Electronic)1611-3349


Conference10th International Symposium on Functional and Logic Programming, FLOPS 2010


Dive into the research topics of 'Delimited control in OCaml, abstractly and concretely: System description'. Together they form a unique fingerprint.

Cite this