Compiling With Classical Connectives
Paul Downen, Zena M. Ariola

TL;DR
This paper extends the concept of polarity in computation to include call-by-need evaluation, enabling the compilation of Haskell-like languages with classical connectives and a generalized dual shift framework.
Contribution
It introduces a generalized notion of polarity with four dual shifts to incorporate call-by-need sharing into classical logic-based compilation.
Findings
Extended polarity to include call-by-need with sharing mechanisms
Classical connectives encode a wide range of types and data structures
Bridging parametric polymorphism and data types via involutive negations
Abstract
The study of polarity in computation has revealed that an "ideal" programming language combines both call-by-value and call-by-name evaluation; the two calling conventions are each ideal for half the types in a programming language. But this binary choice leaves out call-by-need which is used in practice to implement lazy-by-default languages like Haskell. We show how the notion of polarity can be extended beyond the value/name dichotomy to include call-by-need by adding a mechanism for sharing which is enough to compile a Haskell-like functional language with user-defined types. The key to capturing sharing in this mixed-evaluation setting is to generalize the usual notion of polarity "shifts:" rather than just two shifts (between positive and negative) we have a family of four dual shifts. We expand on this idea of logical duality -- "and" is dual to "or;" proof is dual to…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Code & Models
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsLogic, programming, and type systems · Logic, Reasoning, and Knowledge · Semantic Web and Ontologies
