Crates.io | sparta |
lib.rs | sparta |
version | 0.1.2 |
source | src |
created_at | 2022-08-05 19:13:38.56898 |
updated_at | 2023-05-04 20:37:21.275893 |
description | SPARTA is a library of software components specially designed for building high-performance static analyzers based on the theory of Abstract Interpretation. |
homepage | https://github.com/facebook/sparta |
repository | https://github.com/facebook/sparta |
max_upload_size | |
id | 639519 |
size | 197,735 |
SPARTA is a library of software components specially designed for building high-performance static analyzers based on the theory of Abstract Interpretation.
Abstract Interpretation is a theory of semantic approximation that provides a foundational framework for the design of static program analyzers. Static analyzers built following the methodology of Abstract Interpretation are mathematically sound, i.e., the semantic information they compute is guaranteed to hold in all possible execution contexts considered. Moreover, these analyzers are able to infer complex properties of programs, the expressiveness of which can be finely tuned in order to control the analysis time. Static analyzers based on Abstract Interpretation are routinely used to perform the formal verification of flight software in the aerospace industry, for example.
Building an industrial-grade static analysis tool based on Abstract Interpretation from scratch is a daunting task that requires the attention of experts in the field. The purpose of SPARTA is to drastically simplify the engineering of Abstract Interpretation by providing a set of software components that have a simple API, are highly performant and can be easily assembled to build a production-quality static analyzer. By encapsulating the complex implementation details of Abstract Interpretation, SPARTA lets the tool developer focus on the three fundamental axes in the design of an analysis:
SPARTA is an acronym that stands for Semantics, PARTitioning and Abstraction.
SPARTA for C++ is the analytic engine that powers most optimization passes of the ReDex Android bytecode optimizer. The ReDex codebase contains multiple examples of analyses built with SPARTA that run at industrial scale. The interprocedural constant propagation illustrates how to assemble the building blocks provided by SPARTA in order to implement a sophisticated yet scalable analysis.
SPARTA for Rust is published as a crate on crates.io. It is still in an experimental stage and there's no guarantee that the API won't change. So far, we have reimplemented the basic functions found in the C++ version, namely:
static_asserts
to ensure the user defined type satisfies the quality of an abstract domain. This is no longer necessary in Rust.sparta::graph::Graph
trait. This is analogous to the Graph interface in C++, which uses CRTP for compile-time polymorphism.Issues on GitHub are assigned priorities which reflect their urgency and how soon they are likely to be addressed.
SPARTA is MIT-licensed, see the LICENSE file in the root directory of this source tree.