1. A logic-programming-based computer system comprising: one or more processors; one or more memories from which instructions and data, including facts, rules, and indexes, are retrieved by the one or more processors and in which instructions and data are stored by the by the one or more processors; a first set of indexes that index facts stored in the one or more memories; a second set of indexes that index rules stored in the one or more memories; a logic program stored in one of the one or more memories; a gateway rule within the logic program; and a set of fact-rule pairs, within the logic program, each fact-rule pair of which is indexed by one or more indexes of the first set of indexes and, in combination with the gateway rule, implements a rule within the logic program.