  We discuss (2+1)-dimensional gapless surface theories of bulk
(3+1)-dimensional topological phases, such as the BF theory at level
$\mathrm{K}$, and its generalization. In particular, we put these theories on a
flat (2+1) dimensional torus $T^3$ parameterized by its modular parameters, and
compute the partition functions obeying various twisted boundary conditions. We
show the partition functions are transformed into each other under
$SL(3,\mathbb{Z})$ modular transformations, and furthermore establish the
bulk-boundary correspondence in (3+1) dimensions by matching the modular
$\mathcal{S}$ and $\mathcal{T}$ matrices computed from the boundary field
theories with those computed in the bulk. We also propose the three-loop
braiding statistics can be studied by constructing the modular $\mathcal{S}$
and $\mathcal{T}$ matrices from an appropriate boundary field theory.
