9. An apparatus comprising: a storage device to store a working memory comprising facts; and a processing device coupled to the storage device, to evaluate the facts against a plurality of rules, which comprises a rule with repetitions, and to create a multi-dimensional tuple to hold a set of facts that matches the rule, the multi-dimensional tuple comprising a plurality of elements, wherein each of the plurality of elements comprises a complex index, and wherein each of the plurality of elements is a single fact or a tree structure to hold a plurality of facts of a repetition group that matches the rule with repetitions.
13. The apparatus of claim 9 , the processing device to build a Rete network for evaluating the plurality of rules, and to insert a repeat node in the Rete network to collect the plurality of facts of the repetition group of the rule with repetitions.