A Type Checking Algorithm for Higher-rank, Impredicative and Second-order Types

11/13/2017
by   Peng Fu, et al.
0

We study a type checking algorithm that is able to type check a nontrivial subclass of functional programs that use features such as higher-rank, impredicative and second-order types. The only place the algorithm requires type annotation is before each function declaration. We prove the soundness of the type checking algorithm with respect to System F_ω, i.e. if the program is type checked, then the type checker will produce a well-typed annotated System F_ω term. We extend the basic algorithm to handle pattern matching and let-bindings. We implement a prototype type checker and test it on a variety of functional programs.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
09/21/2023

The Undecidability of Third Order Pattern Matching in Calculi with Dependent Types or Type Constructors

We prove the undecidability of the third order pattern matching problem ...
research
09/02/2020

Check Your (Students') Proofs-With Holes

Cyp (Check Your Proofs) (Durner and Noschinski 2013; Traytel 2019) verif...
research
07/02/2018

Shallow Types for Insightful Programs: Grace is Optional, Performance is Not

Languages with explicit dynamic type checking are increasing in populari...
research
08/01/2018

Using Standard Typing Algorithms Incrementally

Modern languages are equipped with static type checking/inference that h...
research
07/01/2019

The Semantics of Rank Polymorphism

Iverson's APL and its descendants (such as J, K and FISh) are examples o...
research
03/16/2022

Gradual Tensor Shape Checking

Tensor shape mismatch is a common source of bugs in deep learning progra...
research
09/12/2019

Which of My Transient Type Checks Are Not (Almost) Free?

One form of type checking used in gradually typed language is transient ...

Please sign up or login with your details

Forgot password? Click here to reset