Constructing Binary and Ternary Phase Diagrams on the Basis of Phase Stability Analysis