Optimizing Monitor Code Based on Patterns in Runtime Verification | IEEE Conference Publication | IEEE Xplore