  The presence of a point defect typically breaks the stoichiometry in a
semiconductor. For example, a vacancy on an A-site in an AB compound makes the
crystal B-rich. As the stoichiometry changes, so do the chemical potentials.
While the prevalent first-principles methods have provided significant insight
into characters of point defects in a transparent manner, the crucial
connection between crystal stoichiometry and chemical potentials is usually not
made. However, ad hoc choices for chemical potentials can lead to nonphysical
negative formation energies in some Fermi level ranges, along with questions
about charge balance. Herein, we formulate a canonical framework describing how
the chemical potential of each element is directly linked to the composition of
the crystal under (off-)stoichiometric conditions instead of the ad hoc
assumption that the chemical potential is the elemental limit under a certain
growth condition. Consequently, the chemical potential changes with the Fermi
level within the band gap, and the formation energies are positive. Using such
an approach, we present $ab$ $initio$ results for native point defects in BAs,
a semiconductor with ultra-high room temperature thermal conductivity. We find
that antisites are the constitutional defects in off-stoichiometric material,
while B$_\mathrm{As}$ antisites and B vacancies dominate in the stoichiometric
material. We further discuss the thermodynamic equilibrium and charge
neutrality point in BAs in light of our stoichiometry-determined chemical
potentials. As discussed, our work offers a more applicable and accessible
approach to tackle defect formation energies in semiconductors, especially the
ones with wide gap where negative formation energies are commonly seen.
