Automatic reconstruction of data types in the decompilation problem

An algorithm for the automatic reconstruction of data types from the assembler code produced by a C compiler is described. The types of the variables that are placed on the stack and in the static memory are reconstructed using an iterative algorithm that uses a lattice over the properties of the data types. The derived data types are reconstructed by constructing the set of possible offsets of the elements of these types (fields in the case of structures and array elements in the case of arrays). This algorithm is used in the tool for decompiling assembler codes into C that is currently developed by the authors.