goblint / analyzer

Static analysis framework for C
https://goblint.in.tum.de
MIT License
160 stars 72 forks source link

Affine Equalities Mostly Contain Only Small Portions of Actual Information #1459

Open DrMichaelPetter opened 1 month ago

DrMichaelPetter commented 1 month ago

Setting up a post-analysis count of the share of elements in a matrix that are equal to 0, we come to the following histogram:

sparseity

Since we explicitly represent those 0 entries in our current affine-equality array, representation a sparse representation would have some potential for runtime and memory consumption savings.

In former legacy implementations for older analyzers, sparse affine equality implementations where quite successful.

Implementation

Although there is an interface of abstract vectors and matrices are already present in the code, this was not designed with the idea of sparsely represented data in mind. All in all, this is an initial idea of the complications: