Theory Of Alloy Phase Formation