  We provide a dynamic programming principle for stochastic optimal control
problems with expectation constraints. A weak formulation, using test functions
and a probabilistic relaxation of the constraint, avoids restrictions related
to a measurable selection but still implies the Hamilton-Jacobi-Bellman
equation in the viscosity sense. We treat open state constraints as a special
case of expectation constraints and prove a comparison theorem to obtain the
equation for closed state constraints.
