Mathematical framework for recursive model-based system design