Trust, but Verify: Two-Phase Typing for Dynamic Languages

By Panagiotis Vekris, Benjamin Cosman, Ranjit Jhala. 2015

8 citations recorded by the source corpus.

A key challenge when statically typing so-called dynamic languages is the ubiquity of value-based overloading, where a given function can dynamically reflect upon and behave according to the types of its arguments. Thus, to establish basic types, the analysis must reason precisely about values, but in the presence of higher-order functions and polymorphism, this reasoning itself can require basic types. In this paper we address this chicken-and-egg problem by introducing the framework of two-phased typing. The first “trust” phase performs classical, i.e. flow-, path- and value-insensitive type checking to assign basic types to various program expressions. When the check inevitably runs into “errors” due to value-insensitivity, it wraps problematic expressions with DEAD-casts, which explicate the trust obligations that must be discharged by the second phase. The second phase uses refinement typing, a flow- and path-sensitive analysis, that decorates the first phase’s types with logical predicates to track value relationships and thereby verify the casts and establish other correctness properties for dynamically typed languages.

Subfields: Artificial Intelligence, Computational Theory and Mathematics, Program Analysis & Verification, Software Engineering

How researchers see this paper

The researchers whose trusted networks rank it highest, strongest advocate first. Every researcher gets a different order.

In Artificial Intelligence

  1. Ming-Ho Yee
  2. Arjun Guha
  3. Panagiotis Vekris
  4. Benjamin Cosman
  5. Ranjit Jhala
  6. Anders Møller
  7. Erik Krogh Kristensen
  8. Kenneth L. McMillan

In Computational Theory and Mathematics

  1. Arjun Guha
  2. Ming-Ho Yee
  3. Panagiotis Vekris
  4. Benjamin Cosman
  5. Ranjit Jhala
  6. Kenneth L. McMillan
  7. Anders Møller
  8. Erik Krogh Kristensen

In Program Analysis & Verification

  1. Ming-Ho Yee
  2. Arjun Guha
  3. Panagiotis Vekris
  4. Benjamin Cosman
  5. Ranjit Jhala

In Software Engineering

  1. Ming-Ho Yee
  2. Arjun Guha
  3. Panagiotis Vekris
  4. Ranjit Jhala
  5. Benjamin Cosman
  6. Anders Møller
  7. Erik Krogh Kristensen

Citations in the corpus