
TL;DR
This paper introduces a type system that is evaluation-order agnostic, allowing code to be polymorphic over evaluation order, and provides a formal framework and proofs for its soundness and correctness.
Contribution
It develops an impartial type system for evaluation order polymorphism, including encoding, elaboration, and correctness proofs, enabling flexible evaluation strategies without code duplication.
Findings
Type system supports polymorphism over evaluation order.
Encoding into a more economical type system is straightforward.
Elaboration preserves well-typedness and evaluation semantics.
Abstract
We classify programming languages according to evaluation order: each language fixes one evaluation order as the default, making it transparent to program in that evaluation order, and troublesome to program in the other. This paper develops a type system that is impartial with respect to evaluation order. Evaluation order is implicit in terms, and explicit in types, with by-value and by-name versions of type connectives. A form of intersection type quantifies over evaluation orders, describing code that is agnostic over (that is, polymorphic in) evaluation order. By allowing such generic code, programs can express the by-value and by-name versions of a computation without code duplication. We also formulate a type system that only has by-value connectives, plus a type that generalizes the difference between by-value and by-name connectives: it is either a suspension (by name) or a…
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.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
