A Model Driven Approach for Developing Software with Runtime Monitoring Capability