Knowledge and reference in empirical science