Python probabilistic type inference with natural language support

By Zhaogui Xu, X. Zhang, Lin Chen, Kexin Pei, Baowen Xu. 2016

108 citations recorded by the source corpus.

We propose a novel type inference technique for Python programs. Type inference is difficult for Python programs due to their heavy dependence on external APIs and the dynamic language features. We observe that Python source code often contains a lot of type hints such as attribute accesses and variable names. However, such type hints are not reliable. We hence propose to use probabilistic inference to allow the beliefs of individual type hints to be propagated, aggregated, and eventually converge on probabilities of variable types. Our results show that our technique substantially outperforms a state-of-the-art Python type inference engine based on abstract interpretation.

Subfields: Artificial Intelligence, Information Systems, Software, Natural Language Processing, Program Analysis & Verification

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. Luke S. Zettlemoyer
  2. Michael Lewis
  3. Percy Liang
  4. Hannaneh Hajishirzi
  5. Wen-tau Yih
  6. Mohit Bansal
  7. Greg Durrett
  8. Noah A. Smith

In Information Systems

  1. Milod Kazerounian
  2. Jeffrey S. Foster
  3. Georgios Gousios
  4. Satish Chandra
  5. Michael Pradel
  6. Jason Liu
  7. Wen-tau Yih
  8. Brianna M. Ren

In Software

  1. Georgios Gousios
  2. Michael Pradel
  3. Brianna M. Ren
  4. Satish Chandra
  5. Milod Kazerounian
  6. Jason Liu
  7. Amir M. Mir
  8. Eric Wallace

In Natural Language Processing

  1. Luke S. Zettlemoyer
  2. Percy Liang
  3. Wen-tau Yih
  4. Greg Durrett
  5. Michael Lewis
  6. Eric Wallace
  7. Hannaneh Hajishirzi
  8. Mohit Bansal

In Program Analysis & Verification

  1. Milod Kazerounian
  2. Jeffrey S. Foster
  3. Georgios Gousios
  4. Satish Chandra
  5. Jason Liu
  6. Brianna M. Ren
  7. Amir M. Mir
  8. Sebastian Proksch

Citations in the corpus