Facebook News

Facebook Open-Sources Its bug Detection Tool Infer

Share on Facebook
Tweet about this on TwitterShare on Google+Share on StumbleUponShare on LinkedInPin on PinterestShare on Reddit

To allow developors to detect bugs in a software sets before it is shipped for a public release, Facebook has today announced that it is open-sourcing its debugging tool Infer.

It will result into the better time utilization by developers who would otherwise have to go through tedious process of manually looking into codes for bugs. Peter O’Hearn, Infer’s co-creator says,

It looks at the program and makes guesses or hypotheses about the program, the way a human might, 

But unlike a human, it can read thousands of lines of code in mere minutes to spot potential bugs. Facebook claims that it has a fix rate of about 80 percent, which is great for such an automated system.

Infer is actually a static program analyzer used by Facebook to spot bugs in source code in an automated way by scanning programs without running them and is currently used by Facebook internally to analyze the main Facebook apps for Android and iOS (used by more than a billion people), Facebook Messenger, and Instagram, among others. The analyzer automatically writes comments on source code when it finds potential problems.

Facebook rarely goes into long manual testing process and believes in shipping software as soon as it’s ready. However, this approach is riskier on mobile platforms than on web as in the event of bug detection, a fix can immediately be shipped to servers on the web but people have to update their mobile apps for the bug fix on mobile platform.

By using Infer, programmers can intercept critical bugs before they have shipped to people’s phones, and help prevent crashes or poor performance.

The social network giant procured Infer as part of a deal to acquire “certain assets” of London-based Monoidics back in 2013, with the team joining Facebook in the process.

Infer reports null pointer exceptions and resource leaks in Android and Java code. In addition to this, it reports memory leak problems in iOS and C code. However, Facebook indicated that more is possible as Infer can analyze C projects and Java code that is not Android, and there are plans to further extend its capabilities.

According to the detailed blog post by Facebook which announced this news, Infer works on combination of two novel techniques known as Separation Logic and Bi-Abduction “to find complex problems in modifications to an application built from millions of lines of code, in minutes.”

Essentially, Separation Logic involves separation of memory containing whole code into small independent modules which are processed individually rather than processing entire memory at every step. Bi-Abduction then allows Infer to discover properties about the behavior of these independent parts of the application code and storing those properties between runs.

This allows Infer to analyze only the parts of the software that have changed, reusing the results of its previous analysis where it can, therby reducing the time of debugging to minutes.

By making Infer open source, Facebook has added another item to its already long list of open source projects (it has more than 200 projects on GitHub alone). It recently open-sourced a virtual machine called HipHop VM (HHVM), for executing programs written in PHP that has been used by the Wikimedia Foundation (Wikipedia), Etsy, and Box.

It also released React, a JavaScript library for building user interfaces which is used by the likes of Dropbox, Yahoo, and Adobe. Facebook is not alone in the open-source projects as Microsoft in January this said that it was open-sourcing Worldwide Telescope (WWT), an online computer program that displays outer space using images from the Hubble Space Telescope.

Shortly after, it also acquired Revolution Analytics, a provider of commercial services for open-source project R. Last year, Microsoft revealed it would open-source its software framework .NET and would release it on GitHub.


Add Comment

Click here to post a comment

Your email address will not be published. Required fields are marked *