Provably Correct Runtime Monitoring 1