stagedLeftTuples = smem.getFirst().getStagedLeftTuples();
} else {
stagedLeftTuples = null;
}
LeftTupleSinkNode sink = ((LeftTupleSource)node).getSinkPropagator().getFirstLeftTupleSink();
trgTuples = new LeftTupleSets();
if ( NodeTypeEnums.isBetaNode( node ) ) {
BetaNode betaNode = ( BetaNode )node;
BetaMemory bm = null;
AccumulateMemory am = null;
if ( NodeTypeEnums.AccumulateNode == node.getType() ) {
am = (AccumulateMemory) nodeMem;
bm = am.getBetaMemory();
} else {
bm = (BetaMemory) nodeMem;
}
if ( betaNode.isRightInputIsRiaNode() ) {
// if the subnetwork is nested in this segment, it will create srcTuples containing
// peer LeftTuples, suitable for the node in the main path.
srcTuples = doRiaNode( wm,
srcTuples,
betaNode,
bm );
}
switch( node.getType() ) {
case NodeTypeEnums.JoinNode:
pJoinNode.doNode( (JoinNode) node, sink,
bm, wm, srcTuples, trgTuples, stagedLeftTuples );
break;
case NodeTypeEnums.NotNode:
pNotNode.doNode( (NotNode) node, sink,
bm, wm, srcTuples, trgTuples, stagedLeftTuples );
break;
case NodeTypeEnums.ExistsNode:
pExistsNode.doNode( (ExistsNode) node, sink,
bm, wm, srcTuples, trgTuples, stagedLeftTuples );
break;
case NodeTypeEnums.AccumulateNode:
pAccNode.doNode( (AccumulateNode) node, sink,
am, wm, srcTuples, trgTuples, stagedLeftTuples );
break;
}
} else if ( node.getType() == NodeTypeEnums.EvalConditionNode ) {
pEvalNode.doNode( (EvalConditionNode) node, (EvalMemory) nodeMem, sink,
wm, srcTuples, trgTuples, stagedLeftTuples );
} else if ( node.getType() == NodeTypeEnums.FromNode ) {
pFromNode.doNode( (FromNode) node, (FromMemory) nodeMem, sink,
wm, srcTuples, trgTuples, stagedLeftTuples );
} else if (true) {
pBranchNode.doNode( (ConditionalBranchNode) node, (ConditionalBranchMemory) nodeMem, sink,
wm, srcTuples, trgTuples, stagedLeftTuples );
}
if ( node != smem.getTipNode() ) {
// get next node and node memory in the segment
LeftTupleSink nextSink = sink.getNextLeftTupleSinkNode();
if ( nextSink == null ) {
node = sink;
} else {
// there is a nested subnetwork, take out path
node = nextSink;