Currently, the printers NToString, DToString, etc. are pure virtual functions that have to be implemented by each analysis problem. However, the vast majority of all implementations of these functions is exactly the same (delegating to either llvmIRToString() or to operator<<) and independent from the analysis problem instance.
To simplify the usage of these functions as well as to simplify implementations of IDETabulationProblem, these printer functions are now free functions directly within the namespace psr. They now have a useful default implementation and can be easily extended via normal function overloading.
Note: The only painpoint currently is the Typestate Analysis -- the only analysis where LToString really depends on the analysis.
This PR, thus, slightly adapts the l_t type of the TSA to cope with this issue. A better solution is welcome and may come in its own PR.
Currently, the printers
NToString
,DToString
, etc. are pure virtual functions that have to be implemented by each analysis problem. However, the vast majority of all implementations of these functions is exactly the same (delegating to eitherllvmIRToString()
or tooperator<<
) and independent from the analysis problem instance.To simplify the usage of these functions as well as to simplify implementations of
IDETabulationProblem
, these printer functions are now free functions directly within the namespacepsr
. They now have a useful default implementation and can be easily extended via normal function overloading.Note: The only painpoint currently is the Typestate Analysis -- the only analysis where
LToString
really depends on the analysis. This PR, thus, slightly adapts thel_t
type of the TSA to cope with this issue. A better solution is welcome and may come in its own PR.