  Each smooth elliptic Calabi-Yau 4-fold determines both a three-dimensional
physical theory (a compactification of ``M-theory'') and a four-dimensional
physical theory (using the ``F-theory'' construction). A key issue in both
theories is the calculation of the ``superpotential''of the theory. We propose
a systematic approach to identify these divisors, and derive some criteria to
determine whether a given divisor indeed contributes. We then apply our
techniques in explicit examples, in particular, when the base B of the elliptic
fibration is a toric variety or a Fano 3-fold. When B is Fano, we show how
divisors contributing to the superpotential are always "exceptional" (in some
sense) for the Calabi-Yau 4-fold X. This naturally leads to certain transitions
of X, that is birational transformations to a singular model (where the image
of D no longer contributes) as well as certain smoothings of the singular
model. If a smoothing exists, then the Hodge numbers change. We speculate that
divisors contributing to the superpotential are always "exceptional" (in some
sense) for X, also in M-theory. In fact we show that this is a consequence of
the (log)-minimal model algorithm in dimension 4, which is still conjectural in
its generality, but it has been worked out in various cases, among which toric
varieties.
