Runtime monitoring of model-based properties, and test case generation