package documentation

scalpel.typeinfer is provided for automatic type inference to facilitate static analysis for Python programs. The analyser takes a python file or the root folder of a whole package as input, and will output a dictionary of detailed type information for each variable. Type information is essential for many sophisticated static analysis tasks.

Module analysers This module contains a set of helper classes for type inference, e.g. a few ast visitors for extracting data, heuristic functions, etc.
Module classes This module contains a set of data classes.
Module folding Constant folding of expressions. This is an implementation of expression node evaluation. The function serves as an alternative to ast.literal_eval(). For example, 4 + 5 can be constant folded into 9.
Module typeinfer This module is the main module of typeinfer. The module contains a single class named TypeInference which processes files and infer types.
Module utilities Utilities for type inference module