2 min read

Facebook announced yesterday that it’s making SPARTA, a   C++ library of software components that help build high-performance static analyzers, available as open-source yesterday. “This library is part of a broad, long-term vision to expand the use of abstract interpretation in our tools at Facebook. We are open-sourcing SPARTA to provide an industrial-scale abstract interpretation infrastructure for the broader static analysis community to use”, states the Facebook team.

SPARTA is aimed at simplifying the engineering of Abstract Interpretation as its set of software components consist of a simple API. Since building an industrial-grade static analysis tool based on Abstract Interpretation from the very start is difficult, SPARTA is very beneficial.It’s also highly performant and can be assembled easily to build a production-quality static analyzer.

Abstract Interpretation refers to a theory of semantic approximation that provides a foundational framework for the design of static program analyzers. SPARTA works by providing important data structures that are used in virtually every static analyzer. SPARTA encapsulates the complex implementation details of abstract interpretation and hence frees the developer to focus on the main fundamental axes in the design of an analysis.

Other than that, all the static analyzers that are used in the ReDex code optimizer for Android are based on SPARTA’s library. These run on industrial-scale Android apps from Facebook and other large companies that have adopted ReDex.SPARTA makes it possible for these analyses to be expressed concisely and also guarantees high-level performance.

Apart from the performance related benefits, SPARTA also makes it easier to write correct analyses. The algorithms and data structures implemented in SPARTA are also highly generic. It is language-independent; despite its use in ReDex, and contains no Android-specific logic. Also, its algorithms are capable of generalizing across different scopes of static analyses.

“In the future, we could consider adding support for other features, including numerical abstractions or points-to analysis”, states the Facebook team.

For more information, check out the official SPARTA blog post.

Read Next

Uber releases Ludwig, an open source AI toolkit that simplifies training deep learning models for non-experts

Facebook open sources the ELF OpenGo project and retrains the model using reinforcement learning

Google open sources ClusterFuzz, a scalable fuzzing tool