Lune

POPL2021Top-tier venue

A computational interpretation of compact closed categories: reversible programming with negative and fractional types

Chao-Hong Chen, Amr Sabry

Abstract

Compact closed categories include objects representing higher-order functions and are well-established as models of linear logic, concurrency, and quantum computing. We show that it is possible to construct such compact closed categories for conventional sum and product types by defining a dual to sum types, a negative type, and a dual to product types, a fractional type. Inspired by the categorical semantics, we define a sound operational semantics for negative and fractional types in which a negative type represents a computational effect that reverses execution flow'' and a fractional type represents a computational effect that garbage collects'' particular values or throws exceptions. Specifically, we extend a first-order reversible language of type isomorphisms with negative and fractional types, specify an operational semantics for each extension, and prove that each extension forms a compact closed category. We furthermore show that both operational semantics can be merged using the standard combination of backtracking and exceptions resulting in a smooth interoperability of negative and fractional types. We illustrate the expressiveness of this combination by writing a reversible SAT solver that uses backtracking search along freshly allocated and de-allocated locations. The operational semantics, most of its meta-theoretic properties, and all examples are formalized in a supplementary Agda package.

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

3 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • The Relational Machine Calculus cites Symmetries in reversible programming: from symmetric rig groupoids to reversible programming languages
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers3

  1. Symmetries in reversible programming: from symmetric rig groupoids to reversible programming languagesVikraman Choudhury, Jacek Karwowski, Amr SabryPOPL 2022 · 10 citations
  2. Quantum information effectsChris Heunen, Robin KaarsgaardPOPL 2022 · 1 citation
  3. The Relational Machine CalculusChris Barrett, Daniel Castle, Willem HeijltjesLICS 2024 · 1 citation

Related papers

  1. Classical Notions of Computation and the Hasegawa-Thielecke TheoremÉléonore Mangel, Paul-André Melliès, Guillaume Munch-MaccagnoniPOPL 2026
  2. Soundly Handling LinearityWenhao Tang, Daniel Hillerström, Sam Lindley, J. Garrett MorrisPOPL 2024 · 8 citations
  3. The Duality of λ-AbstractionVikraman Choudhury, Simon J. GayPOPL 2025 · 2 citations
  4. Eliminating Reversals from Cubical Type TheoriesEvan Cavallo, Christian SattlerLICS 2026
  5. A relational theory of effects and coeffectsUgo Dal Lago, Francesco GavazzoPOPL 2022 · 22 citations
Dusk over the sea between two cliffs drawn in fine vertical lines