A microscopic theory of binary alloy phase equilibrium