author: Michael Hannema
title: Using Continuations to express Control Logic
keywords:
topics: Software Technology
committee: Steven te Brinke
end: June 2014

Description

Software Composition is the combination of different software components to achieve a larger, aggregated, whole. This can be achieved by (a combination of) merging source code, by expressing combined data structures, or by defining specific semantics for the flow of control between (statements of) different modules. Examples of the latter are subroutine calls, asynchronous events, exception handling and advice in aspect-oriented programming.

The goal of this assignment is to investigate how the presence of (first class) continuations [2] in a programming language (possibly as a library) can be used to express many different (control-related) compositions.

Motivation

Having a generic mechanism that is able to express a wide range of programming (composition) language behavior, (1) helps to beter understand programming language mechanisms and their differences, (2) is a step towards programming (languages) that are based on a very simple core langauge, but still able to cater with the variety of language mechanisms that different applications and domains request. An example of the latter is Co-op [1].

List of Tasks

  • literature study on continuations
  • (literature) study on the possible application of continuations for a wide range of control behavior, as well as its limitations
  • using any suitable language that supports continuations (e.g. Ruby, javaScript, Scala), demonstrate the feasibility of a number of such applications
  • examine the boundaries of the possibilities: what are the limitations of continuations for expressing control logic.

References

  1. co-op.sf.net (esp. Co-op documentation page)
  2. Continuation in Wikipedia

Additional Resources

  1. The paper