Coexistence of antiferromagnetism and superconductivity in heavy-fermion systems