The social network said static analyzers complement traditional dynamic testing by scanning programs without running them, allowing multiple flows to be tested simultaneously, rather than relying solely on individual runs.
Software engineers Cristiano Calcagno and Dino Distefano and engineering manager Peter O’Hearn wrote in a blog post that Facebook currently uses Infer to analyze the social network’s flagship applications for Android and iOS, as well as Messenger, Instagram and other apps.
Calcagno, Distefano and O’Hearn explained the motivation behind open-sourcing Infer:
Facebook likes to move fast by shipping software as soon as it’s ready, rather than after a lengthy manual testing process. This approach is riskier on mobile platforms than on the Web. When a bug is discovered on the Web, a fix can immediately be shipped to servers, but in order for a bug fix to take effect on mobile, people have to update their apps. There is thus added value in catching bugs early, before they are shipped to people’s phones. Combining static analysis with automated tests helps Facebook find crashes and memory leaks before they are shipped, helping us to keep moving fast on mobile.
As for the future, they wrote:
Program verification is an area with an active research community and promising technology. At Facebook, we have a saying that this journey is 1 percent finished. In program verification, certainly, a tremendous amount remains to be done. But with continued progress, we believe there is also much more value that can be unlocked for programmers. We look forward to a future in which, with your help, program-verification technology can prove more and more useful in helping programmers develop reliable code, fast.
Readers: What are your thoughts on the open-sourcing of Facebook Infer?
Image courtesy of Shutterstock.