Revisiting Occurrence Typing

07/12/2019
by   Giuseppe Castagna, et al.
0

We revisit occurrence typing, a technique to refine the type of variables occurring in type-cases and, thus, capture some programming patterns used in untyped languages. Although occurrence typing was tied from its inception to set-theoretic types-union types, in particular-it never fully exploited the capabilities of these types. Here we show how, by using set-theoretic types, it is possible to develop a general typing framemork that encompasses and generalizes several aspects of current occurrence typing proposals and that can be applied to tackle other problems such as the inference of intersection types for functions and the optimization of the compilation of gradually typed languages.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
11/05/2021

Programming with union, intersection, and negation types

In this essay, I present the advantages and, I dare say, the beauty of p...
research
02/24/2023

Set-theoretic Types for Erlang

Erlang is a functional programming language with dynamic typing. The lan...
research
10/18/2022

Measure-Theoretic Probability of Complex Co-occurrence and E-Integral

Complex high-dimensional co-occurrence data are increasingly popular fro...
research
07/11/2023

On the Finite Variable-Occurrence Fragment of the Calculus of Relations with Bounded Dot-Dagger Alternation

We introduce the k-variable-occurrence fragment, which is the set of ter...
research
03/06/2013

Inference Algorithms for Similarity Networks

We examine two types of similarity networks each based on a distinct not...
research
10/07/2020

Type checking extracted methods

Many object-oriented dynamic languages allow programmers to extract meth...
research
06/10/2023

The Design Principles of the Elixir Type System

Elixir is a dynamically-typed functional language running on the Erlang ...

Please sign up or login with your details

Forgot password? Click here to reset