Wednesday, April 07, 2010

The design space of continuations

I mentioned earlier that the design space for first-class continuations has a lot of historical research behind it. This list of papers on continuations up to around 2005 is a start, but by no means complete. (The history of continuations is actually pretty astoundingly far-reaching. Apparently my PhD advisor's PhD advisor was one of a number of people who independently discovered continuations in different research programs and under different guises.)

The research literature has been helpful to me in understanding the design space of control operators better, particularly because it gives me good models for reasoning, formally or informally, about control effects.

Here are some of the design questions raised by the research literature and good modeling frameworks. This isn't a complete list, and it isn't the place to cite adequately. All I'm interested in is highlighting some of the takeaways.

How much of the continuation can be captured?

Scheme's call/cc allows you to capture the "whole" continuation, up to wherever the language implementor decides is the limit. But delimited continuations make this boundary more explicit, which has a couple benefits. First, by installing a delimiter, you can prevent code that you call from capturing parts of your continuation that you want to keep private. Second, when you capture a continuation, you have a clearer picture of what you're capturing.

What elements of the continuation are captured?

The answer at first seems obvious: you capture the control context and the environment (aka scope chain). But it gets trickier when you have things like exception handlers and other information associated with the dynamic state of the control context.

What kinds of delimiters do you give to users?

In our case, we're only interested in an implicit delimiter at function boundaries. But there are a number of different designs of control delimiters.

What kinds of control-abort operators do you give to users?

Turns out there's at least one in every C-like language: return. That's probably enough for our purposes. But there are several possibilities there, too, and they can get surprisingly subtle.

Does executing a captured continuation install a new delimiter?

This is the key difference between Felleisen's F/# operators [*] and Danvy and Filinski's shift/reset operators. With the former, you capture a continuation up to the nearest delimiter, but when you invoke the captured continuation, there's no new delimiter. With the latter, a captured continuation reinstalls a new delimiter every time you invoke it.

How many times can you enter a continuation?

The most general design allows a captured continuation to be used any number of times. With "one-shot" continuations, you can only enter a continuation once. Notice that "entering a continuation" could mean a number of things: returning normally, unwinding it by throwing exceptions, or calling into it later via a captured continuation.

When do we abort the current continuation?

This one is really, really variable. There are many plausible points in the semantics where an exit can occur, and many of them lead to plausible but distinct designs.

[*] That's pronounced "eff" and "prompt" -- no relation to F#. I just noticed that!

25 comments:

Jizzy said...

tweakbox
https://tweakboxx.info/tweakbox
https://tweakboxx.info/

Jay Shawn Mendis said...

Thank you for sharing the information. Now I would like to divert you from the topic. We are certified experts in the field of QuickBooks. We provide variety of services to resolve QuickBooks error the user may face while using payroll, inventory, POS, pro, enterprise, company file, single and multiple user mode etc. Your opinion are very interesting, attractive article, so i shared it on my facebook. Promise that a lot of people will enjoy it.
error 1904 quickbooks | write off bad debt in QuickBooks | QuickBooks Error 3371 | QuickBooks Error 15106 | QuickBooks 24/7 Support Phone Number

jorge montiel said...
This comment has been removed by the author.
Alex williams said...

We support all types of HP printer troubleshooting and service. Just enter the model number of your printer in 123.hp.com/setup to identify the software and drivers your printer requires. Download and install it in your mac and 'Run' the file. The process is easy however if you have any doubts or queries regarding HP printers contact us.

malina smith said...

It is perfect time to make some plans for the future and it is time to be happy. I've read this post and if I could I desire to suggest you some interesting things or suggestions. Perhaps you could write next articles referring to this article. I want to read more things about it!
visit@-
mcafee.com/activate |
mcafee.com/activate |
norton.com/setup |
office.com/setup |
norton.com/setup

Unknown said...

As claimed by Stanford Medical, It is really the SINGLE reason women in this country live 10 years longer and weigh 19 kilos less than we do.

(Just so you know, it has totally NOTHING to do with genetics or some hard exercise and really, EVERYTHING around "HOW" they eat.)

BTW, I said "HOW", and not "what"...

TAP this link to find out if this easy quiz can help you decipher your real weight loss potential

Sofia Williams said...

Thanks for sharing such informative blog with us. I must say you are an incredible writer, I love the way that you describe the things. If you want I any personality development consultant than contact us at Training Programs For Employees.

QuickBooks Premier Support said...

Thanks for sharing such an informative post.
QuickBooks sometimes receives Learn how you can fix QuickBooks error code 1311 like a Pro at the time of exporting the financial details to the excel file. We have given the possible solution for how to fix QuickBooks error code 404. You can follow the given steps or contact to QuickBooks premier support team to save your precious time and efforts.
However, at times they face few errors with, QuickBooks Online login problems on Chrome when signing in on the Intuit official website.

Bizz Accounting Solutions said...

Thanks for sharing such an informative post.
We hope you find this article helpful in solving the issues that QuickBooks Banking Error 9995. Also, if you are facing issues even after performing the solutions provided here, you can call our QuickBooks Install Diagnostic Tool at +1(800)-880-6389 and speak to certified experts.

roadrunneremail said...

I really happy found this website eventually. Really informative and inoperative, Thanks for the post and effort! Please keep sharing more such blog.

norton.com/setup

spectrum email login

kaspersky activation

Norton Product Key said...

Wow, What incredible information you have shared through your blog, all information is very important for me to thank you so much admin for sharing such content with us. I have also some links which I am gonna share here. norton.com/setup
www.norton.com/setup, Norton product key

Jack Mosan said...

Quickbooks file doctor is a great product by the company of tech support intuit with the intension to make the tech workers satisfied with the support and service for their systems regarding any kind of problems you face.

Rocky Mosan said...

Quickbooks Tool Hub is the software that allows you to choose a list of QuickBooks tools to use and on the other site, QuickBooks diagnostics tool is the tool that is used to diagnose the files and system.

robert0770 said...

I'm truly dazzled about the information you give in your articles. I should state am exceptionally overpowered by your entire story. It is difficult to get such quality data online these days. I anticipate remaining here for quite a while.

office.com/setup

office.com/setup

mcafee.com/activate

mcafee.com/activate

Joe Smith said...

Download QuickBooks tools hub incorporates a collection of every other QuickBooks tools into one application. It can be used to fix any kind of common errors and issues that shows up randomly while accessing QuickBooks.

Rocky Mosan said...

Get the solution of various QuickBooks errors with the best in the market software especially for Accounting purposes. we are offering you the best and the most important ways to use the QuickBooks tool hub error removal to your system. You can visit here to get the usage of it.

Sam Miller said...

www.canon.com/ijsetup
www.norton.com/setup
solutions.brother.com/windows
Malwarebytes unable to connect to service
virus alert from Microsoft this computer is blocked
avast virus definitions won't update

Sam Miller said...

canon.com/ijsetup
epson connect printer setup utility
www.avg.com/retail
how to install Norton antivirus on Windows 10
how do i reinstall norton 360 without disc
support.brother.com/windows
Canon printer drivers for chromebook

Joro N. said...

192.168.49.1
jiofilocalhtml
live net tv/
iniciarbldaoi/
192.168.100.1
192.168.15.1
toppctips.com

Scott Stayris said...

Quickbooks is the advanced accounting software to manage business-related transactions like Cash Flow Statement, Balance Sheet, track sales and expenses, easily vat and computation. In QuickBooks Online Advanced, you can use the Quickbooks Online Backup and restore the app to save online backups of your accounting data.

Anonymous said...

192.168.1.1
192.168.0.1
192.168.1.254
192.168.2.1
192.168.1.1 zte
10.0.0.1

Mark Watson said...

I’m really impressed with your article, such great & useful knowledge you mentioned here. Thanks for sharing your information.
tp link extender setup

Anonymous said...

MSI Afterburner
Shortcut Snipping Tool
notepad++
ultrasurf
rufus
adwcleaner

mrweb said...

QuickBooks Desktop Tool Hub is the software that allows you to choose a list of QuickBooks tools to use and on the other site, the QuickBooks diagnostics tool is the tool that is used to diagnose the files and system.


Steven Salvatore said...

hp com setup - Get started with New HP printer setup. Download hp smart driver and install. Connect hp printer to wireless using 123.hp.com/setup driver.