Search in sources :

Example 6 with Tuple

use of org.drools.core.spi.Tuple in project drools by kiegroup.

the class LeftTupleIterator method getNextLeftTuple.

public LeftTuple getNextLeftTuple(LeftTupleSource source, LeftTupleSink sink, LeftTuple leftTuple, InternalWorkingMemory wm) {
    if (otnIterator != null) {
        LeftTuple leftParent = leftTuple.getLeftParent();
        while (leftTuple != null) {
            leftTuple = leftTuple.getHandleNext();
            for (; leftTuple != null; leftTuple = leftTuple.getHandleNext()) {
                // Iterate to find the next left tuple for this sink, skip tuples for other sinks due to sharing split
                if (leftTuple.getTupleSink() == sink) {
                    return leftTuple;
                }
            }
        }
        // We have a parent LeftTuple so try there next
        if (leftParent != null) {
            // we know it has to be evalNode query element node
            while (leftParent != null) {
                leftParent = getNextLeftTuple(source.getLeftTupleSource(), (LeftTupleSink) source, leftParent, wm);
                if (leftParent != null) {
                    for (leftTuple = leftParent.getFirstChild(); leftTuple != null; leftTuple = leftTuple.getHandleNext()) {
                        if (leftTuple.getTupleSink() == sink) {
                            return leftTuple;
                        }
                    }
                }
            }
            return null;
        }
        // We have exhausted the current FactHandle, now try the next
        while (otnIterator.hasNext()) {
            InternalFactHandle handle = otnIterator.next();
            leftTuple = handle.findFirstLeftTuple(lt -> lt.getTupleSink() == sink);
            if (leftTuple != null) {
                return leftTuple;
            }
        }
        // We've exhausted this OTN so set the iterator to null
        otnIterator = null;
    } else if (source instanceof AccumulateNode) {
        // when using phreak, accumulate result tuples will not link to leftParent, but to parent instead
        BetaMemory memory = ((AccumulateMemory) wm.getNodeMemory((MemoryFactory) source)).getBetaMemory();
        FastIterator localIt = memory.getLeftTupleMemory().fullFastIterator(leftTuple.getParent());
        LeftTuple childLeftTuple = leftTuple;
        leftTuple = childLeftTuple.getParent();
        while (leftTuple != null) {
            if (childLeftTuple == null) {
                childLeftTuple = leftTuple.getFirstChild();
            } else {
                childLeftTuple = childLeftTuple.getHandleNext();
            }
            for (; childLeftTuple != null; childLeftTuple = childLeftTuple.getHandleNext()) {
                if (childLeftTuple.getTupleSink() == sink) {
                    return childLeftTuple;
                }
            }
            leftTuple = (LeftTuple) localIt.next(leftTuple);
        }
    } else if (source instanceof JoinNode || source instanceof NotNode || source instanceof FromNode || source instanceof AccumulateNode) {
        BetaMemory memory;
        FastIterator localIt;
        if (source instanceof FromNode) {
            memory = ((FromMemory) wm.getNodeMemory((MemoryFactory) source)).getBetaMemory();
        } else if (source instanceof AccumulateNode) {
            memory = ((AccumulateMemory) wm.getNodeMemory((MemoryFactory) source)).getBetaMemory();
        } else {
            memory = (BetaMemory) wm.getNodeMemory((MemoryFactory) source);
        }
        localIt = memory.getLeftTupleMemory().fullFastIterator(leftTuple.getLeftParent());
        LeftTuple childLeftTuple = leftTuple;
        leftTuple = childLeftTuple.getLeftParent();
        while (leftTuple != null) {
            if (childLeftTuple == null) {
                childLeftTuple = leftTuple.getFirstChild();
            } else {
                childLeftTuple = childLeftTuple.getHandleNext();
            }
            for (; childLeftTuple != null; childLeftTuple = childLeftTuple.getHandleNext()) {
                if (childLeftTuple.getTupleSink() == sink) {
                    return childLeftTuple;
                }
            }
            leftTuple = (LeftTuple) localIt.next(leftTuple);
        }
    }
    if (source instanceof ExistsNode) {
        BetaMemory memory = (BetaMemory) wm.getNodeMemory((MemoryFactory) source);
        RightTuple rightTuple = leftTuple.getLeftParent().getBlocker();
        FastIterator localIt = memory.getRightTupleMemory().fullFastIterator(rightTuple);
        for (LeftTuple childleftTuple = leftTuple.getHandleNext(); childleftTuple != null; childleftTuple = childleftTuple.getHandleNext()) {
            if (childleftTuple.getTupleSink() == sink) {
                return childleftTuple;
            }
        }
        leftTuple = leftTuple.getLeftParent();
        // now move onto next RightTuple
        while (rightTuple != null) {
            if (rightTuple.getBlocked() != null) {
                if (leftTuple != null) {
                    leftTuple = leftTuple.getBlockedNext();
                } else {
                    leftTuple = rightTuple.getBlocked();
                }
                for (; leftTuple != null; leftTuple = leftTuple.getBlockedNext()) {
                    for (LeftTuple childleftTuple = leftTuple.getFirstChild(); childleftTuple != null; childleftTuple = childleftTuple.getHandleNext()) {
                        if (childleftTuple.getTupleSink() == sink) {
                            return childleftTuple;
                        }
                    }
                }
            }
            rightTuple = (RightTuple) localIt.next(rightTuple);
        }
    } else if (source instanceof EvalConditionNode || source instanceof QueryElementNode) {
        LeftTuple childLeftTuple = leftTuple;
        if (leftTuple != null) {
            leftTuple = leftTuple.getLeftParent();
            while (leftTuple != null) {
                if (childLeftTuple != null) {
                    childLeftTuple = childLeftTuple.getHandleNext();
                } else {
                    childLeftTuple = leftTuple.getFirstChild();
                }
                for (; childLeftTuple != null; childLeftTuple = childLeftTuple.getHandleNext()) {
                    if (childLeftTuple.getTupleSink() == sink) {
                        return childLeftTuple;
                    }
                }
                if (source instanceof EvalConditionNode) {
                    leftTuple = getNextLeftTuple(source.getLeftTupleSource(), (LeftTupleSink) source, leftTuple, wm);
                } else {
                    leftTuple = getNextLeftTuple(source.getLeftTupleSource(), (LeftTupleSink) source, leftTuple, wm);
                }
            }
        }
    }
    return null;
}
Also used : NotNode(org.drools.core.reteoo.NotNode) ExistsNode(org.drools.core.reteoo.ExistsNode) EvalConditionNode(org.drools.core.reteoo.EvalConditionNode) FastIterator(org.drools.core.util.FastIterator) AccumulateNode(org.drools.core.reteoo.AccumulateNode) AccumulateContext(org.drools.core.reteoo.AccumulateNode.AccumulateContext) BetaMemory(org.drools.core.reteoo.BetaMemory) JoinNode(org.drools.core.reteoo.JoinNode) FromNode(org.drools.core.reteoo.FromNode) LeftTuple(org.drools.core.reteoo.LeftTuple) RightTuple(org.drools.core.reteoo.RightTuple) LeftInputAdapterNode(org.drools.core.reteoo.LeftInputAdapterNode) QueryElementNode(org.drools.core.reteoo.QueryElementNode) Tuple(org.drools.core.spi.Tuple) BetaNode(org.drools.core.reteoo.BetaNode) AccumulateMemory(org.drools.core.reteoo.AccumulateNode.AccumulateMemory) FromMemory(org.drools.core.reteoo.FromNode.FromMemory) ObjectSource(org.drools.core.reteoo.ObjectSource) LeftTupleSink(org.drools.core.reteoo.LeftTupleSink) ObjectTypeNode(org.drools.core.reteoo.ObjectTypeNode) Iterator(org.drools.core.util.Iterator) LeftTupleSource(org.drools.core.reteoo.LeftTupleSource) AccumulateMemory(org.drools.core.reteoo.AccumulateNode.AccumulateMemory) NotNode(org.drools.core.reteoo.NotNode) EvalConditionNode(org.drools.core.reteoo.EvalConditionNode) AccumulateNode(org.drools.core.reteoo.AccumulateNode) JoinNode(org.drools.core.reteoo.JoinNode) QueryElementNode(org.drools.core.reteoo.QueryElementNode) LeftTupleSink(org.drools.core.reteoo.LeftTupleSink) BetaMemory(org.drools.core.reteoo.BetaMemory) FromNode(org.drools.core.reteoo.FromNode) LeftTuple(org.drools.core.reteoo.LeftTuple) ExistsNode(org.drools.core.reteoo.ExistsNode) RightTuple(org.drools.core.reteoo.RightTuple) FastIterator(org.drools.core.util.FastIterator)

Example 7 with Tuple

use of org.drools.core.spi.Tuple in project drools by kiegroup.

the class PhreakActivationIterator method processLeftTuples.

public static void processLeftTuples(LeftTupleSource node, List<AgendaItem> agendaItems, Set<RuleTerminalNode> nodeSet, InternalWorkingMemory wm) {
    LeftTupleSource node1 = node;
    while (NodeTypeEnums.LeftInputAdapterNode != node1.getType()) {
        node1 = node1.getLeftTupleSource();
    }
    int maxShareCount = node1.getAssociationsSize();
    while (NodeTypeEnums.LeftInputAdapterNode != node.getType()) {
        Memory memory = wm.getNodeMemory((MemoryFactory) node);
        if (memory.getSegmentMemory() == null) {
            // segment has never been initialized, which means the rule has never been linked.
            return;
        }
        if (node.getAssociationsSize() == maxShareCount) {
            // the recurse must start from the first split node, otherwise we get partial overlaps in propagations
            if (NodeTypeEnums.isBetaNode(node)) {
                BetaMemory bm;
                if (NodeTypeEnums.AccumulateNode == node.getType()) {
                    AccumulateMemory am = (AccumulateMemory) memory;
                    bm = am.getBetaMemory();
                    FastIterator it = bm.getLeftTupleMemory().fullFastIterator();
                    Tuple lt = BetaNode.getFirstTuple(bm.getLeftTupleMemory(), it);
                    for (; lt != null; lt = (LeftTuple) it.next(lt)) {
                        AccumulateContext accctx = (AccumulateContext) lt.getContextObject();
                        collectFromPeers(accctx.getResultLeftTuple(), agendaItems, nodeSet, wm);
                    }
                } else if (NodeTypeEnums.ExistsNode == node.getType()) {
                    bm = (BetaMemory) wm.getNodeMemory((MemoryFactory) node);
                    // done off the RightTupleMemory, as exists only have unblocked tuples on the left side
                    FastIterator it = bm.getRightTupleMemory().fullFastIterator();
                    RightTuple rt = (RightTuple) BetaNode.getFirstTuple(bm.getRightTupleMemory(), it);
                    for (; rt != null; rt = (RightTuple) it.next(rt)) {
                        for (LeftTuple lt = rt.getBlocked(); lt != null; lt = lt.getBlockedNext()) {
                            if (lt.getFirstChild() != null) {
                                collectFromPeers(lt.getFirstChild(), agendaItems, nodeSet, wm);
                            }
                        }
                    }
                } else {
                    bm = (BetaMemory) wm.getNodeMemory((MemoryFactory) node);
                    FastIterator it = bm.getLeftTupleMemory().fullFastIterator();
                    Tuple lt = BetaNode.getFirstTuple(bm.getLeftTupleMemory(), it);
                    for (; lt != null; lt = (LeftTuple) it.next(lt)) {
                        if (lt.getFirstChild() != null) {
                            collectFromLeftInput(lt.getFirstChild(), agendaItems, nodeSet, wm);
                        }
                    }
                }
                return;
            } else if (NodeTypeEnums.FromNode == node.getType()) {
                FromMemory fm = (FromMemory) wm.getNodeMemory((MemoryFactory) node);
                TupleMemory ltm = fm.getBetaMemory().getLeftTupleMemory();
                FastIterator it = ltm.fullFastIterator();
                for (LeftTuple lt = (LeftTuple) ltm.getFirst(null); lt != null; lt = (LeftTuple) it.next(lt)) {
                    if (lt.getFirstChild() != null) {
                        collectFromLeftInput(lt.getFirstChild(), agendaItems, nodeSet, wm);
                    }
                }
                return;
            }
        }
        node = node.getLeftTupleSource();
    }
    // No beta or from nodes, so must retrieve LeftTuples from the LiaNode.
    // This is done by scanning all the LeftTuples referenced from the FactHandles in the ObjectTypeNode
    LeftInputAdapterNode lian = (LeftInputAdapterNode) node;
    Memory memory = wm.getNodeMemory((MemoryFactory) node);
    if (memory.getSegmentMemory() == null) {
        // segment has never been initialized, which means the rule has never been linked.
        return;
    }
    ObjectSource os = lian.getObjectSource();
    while (os.getType() != NodeTypeEnums.ObjectTypeNode) {
        os = os.getParentObjectSource();
    }
    ObjectTypeNode otn = (ObjectTypeNode) os;
    final ObjectTypeNodeMemory omem = wm.getNodeMemory(otn);
    LeftTupleSink firstLiaSink = lian.getSinkPropagator().getFirstLeftTupleSink();
    java.util.Iterator<InternalFactHandle> it = omem.iterator();
    while (it.hasNext()) {
        InternalFactHandle fh = it.next();
        fh.forEachLeftTuple(lt -> {
            if (lt.getTupleSink() == firstLiaSink) {
                collectFromLeftInput(lt, agendaItems, nodeSet, wm);
            }
        });
    }
}
Also used : AccumulateMemory(org.drools.core.reteoo.AccumulateNode.AccumulateMemory) TupleMemory(org.drools.core.reteoo.TupleMemory) BetaMemory(org.drools.core.reteoo.BetaMemory) FromMemory(org.drools.core.reteoo.FromNode.FromMemory) ObjectTypeNodeMemory(org.drools.core.reteoo.ObjectTypeNode.ObjectTypeNodeMemory) AccumulateMemory(org.drools.core.reteoo.AccumulateNode.AccumulateMemory) ObjectTypeNode(org.drools.core.reteoo.ObjectTypeNode) LeftTupleSink(org.drools.core.reteoo.LeftTupleSink) BetaMemory(org.drools.core.reteoo.BetaMemory) RightTuple(org.drools.core.reteoo.RightTuple) LeftTuple(org.drools.core.reteoo.LeftTuple) WorkingMemoryEntryPoint(org.drools.core.WorkingMemoryEntryPoint) TupleMemory(org.drools.core.reteoo.TupleMemory) ObjectTypeNodeMemory(org.drools.core.reteoo.ObjectTypeNode.ObjectTypeNodeMemory) LeftTupleSource(org.drools.core.reteoo.LeftTupleSource) FromMemory(org.drools.core.reteoo.FromNode.FromMemory) ObjectSource(org.drools.core.reteoo.ObjectSource) FastIterator(org.drools.core.util.FastIterator) LeftTuple(org.drools.core.reteoo.LeftTuple) RightTuple(org.drools.core.reteoo.RightTuple) Tuple(org.drools.core.spi.Tuple) AccumulateContext(org.drools.core.reteoo.AccumulateNode.AccumulateContext) LeftInputAdapterNode(org.drools.core.reteoo.LeftInputAdapterNode)

Example 8 with Tuple

use of org.drools.core.spi.Tuple in project drools by kiegroup.

the class TupleStartEqualsConstraint method isAllowedCachedLeft.

public boolean isAllowedCachedLeft(final ContextEntry context, final InternalFactHandle handle) {
    // object MUST be a ReteTuple
    int size = ((TupleStartEqualsConstraintContextEntry) context).compareSize;
    final Tuple tuple = ((Tuple) handle.getObject()).getSubTuple(size);
    return ((TupleStartEqualsConstraintContextEntry) context).tuple.getSubTuple(size).equals(tuple);
}
Also used : BetaNodeFieldConstraint(org.drools.core.spi.BetaNodeFieldConstraint) Tuple(org.drools.core.spi.Tuple) LeftTuple(org.drools.core.reteoo.LeftTuple)

Example 9 with Tuple

use of org.drools.core.spi.Tuple in project drools by kiegroup.

the class Scenario method equalsLeftMemory.

public void equalsLeftMemory(List<LeftTuple> leftTuples) {
    TupleMemory ltm = bm.getLeftTupleMemory();
    int length = 0;
    for (LeftTuple expectedLeftTuple : leftTuples) {
        FastIterator it = betaNode.getLeftIterator(ltm);
        Tuple actualLeftTuple = null;
        for (actualLeftTuple = BetaNode.getFirstTuple(ltm, it); actualLeftTuple != null; actualLeftTuple = (LeftTuple) it.next(actualLeftTuple)) {
            if (expectedLeftTuple.equals(actualLeftTuple)) {
                length++;
                break;
            }
        }
        if (actualLeftTuple == null) {
            fail("Could not find LeftTuple: " + expectedLeftTuple);
        }
    }
    if (leftTuples.size() != ltm.size()) {
        fail("LeftTuple memory size did not match: " + length);
    }
}
Also used : FastIterator(org.drools.core.util.FastIterator) LeftTuple(org.drools.core.reteoo.LeftTuple) TupleMemory(org.drools.core.reteoo.TupleMemory) LeftTuple(org.drools.core.reteoo.LeftTuple) RightTuple(org.drools.core.reteoo.RightTuple) Tuple(org.drools.core.spi.Tuple)

Example 10 with Tuple

use of org.drools.core.spi.Tuple in project drools by kiegroup.

the class ASMConsequenceBuilder method createConsequenceBytecode.

protected byte[] createConsequenceBytecode(RuleBuildContext ruleContext, final Map<String, Object> consequenceContext) {
    final InvokerDataProvider data = new InvokerContext(consequenceContext);
    final String name = (String) consequenceContext.get("consequenceName");
    final Declaration[] declarations = (Declaration[]) consequenceContext.get("declarations");
    final ClassGenerator generator = InvokerGenerator.createInvokerClassGenerator(data, ruleContext).setInterfaces(Consequence.class, CompiledInvoker.class);
    generator.addMethod(ACC_PUBLIC, "getName", generator.methodDescr(String.class), new ClassGenerator.MethodBody() {

        public void body(MethodVisitor mv) {
            push(name);
            mv.visitInsn(ARETURN);
        }
    }).addMethod(ACC_PUBLIC, "evaluate", generator.methodDescr(null, KnowledgeHelper.class, WorkingMemory.class), new String[] { "java/lang/Exception" }, new GeneratorHelper.EvaluateMethod() {

        public void body(MethodVisitor mv) {
            // Tuple tuple = knowledgeHelper.getTuple();
            mv.visitVarInsn(ALOAD, 1);
            invokeInterface(KnowledgeHelper.class, "getTuple", Tuple.class);
            mv.visitVarInsn(ASTORE, 3);
            // Declaration[] declarations = ((RuleTerminalNode)knowledgeHelper.getMatch().getTuple().getTupleSink()).getDeclarations();
            mv.visitVarInsn(ALOAD, 1);
            invokeInterface(KnowledgeHelper.class, "getMatch", Activation.class);
            invokeInterface(Activation.class, "getTuple", Tuple.class);
            invokeInterface(Tuple.class, "getTupleSink", Sink.class);
            cast(RuleTerminalNode.class);
            invokeVirtual(RuleTerminalNode.class, "getRequiredDeclarations", Declaration[].class);
            mv.visitVarInsn(ASTORE, 4);
            final String[] globals = data.getGlobals();
            final String[] globalTypes = data.getGlobalTypes();
            final Boolean[] notPatterns = (Boolean[]) consequenceContext.get("notPatterns");
            int[] paramsPos = new int[declarations.length];
            int offset = 5;
            for (int i = 0; i < declarations.length; i++) {
                int factPos = offset;
                int objPos = ++offset;
                paramsPos[i] = factPos;
                // Object obj[i] = tuple.get(declarations[i]);
                // org.kie.spi.Tuple
                mv.visitVarInsn(ALOAD, 3);
                // org.kie.rule.Declaration[]
                mv.visitVarInsn(ALOAD, 4);
                // i
                push(i);
                // declarations[i]
                mv.visitInsn(AALOAD);
                invokeInterface(Tuple.class, "get", InternalFactHandle.class, Declaration.class);
                // fact[i]
                mv.visitVarInsn(ASTORE, factPos);
                // declarations[i].getValue((org.kie.common.InternalWorkingMemory)workingMemory, obj[i] );
                // org.kie.rule.Declaration[]
                mv.visitVarInsn(ALOAD, 4);
                // i
                push(i);
                // declarations[i]
                mv.visitInsn(AALOAD);
                // WorkingMemory
                mv.visitVarInsn(ALOAD, 2);
                cast(InternalWorkingMemory.class);
                // fact[i]
                mv.visitVarInsn(ALOAD, factPos);
                invokeInterface(InternalFactHandle.class, "getObject", Object.class);
                String readMethod = declarations[i].getNativeReadMethodName();
                boolean isObject = readMethod.equals("getValue");
                String returnedType = isObject ? "Ljava/lang/Object;" : typeDescr(declarations[i].getTypeName());
                mv.visitMethodInsn(INVOKEVIRTUAL, Declaration.class.getName().replace('.', '/'), readMethod, "(L" + InternalWorkingMemory.class.getName().replace('.', '/') + ";Ljava/lang/Object;)" + returnedType);
                if (isObject)
                    mv.visitTypeInsn(CHECKCAST, internalName(declarations[i].getTypeName()));
                // obj[i]
                offset += store(objPos, declarations[i].getTypeName());
                if (notPatterns[i]) {
                    mv.visitVarInsn(ALOAD, 1);
                    invokeInterface(KnowledgeHelper.class, "getWorkingMemory", WorkingMemory.class);
                    loadAsObject(objPos);
                    invokeInterface(WorkingMemory.class, "getFactHandle", FactHandle.class, Object.class);
                    cast(InternalFactHandle.class);
                    mv.visitVarInsn(ASTORE, factPos);
                }
            }
            // @{ruleClassName}.@{methodName}(KnowledgeHelper, @foreach{declr : declarations} Object, FactHandle @end)
            StringBuilder consequenceMethodDescr = new StringBuilder("(L" + KnowledgeHelper.class.getName().replace('.', '/') + ";");
            // KnowledgeHelper
            mv.visitVarInsn(ALOAD, 1);
            for (int i = 0; i < declarations.length; i++) {
                // obj[i]
                load(paramsPos[i] + 1);
                // fact[i]
                mv.visitVarInsn(ALOAD, paramsPos[i]);
                consequenceMethodDescr.append(typeDescr(declarations[i].getTypeName())).append("L" + FactHandle.class.getName().replace('.', '/') + ";");
            }
            // @foreach{type : globalTypes, identifier : globals} @{type} @{identifier} = ( @{type} ) workingMemory.getGlobal( "@{identifier}" );
            for (int i = 0; i < globals.length; i++) {
                // WorkingMemory
                mv.visitVarInsn(ALOAD, 2);
                push(globals[i]);
                invokeInterface(WorkingMemory.class, "getGlobal", Object.class, String.class);
                mv.visitTypeInsn(CHECKCAST, internalName(globalTypes[i]));
                consequenceMethodDescr.append(typeDescr(globalTypes[i]));
            }
            consequenceMethodDescr.append(")V");
            mv.visitMethodInsn(INVOKESTATIC, data.getInternalRuleClassName(), data.getMethodName(), consequenceMethodDescr.toString());
            mv.visitInsn(RETURN);
        }
    });
    return generator.generateBytecode();
}
Also used : InternalFactHandle(org.drools.core.common.InternalFactHandle) FactHandle(org.kie.api.runtime.rule.FactHandle) InternalWorkingMemory(org.drools.core.common.InternalWorkingMemory) WorkingMemory(org.drools.core.WorkingMemory) Activation(org.drools.core.spi.Activation) MethodVisitor(org.mvel2.asm.MethodVisitor) InternalWorkingMemory(org.drools.core.common.InternalWorkingMemory) ClassGenerator(org.drools.core.rule.builder.dialect.asm.ClassGenerator) GeneratorHelper(org.drools.core.rule.builder.dialect.asm.GeneratorHelper) Sink(org.drools.core.reteoo.Sink) KnowledgeHelper(org.drools.core.spi.KnowledgeHelper) Declaration(org.drools.core.rule.Declaration) InternalFactHandle(org.drools.core.common.InternalFactHandle) Tuple(org.drools.core.spi.Tuple) InvokerDataProvider(org.drools.core.rule.builder.dialect.asm.InvokerDataProvider) RuleTerminalNode(org.drools.core.reteoo.RuleTerminalNode)

Aggregations

Tuple (org.drools.core.spi.Tuple)54 InternalFactHandle (org.drools.core.common.InternalFactHandle)17 LeftTuple (org.drools.core.reteoo.LeftTuple)16 RightTuple (org.drools.core.reteoo.RightTuple)14 FastIterator (org.drools.core.util.FastIterator)14 Declaration (org.drools.core.rule.Declaration)9 InternalWorkingMemory (org.drools.core.common.InternalWorkingMemory)8 WorkingMemory (org.drools.core.WorkingMemory)7 RightTupleImpl (org.drools.core.reteoo.RightTupleImpl)7 Cheese (org.drools.core.test.model.Cheese)7 Test (org.junit.Test)7 DefaultFactHandle (org.drools.core.common.DefaultFactHandle)6 FieldIndex (org.drools.core.util.AbstractHashTable.FieldIndex)6 AccumulateContext (org.drools.core.reteoo.AccumulateNode.AccumulateContext)5 AccumulateMemory (org.drools.core.reteoo.AccumulateNode.AccumulateMemory)5 BetaMemory (org.drools.core.reteoo.BetaMemory)5 RuleTerminalNode (org.drools.core.reteoo.RuleTerminalNode)5 TupleMemory (org.drools.core.reteoo.TupleMemory)5 MethodVisitor (org.mvel2.asm.MethodVisitor)5 FromMemory (org.drools.core.reteoo.FromNode.FromMemory)4