Towards Provably Safe and Secure Systems with Contract-Based Design - I part