Lune

POPL2024Top-tier venue

Ill-Typed Programs Don't Evaluate

Steven Ramsay, Charlie Walpole

Abstract

We introduce two-sided type systems, which are sequent calculi for typing formulas. Two-sided type systems allow for hypothetical reasoning over the typing of compound program expressions, and the refutation of typing formulas. By incorporating a type of all values, these type systems support more refined notions of well-typing and ill-typing, guaranteeing both that well-typed programs don’t go wrong and that ill-typed programs don’t evaluate - that is, reach a value. This makes two-sided type systems suitable for incorrectness reasoning in higher-order program verification, which we illustrate through an application to precise data-flow typing in a language with constructors and pattern matching. Finally, we investigate the internalisation of the meta-level negation in the system as a complement operator on types. This motivates an alternative semantics for the typing judgement, which guarantees that ill-typed programs don’t evaluate, but in which well-typed programs may yet go wrong.

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

  • Concurrent incorrectness separation logic cites Incorrectness logic
  • Trace-Guided Synthesis of Effectful Test Generators cites Incorrectness logic
  • Trace-Guided Synthesis of Effectful Test Generators cites A Complementary Approach to Incorrectness Typing
  • Trace-Guided Synthesis of Effectful Test Generators cites Finding real bugs in big programs with incorrectness logic
  • Trace-Guided Synthesis of Effectful Test Generators cites Outcome Logic: A Unifying Foundation for Correctness and Incorrectness Reasoning
  • A Complementary Approach to Incorrectness Typing cites Concurrent incorrectness separation logic
  • A Complementary Approach to Incorrectness Typing cites MLstruct: principal type inference in a Boolean algebra of structural types
  • A Complementary Approach to Incorrectness Typing cites Incorrectness logic
  • A Complementary Approach to Incorrectness Typing cites Semantic-Type-Guided Bug Finding
  • A Complementary Approach to Incorrectness Typing cites Finding real bugs in big programs with incorrectness logic
  • A Complementary Approach to Incorrectness Typing cites Outcome Logic: A Unifying Foundation for Correctness and Incorrectness Reasoning
  • Semantic-Type-Guided Bug Finding cites Incorrectness logic
  • Semantic-Type-Guided Bug Finding cites Finding real bugs in big programs with incorrectness logic
  • Finding real bugs in big programs with incorrectness logic cites Concurrent incorrectness separation logic
  • Finding real bugs in big programs with incorrectness logic cites Incorrectness logic
  • Outcome Logic: A Unifying Foundation for Correctness and Incorrectness Reasoning cites Concurrent incorrectness separation logic
  • Outcome Logic: A Unifying Foundation for Correctness and Incorrectness Reasoning cites Incorrectness logic
  • Outcome Logic: A Unifying Foundation for Correctness and Incorrectness Reasoning cites Finding real bugs in big programs with incorrectness logic
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers3

  1. A Complementary Approach to Incorrectness TypingCelia Mengyue Li, Sophie Pull, Steven RamsayPOPL 2026 · 2 citations
  2. Semantic-Type-Guided Bug FindingKelvin Qian, Scott F. Smith, Brandon Stride, Shiwei Weng et al.OOPSLA 2024 · 2 citations
  3. Trace-Guided Synthesis of Effectful Test GeneratorsZhe Zhou, Ankush Desai, Benjamin Delaware, Suresh JagannathanPLDI 2026 · 1 citation

Builds on7

  1. Incorrectness logicPeter W. O'HearnPOPL 2020 · 122 citations
  2. Finding real bugs in big programs with incorrectness logicQuang Loc Le, Azalea Raad, Jules Villard, Josh Berdine et al.OOPSLA 2022 · 52 citations
  3. Outcome Logic: A Unifying Foundation for Correctness and Incorrectness ReasoningNoam Zilberstein, Derek Dreyer, Alexandra SilvaOOPSLA 2023 · 39 citations
  4. MLstruct: principal type inference in a Boolean algebra of structural typesLionel Parreaux, Chun Yin ChauOOPSLA 2022 · 31 citations
  5. Concurrent incorrectness separation logicAzalea Raad, Josh Berdine, Derek Dreyer, Peter W. O'HearnPOPL 2022 · 24 citations

Related papers

  1. Mechanized logical relations for termination-insensitive noninterferenceSimon Oddershede Gregersen, Johan Bay, Amin Timany, Lars BirkedalPOPL 2021 · 14 citations
  2. The Essence of Generalized Algebraic Data TypesFilip Sieczkowski, Sergei Stepanenko, Jonathan Sterling, Lars BirkedalPOPL 2024 · 7 citations
  3. A computational interpretation of compact closed categories: reversible programming with negative and fractional typesChao-Hong Chen, Amr SabryPOPL 2021 · 9 citations
  4. Data flow refinement type inferenceZvonimir Pavlinovic, Yusen Su, Thomas WiesPOPL 2021 · 15 citations
  5. The Logic of Intersection SubtypingOlivier LaurentLICS 2026
Dusk over the sea between two cliffs drawn in fine vertical lines