Sound and Complete Flow Typing with Unions, Intersections and Negations

  • David J. Pearce
Conference paper

DOI: 10.1007/978-3-642-35873-9_21

Volume 7737 of the book series Lecture Notes in Computer Science (LNCS)
Cite this paper as:
Pearce D.J. (2013) Sound and Complete Flow Typing with Unions, Intersections and Negations. In: Giacobazzi R., Berdine J., Mastroeni I. (eds) Verification, Model Checking, and Abstract Interpretation. VMCAI 2013. Lecture Notes in Computer Science, vol 7737. Springer, Berlin, Heidelberg

Abstract

Flow typing is becoming a popular mechanism for typing existing programs written in untyped languages (e.g. JavaScript, Racket, Groovy). Such systems require intersections for the true-branch of a type test, negations for the false-branch, and unions to capture the flow of information at meet points. Type systems involving unions, intersections and negations require a subtype operator which is non-trivial to implement. Frisch et al. demonstrated that this problem was decidable. However, their proof was not constructive and does not lend itself naturally to an implementation. In this paper, we present a sound and complete algorithm for subtype testing in the presence of unions, intersections and negations.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

Copyright information

© Springer-Verlag Berlin Heidelberg 2013

Authors and Affiliations

  • David J. Pearce
    • 1
  1. 1.Victoria University of WellingtonWellingtonNew Zealand