added stuff for checking constraints both in the annotated data and in the output of the structured model.