  We perform Dirac's canonical analysis for a four-dimensional $BF$ and for a
generalized four-dimensional $BF$ theory depending on a connection valued in
the Lie algebra of SO(3,1). This analysis is developed by considering the
corresponding complete set of variables that define these theories as
dynamical, and we find out the relevant symmetries, the constraints, the
extended Hamiltonian, the extended action, gauge transformations and the
counting of physical degrees of freedom. The results obtained are compared with
other approaches found in the literature.
