Thermodynamics of the liquidus and the solidus of binary alloys