Qrates: Analysing Rust Code Corpus
Qrates is a tool for running large scale analyses of Rust code. To be scalable, the process is split into four phases:
- Data extraction.
extractor
is a modified version of the Rust compiler that saves the information about the compiled crate to a file so that it can be easily accessed later. - Database creation. To be able to run queries that span multiple crates, the information from multiple files need to be merged into a single database.
- Queries. The content of the database can be queried by using Rust programs. The procedural macros from Datapond can be used to write fix-point computations in Datalog.
- Query results analysis. Typically, the query results are saved as CSV files so that they can be easily visualized by using data analysis tools such as Pandas.