[Paper Review] A Modular Structural Operational Semantics for Delimited Continuations
This paper demonstrates that Modular Structural Operational Semantics (MSOS) can fully express the dynamic semantics of delimited control operators—specifically control, shift, and call/cc—without extending the framework. By using labelled transitions instead of evaluation contexts, the authors provide a modular, concise, and formally equivalent specification that matches established operational semantics, resolving long-standing doubts about MSOS's expressiveness for complex control operators.
It has been an open question as to whether the Modular Structural Operational Semantics framework can express the dynamic semantics of call/cc. This paper shows that it can, and furthermore, demonstrates that it can express the more general delimited control operators control and shift.
Motivation & Objective
- To resolve the open question of whether MSOS can express the dynamic semantics of control operators like call/cc.
- To demonstrate that MSOS can specify the more general control and shift operators without framework extensions.
- To provide a modular, labelled-transition-based operational semantics that avoids the non-modular nature of evaluation context grammars.
- To formally prove equivalence between the proposed MSOS specification and a conventional evaluation context-based semantics.
- To validate the specification through a comprehensive suite of 70 test programs and a prototype interpreter.
Proposed method
- The authors use Implicitly Modular SOS (I-MSOS), a syntactic variant of MSOS, to define the semantics of control, shift, and call/cc using labelled transition rules.
- They define control and shift by reifying the current continuation up to the nearest prompt or reset delimiter, respectively, and replacing the context with a function application.
- The approach avoids evaluation contexts entirely, relying instead on direct transition rules that propagate unmentioned semantic entities implicitly.
- The framework ensures modularity by isolating rules to only the entities they interact with, such as environments or control delimiters.
- Equivalence with evaluation context semantics is formally proven using a reduction-based comparison, establishing semantic correspondence.
- The specification is validated via a test suite of 70 programs derived from the literature, implemented in a Caml Light-like language and executed using a prototype I-MSOS interpreter.
Experimental results
Research questions
- RQ1Can MSOS express the dynamic semantics of call/cc without framework extensions?
- RQ2Is it possible to specify control and shift operators in MSOS using labelled transitions rather than evaluation contexts?
- RQ3Does the resulting MSOS specification preserve the intended behavior of control operators as defined in the literature?
- RQ4How does the modularity of MSOS compare to that of evaluation context-based grammars when adding new control operators?
- RQ5Can a formally equivalent specification be achieved without relying on evaluation contexts, while maintaining conciseness and correctness?
Key findings
- The paper successfully demonstrates that MSOS can express the dynamic semantics of call/cc, control, and shift without requiring any extensions to the framework.
- The proposed MSOS specification using labelled transitions is formally equivalent to a conventional evaluation context-based semantics, as proven in Section 5.
- The specification is modular: rules for control operators do not mention unrelated entities like stores or exception handlers, ensuring independence and maintainability.
- The approach avoids the non-modular nature of evaluation context grammars, which often require large-scale duplication when adding new control operators.
- A test suite of 70 programs, implemented in a Caml Light-like language and executed via a prototype I-MSOS interpreter, confirms that the specification behaves as expected.
- The results resolve a long-standing question about MSOS expressiveness, confirming its suitability for complex control operators in formal semantics.
Better researchstarts right now
From reading papers to final review, dramatically reduce your research time.
No credit card · Free plan available
This review was created by AI and reviewed by human editors.