Lifting Sequential Effects to Control Operators

Gordon, Colin S.

Proceedings of the 34th European Conference on Object-Oriented Programming (ECOOP'20), July 2020, doi: 10.4230/LIPIcs.ECOOP.2020.23

Abstract

Sequential effect systems are a class of effect system that exploits information about program order, rather than discarding it as traditional commutative effect systems do. This extra expressive power allows effect systems to reason about behavior over time, capturing properties such as atomicity, unstructured lock ownership, or even general safety properties. While we now understand the essential denotational (categorical) models fairly well, application of these ideas to real software is hampered by the variety of source level control flow constructs and control operators in real languages. We address this new problem by appeal to a classic idea: macro-expression of commonly-used programming constructs in terms of control operators. We give an effect system for a subset of Racket's tagged delimited control operators, as a lifting of an effect system for a language without direct control operators. This gives the first account of sequential effects in the presence of general control operators. Using this system, we also re-derive the sequential effect system rules for control flow constructs previously shown sound directly, and derive sequential effect rules for new constructs not previously studied in the context of source-level sequential effect systems. This offers a way to directly extend source-level support for sequential effect systems to real programming languages.

Bibtex

@inproceedings{ecoop20b,
  bibtex_show = {true},
  abbr = {ECOOP},
  author = { Gordon, Colin S.},
  title = {{Lifting Sequential Effects to Control Operators}},
  booktitle = {{Proceedings of the 34th European Conference on Object-Oriented Programming
  (ECOOP'20)}},
  doi = {10.4230/LIPIcs.ECOOP.2020.23},
  lipics = {https://drops.dagstuhl.de/opus/volltexte/2020/13180/},
  year = {2020},
  note = "Acceptance rate 41\% (29/71)..",
  month = {July},
  youtube = {https://youtu.be/1JZhmGh39Hw},
  arxiv = {1811.12285},
  pdf = {papers/ecoop20b.pdf},
  address = {{Berlin, Germany}},
  abstract = {
  Sequential effect systems are a class of effect system that exploits information about program order, rather than discarding it as traditional commutative effect systems do.  This extra expressive power allows effect systems to reason about behavior over time, capturing properties such as atomicity, unstructured lock ownership, or even general safety properties.
While we now understand the essential denotational (categorical) models fairly well, application of these ideas to real software is hampered by the variety of source level control flow constructs and control operators in real languages.  

We address this new problem by appeal to a classic idea: macro-expression of commonly-used programming constructs in terms of control operators.
We give an effect system for a subset of Racket's tagged delimited control operators, as a lifting of an effect system for a language without direct control operators.
This gives the first account of sequential effects in the presence of general control operators.
Using this system, we also re-derive the sequential effect system rules for control flow constructs previously shown sound directly, and derive sequential effect rules for new constructs not previously studied in the context of source-level sequential effect systems.
This offers a way to directly extend source-level support for sequential effect systems to real programming languages.
  }
}