1. A method for statically analyzing a library comprising: obtaining native method annotations associated with native methods invoked by the library; extracting facts from the library to obtain library facts, wherein the library is written in a first programming language; constructing a type-object lattice; modeling an abstracted heap using the type-object lattice; expressing abstracted heap update operations as heap update rules; constructing, based on the library, a most general application (MGA) for the library; analyzing the library using the native method annotations, the library facts, the MGA, the abstracted heap, and the heap update rules to obtain results; storing the results of the analysis; and performing an action based on the results.