Bodden E, Lam P, Hendren L. Partially Evaluating Finite-State Runtime Monitors Ahead of Time. ACM Transactions on Programming Languages and Systems. 2012;34(2):1-52. doi:10.1145/2220365.2220366