A formal model for coupling computer based systems and physical