Evaluation and Synthesis of Self-Monitoring State Machines