![](bg2.png)
consist of four different node types as shown below in
Fig. 1:
beta
alpha
terminal
alpha
alpha
alpha
terminal
beta
root
alpha
network
beta
network
Figure 1: DN example.
Root Node. is a virtual unique node. Its input con-
nection is connected to the working memory and
receivesall changes of facts. As a virtual node it is
missing a memory because it would be equivalent
to the working memory. The output connection
provides access to a tuple based representation of
the working memory elements (facts). The root
node has an empty test set.
Alpha Node. has one input connection, where it re-
ceives tuples containing just one fact. The input
is connected to another alpha node or to the root
node. It checks if the tuples pass the test set and
relays them to the output. It may have a memory
or be virtual, acting as a simple filter.
Beta Node. has more than one input connection. It
joins the tuples from the input connections and
checks if the resulting tuple passes the test set. So
it is required not only to react to incoming noti-
fications but to request memory contents from its
predecessors. The input connections can be con-
nected to alpha or beta nodes. It saves all tuples
which passed the test set in its memory and sends
notifications about memory changes through its
output connection. Beta nodes may have an empty
test set to enable full joins.
Terminal Node. is a virtual node with one input con-
nection, which is connected to a beta or alpha
node. Its purpose is to collect the fact tuples which
fulfill the whole rule condition. So it has an empty
test set and its output is connected to the conflict
set, to fill it.
Based on these node types the network consist of two
parts. The alpha network containing the root node and
all alpha nodes, and the beta network containing beta
and terminal nodes.
3 STATE OF THE ART
Beta nodes of a DN apply filters to joined fact tuples.
So, there is a need to identify which facts in the tu-
ples the corresponding filters should be applied to. A
simple solution to address a specific fact in a fact tu-
ple is to give the beta node inputs an order. There-
fore, the order of the facts inside the tuple is defined
and the facts can be addressed by their order position
inside the tuple. The order of the facts depends on
the order of the beta node’s inputs and the orders of
the inputs of all preceding beta nodes. So, during the
construction of the network the correct position of a
fact has to be calculated, which gets the more compli-
cated the larger the beta network gets. Current RBS
implementations use rule-compilers which do these
calculations during network construction. There are
no publications addressing this topic in detail since
(Forgy, 1982) although improvements would ease de-
velopment of optimization algorithms a lot.
4 OBJECTIVE
Optimizations of DN construction algorithms and DN
runtime optimization require an efficient way to ad-
dress facts in filter conditions easily. Additionally, in-
ternal optimizations of memory usage and tuple pro-
cessing often require flexibility in addressing facts not
limited by a predefined order of facts in tuples. So, the
aim is to develop an efficient referencing method for
facts which on the one hand is easy to use for network
construction and optimization algorithms, and on the
other hand allows a computation of references which
can be used efficiently during the DN runtime.
5 APPROACH
Observing the fact flow in a DN we recognize that it
is possible to address an element of a fact tuple in the
DN by the set of edges traversed by the fact since it
left the alpha network (see Fig. 2).
If we would limit the network structure of one rule
condition to a tree we could identify a fact tuple ele-
ment with only the edge between the alpha and beta
network. Since the output of one alpha node may be
used multiple times in a rule condition network, we
have to use more than one edge to address elements
which originate from the same alpha node. Although
these additional edges are only required in this partic-
ular cases we use the full set of edges traversed by the
fact to obtain an easy to use addressing scheme.
ANewAddressingSchemeforDiscriminationNetworkseasingDevelopmentandTesting
119