SPLASH 2023
Sun 22 - Fri 27 October 2023 Cascais, Portugal
Sun 22 Oct 2023 14:30 - 15:00 at Room XV - Session 2 Chair(s): Eric Van Wyk

An important aspect of type checking is name resolution—i.e., determining the types of names by resolving them to a matching declaration. For most languages, we can give typing rules that define name resolution in a way that abstracts from what order different units of code should be checked in. However, implementations of type checkers in practice typically use multiple phases to ensure that declarations of resolvable names are available before names are resolved. This gives rise to a gap between typing rules that abstract from order of type checking and multi-phased type checkers that rely on explicit ordering.

This paper introduces techniques that reduce this gap. First, we introduce a monadic interface for phased name resolution which detects and rejects type checking runs with name resolution phasing errors where names were wrongly resolved because some declarations were not available when they were supposed to be. Second, building on recent work by Gibbons et al., we use applicative functors to compositionally map abstract syntax trees onto (phased) monadic computations that represent typing constraints. These techniques reduce the gap between type checker implementations and typing rules in the sense that (1) both are given by compositional mappings over abstract syntax trees, and (2) type checker cases consist of computations that roughly correspond to typing rule premises, except these are composed using monadic combinators. We demonstrate our approach by implementing type checkers for Mini-ML with Damas-Hindley-Milner type inference, and LM, a toy module language with a challenging import resolution policy.

Sun 22 Oct

Displayed time zone: Lisbon change

14:00 - 15:30
Session 2GPCE at Room XV
Chair(s): Eric Van Wyk Department of Computer Science and Engineering, University of Minnesota, USA
14:00
30m
Talk
A pred-LL(*) Parsable Typed Higher-Order Macro System for Architecture Description Languages
GPCE
Christoph Hochrainer TU Wien, Andreas Krall Vienna University of Technology, Austria
14:30
30m
Talk
A Monadic Framework for Name Resolution in Multi-Phased Type Checkers
GPCE
Casper Bach Poulsen Delft University of Technology, Aron Zwaan Delft University of Technology, Paul Hübner Delft University of Technology
Link to publication DOI Pre-print
15:00
30m
Talk
C2TACO: Lifting Tensor Code to TACO
GPCE
José Wesley De Souza Magalhães University of Edinburgh, Jackson Woodruff University of Edinburgh, Elizabeth Polgreen University of Edinburgh, Michael F. P. O'Boyle University of Edinburgh