Implementation parts of the API for programmatic constraint definition.