if( constraint instanceof VariableConstraint ) {
// variable constraints always require a single declaration
Declaration target = constraint.getRequiredDeclarations()[0];
if( target.isPatternDeclaration() && target.getPattern().getObjectType().isEvent() ) {
long uplimit = ((VariableConstraint) constraint).getInterval().getUpperBound();
Duration dur = context.getRule().getDuration();
Duration newDur = new FixedDuration( uplimit );
if( dur instanceof CompositeMaxDuration ) {
((CompositeMaxDuration)dur).addDuration( newDur );
} else {
if( dur == null ) {
dur = newDur;