boolean typechecked = element.getContext().getEnvironment().getTypeChecker().typechecks(element);
if(!typechecked) {
Set<? extends AcmeError> errs = element.getContext().getEnvironment().errorsByAffiliatedObject(element);
for(AcmeError err : errs) {
IAcmeDesignRule rootCause = getRootCause(err);
if (rootCause != null &&
!violatedRules.contains(rootCause)) {
violatedRules.add(rootCause);
}