A Model-Integrated Approach to Designing Self-Protecting Systems