Interface Control and Software Engineering: A formal approach