Accumulate accumulate = new Accumulate( sourcePattern,
sourcePattern.getRequiredDeclarations(),
(Declaration[]) collect.getInnerDeclarations().values().toArray( new Declaration[0] ),
new Accumulator[] { accumulator });
context.setTupleSource( (LeftTupleSource) utils.attachNode( context,
new AccumulateNode( context.getNextId(),
context.getTupleSource(),
context.getObjectSource(),
(AlphaNodeFieldConstraint[]) resultAlphaConstraints.toArray( new AlphaNodeFieldConstraint[resultAlphaConstraints.size()] ),
binder, // source binder
resultBinder,