secure-software-engineering / phasar

A LLVM-based static analysis framework.
Other
927 stars 140 forks source link

Cleanup FlowFunction Templates #550

Closed fabianbs96 closed 1 year ago

fabianbs96 commented 1 year ago

PhASAR provides a number of predefined templates implementing the FlowFunction interface. These templates are especially useful to quickly define data flows in a clean way. However, these flow function templates are hard to use, hard to find and not documented at all which leads analysis developers not to use them.

This PR comes with the following two contributions:

  1. The flow function templates are rewritten such that they are easier to use and require less boilerplate in the actual analysis definition
  2. The flow function templates are documented with code comments

As a proof of concept, the IDELinearConstantAnalysis has been rewritten to use the new flow function templates.

janniclas commented 1 year ago

I'm happy with the changes from a usability standpoint. However, a final judgement of the improvements can only be done after working with the new structure, but I'm very happy to try it out so I suggest to merge it :-)

@MMory could you review the changes from a technical view point?