Designing with Static Capabilities and Effects

Gordon, Colin S.

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

Abstract

Capabilities (whether object or reference capabilities) are fundamentally tools to restrict effects. Thus static capabilities (object or reference) and effect systems take different technical machinery to the same core problem of statically restricting or reasoning about effects in programs. Any time two approaches can in principle address the same sets of problems, it becomes important to understand the trade-offs between the approaches, how these trade-offs might interact with the problem at hand. Experts who have worked in these areas tend to find the trade-offs somewhat obvious, having considered them in context before. However, this kind of design discussion is often written down only implicitly as comparison between two approaches for a specific program reasoning problem, rather than as a discussion of general trade-offs between general classes of techniques. As a result, it is not uncommon to set out to solve a problem with one technique, only to find the other better-suited. We discuss the trade-offs between static capabilities (specifically reference capabilities) and effect systems, articulating the challenges each approach tends to have in isolation, and how these are sometimes mitigated. We also put our discussion in context, by appealing to examples of how these trade-offs were considered in the course of developing prior systems in the area. Along the way, we highlight how seemingly-minor aspects of type systems -- weakening/framing and the mere existence of type contexts -- play a subtle role in the efficacy of these systems.

Bibtex

@inproceedings{ecoop20a,
  abbr = {ECOOP},
  bibtex_show = {true},
  author = { Gordon, Colin S.},
  title = {{Designing with Static Capabilities and Effects}},
  booktitle = {{Proceedings of the 34th European Conference on Object-Oriented Programming
  (ECOOP'20)}},
  doi = {10.4230/LIPIcs.ECOOP.2020.10},
  year = {2020},
  month = {July},
  lipics = {https://drops.dagstuhl.de/opus/volltexte/2020/13167/},
  note = "Acceptance rate 41\% (29/71)..",
  pdf = {papers/ecoop20a.pdf},
  arxiv = {2005.11444},
  youtube = {https://youtu.be/Q8ycbdIziWA},
  address = {{Berlin, Germany}},
  abstract = {
Capabilities (whether object or reference capabilities) are fundamentally tools to restrict effects. Thus static capabilities (object or reference) and effect systems take different technical machinery to the same core problem of statically restricting or reasoning about effects in programs. Any time two approaches can in principle address the same sets of problems, it becomes important to understand the trade-offs between the approaches, how these trade-offs might interact with the problem at hand.

Experts who have worked in these areas tend to find the trade-offs somewhat obvious, having considered them in context before. However, this kind of design discussion is often written down only implicitly as comparison between two approaches for a specific program reasoning problem, rather than as a discussion of general trade-offs between general classes of techniques. As a result, it is not uncommon to set out to solve a problem with one technique, only to find the other better-suited.

We discuss the trade-offs between static capabilities (specifically reference capabilities) and effect systems, articulating the challenges each approach tends to have in isolation, and how these are sometimes mitigated. We also put our discussion in context, by appealing to examples of how these trade-offs were considered in the course of developing prior systems in the area. Along the way, we highlight how seemingly-minor aspects of type systems -- weakening/framing and the mere existence of type contexts -- play a subtle role in the efficacy of these systems.
  }
}