Baltoli / project-docs

Documents for my Part III project
0 stars 0 forks source link

Modular Analysis #15

Closed Baltoli closed 7 years ago

Baltoli commented 7 years ago

Currently the AcquireReleaseCheck structure is quite ad-hoc. Maybe worth investigating how a single static analysis could be split out of it and run generically?

Baltoli commented 7 years ago

A single static analysis will run as a component part of the module pass. This probably means that each one gets at least the module in question, as well as whatever extra stuff it needs to run (e.g. a call graph). The return value of these analyses is probably a boolean, to be interpreted by the calling pass as appropriate.

Baltoli commented 7 years ago

First step should probably be to factor out the call graph analysis into one of these self-contained modules. It will need to be given:

It can then walk the call graph itself and work out if there is any static path to an acquire / release call.

This also means that the stuff about walking the call graph and checking functions etc. can be removed from the pass itself, which will become a dispatcher to several analyses.

Baltoli commented 7 years ago

These analyses should also be responsible for generating an error or warning message when appropriate.