<?xml version="1.0" encoding="UTF-8"?>
<TEI xml:space="preserve" xmlns="http://www.tei-c.org/ns/1.0" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
xsi:schemaLocation="http://www.tei-c.org/ns/1.0 https://raw.githubusercontent.com/kermitt2/grobid/master/grobid-home/schemas/xsd/Grobid.xsd"
 xmlns:xlink="http://www.w3.org/1999/xlink">
	<teiHeader xml:lang="en">
		<fileDesc>
			<titleStmt>
				<title level="a" type="main">Rule Modularization and Inference Solutions -a Synthetic Overview</title>
			</titleStmt>
			<publicationStmt>
				<publisher/>
				<availability status="unknown"><licence/></availability>
			</publicationStmt>
			<sourceDesc>
				<biblStruct>
					<analytic>
						<author>
							<persName><forename type="first">Krzysztof</forename><surname>Kaczor</surname></persName>
							<affiliation key="aff0">
								<orgName type="department">Institute of Automatics</orgName>
								<orgName type="institution">AGH University of Science and Technology</orgName>
								<address>
									<addrLine>Al. Mickiewicza 30</addrLine>
									<postCode>30-059</postCode>
									<settlement>Kraków</settlement>
									<country key="PL">Poland</country>
								</address>
							</affiliation>
						</author>
						<author>
							<persName><forename type="first">Szymon</forename><surname>Bobek</surname></persName>
							<affiliation key="aff0">
								<orgName type="department">Institute of Automatics</orgName>
								<orgName type="institution">AGH University of Science and Technology</orgName>
								<address>
									<addrLine>Al. Mickiewicza 30</addrLine>
									<postCode>30-059</postCode>
									<settlement>Kraków</settlement>
									<country key="PL">Poland</country>
								</address>
							</affiliation>
						</author>
						<author>
							<persName><forename type="first">Grzegorz</forename><forename type="middle">J</forename><surname>Nalepa</surname></persName>
							<affiliation key="aff0">
								<orgName type="department">Institute of Automatics</orgName>
								<orgName type="institution">AGH University of Science and Technology</orgName>
								<address>
									<addrLine>Al. Mickiewicza 30</addrLine>
									<postCode>30-059</postCode>
									<settlement>Kraków</settlement>
									<country key="PL">Poland</country>
								</address>
							</affiliation>
						</author>
						<title level="a" type="main">Rule Modularization and Inference Solutions -a Synthetic Overview</title>
					</analytic>
					<monogr>
						<imprint>
							<date/>
						</imprint>
					</monogr>
					<idno type="MD5">6F40FDB81FD62A540BB7BFDFE2BD6007</idno>
				</biblStruct>
			</sourceDesc>
		</fileDesc>
		<encodingDesc>
			<appInfo>
				<application version="0.7.2" ident="GROBID" when="2023-03-24T12:32+0000">
					<desc>GROBID - A machine learning software for extracting information from scholarly documents</desc>
					<ref target="https://github.com/kermitt2/grobid"/>
				</application>
			</appInfo>
		</encodingDesc>
		<profileDesc>
			<abstract>
<div xmlns="http://www.tei-c.org/ns/1.0"><p>Rule-based expert systems proved to be a successful AI technology in a number of areas. Building such systems requires creating a rulebase, as well as providing an effective inference mechanism that fires rules appropriate in a given context. The paper briefly discusses main rule inference algorithms Rete, TREAT and Gator. Since large rulebases often require identifying certain rule clusters, modern inference algorithms support inference rule groups. In the paper the case of the new version of Drools, introducing the RuleFlow module is presented. These solutions are contrasted with a custom rule representation method called XTT2. It introduces explicit structure in the rulebase based on decision tables linked in an inference network. In this case, the classic Rete-based solutions cannot be used. This is why custom inference algorithms are discussed. In the paper possible integration of the XTT2 approach with that of RuleFlow is discussed.</p></div>
			</abstract>
		</profileDesc>
	</teiHeader>
	<text xml:lang="en">
		<body>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="1.">INTRODUCTION</head><p>Rules constitute a cardinal concept of the rule-based expert systems (RBS for short) <ref type="bibr" target="#b1">[1]</ref>. Building such systems requires creating a knowledge base, which in case of RBS can be separated into two parts: factbase containing the set of facts and rulebase containing the set of rules. To make use of this two parts, the inference engine must be provided. The inference engine is responsible for generating findings. This is done according to the current state of the factbase and with the help of the rules. In the first task of the inference mechanism the conditional parts of the rules are checked against the facts from the factbase. This task is performed by pattern matching algorithm. The output from the algorithm is the set of rules, which conditional parts are satisfied. This set of rules is called a conflict set. The following task of the inference mechanism is the execution of the rules from the conflict set. There are many different algorithms for determining an execute order of the rules, but they are not discussed in this paper.</p><p>The main problem discussed in this paper concerns inference methods in structured rule-bases. A rule-base can contain thousands or even milions rules. Such large rule-bases cause many problems: 1) Maintenance of the large set of rules. 2) Inference inefficiency -the large number of rules may be unnecessary processed. The modularization of the rule-base that introduces structure to the knowledge base can be considered as the way to avoid these problems. The rules can be grupped in the modules, what can facilitate the maintenance of the large set of rules. What is more, the inference algorithm may be integrated with structured rule-base. The integration can influence the inference performance.</p><p>The main focus of this paper is the inference in the structured rule bases. The Section 2 presents the well-known expert system shells such as CLIPS <ref type="bibr" target="#b1">[1]</ref>, JESS <ref type="bibr" target="#b2">[2]</ref> and Drools 5 <ref type="bibr" target="#b3">[3]</ref>. It shows how the knowledge base can be structured in these systems and how the inference algorithm can be used over this structure. The next Section 3 describes three main pattern matching algorithms such as Rete <ref type="bibr" target="#b4">[4]</ref>, TREAT and the most recent and general Gator. In the Section 5 the main concepts of the XTT method are introduced. The section presents the structure of the XTT knowledge base. It also introduces the inference methods taking the underlying algorithm into consideration. The conclusions of the paper are included in the Section 6.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="2.">EXPERT SYSTEMS SHELLS</head><p>Expert system shell is a framework that facilitates creation of complete expert systems. Usually, they have most of the important functionalities built-in such as: rule-base, inference algorithm, explanation mechanism, user interface, knowledge base editor.</p><p>Such system must be adopted to the domain-specific problem solving. This can be done by creation of the knowledge base. The knowledge engineer must codify the captured knowledge according to the formalism. The knowledge can be captured in a several ways, but this issue is not discussed in this paper.</p><p>CLIPS is an expert system tool that is based on Rete algorithm. It provides its own programming language that supports rule-based, procedural and objectoriented programming <ref type="bibr" target="#b1">[1]</ref>. Thanks to this variety of programming paradigms implemented in CLIPS, there are three ways to represent knowledge in it:</p><p>• rules, which are primarily intended for heuristic knowledge based on experience,</p><p>• deffunctions and generic functions, which are primarily intended for procedural knowledge,</p><p>• object-oriented programming, also primarily intended for procedural knowledge. The generally accepted features of object-oriented programming are supported. Rules may pattern match on objects and facts.</p><p>The condition in CLIPS is a test if given fact exists in knowledge database. The right-hand side (RHS) of rule contains actions such like assert or retract that modifies facts database or other operations such like function invocations that does not affect system state.</p><p>CLIPS has been written in C language. This makes the tool very efficient and platform independent. However, the integration with other existing systems is not as easy as it is in case JESS.</p><p>JESS is a rule engine and scripting environment written entirely in Sun's Java language by Ernest Friedman-Hill <ref type="bibr" target="#b2">[2]</ref> that derives form CLIPS.</p><p>Jess uses a very efficient method known as the Rete algorithm. In the Rete algorithm, inefficiency of the combinatoric explosion of rules analysis is alleviated by remembering the past test results across the iterations of a rule loop. Only new facts are tested against each rule conditional part, but still all rules must be taken into consideration.</p><p>Jess supports both forward-chaining and backward chaining. The default is forward-chaining. As the knowledge representation JESS uses rules as well as XMLbased language called JessML. JESS uses LISP-like syntax, which is the same as in CLIPS. The JessML is not convenient to read by human. It contains more details, what makes this representation suitable for parsers.</p><p>Drools 5 introduces the Business Logic integration Platform which provides a unified and integrated platform for Rules, Workflow and Event Processing. Drools is now split up into 4 main sub projects: 1) Drools Guvnor (BRMS/BPMS) -centralised repository for Drools Knowledge Bases. 2) Drools Expert (rule engine). 3) Drools Flow (process/workflow) provides workflow or (business) process capabilities to the Drools platform. 4) Drools Fusion (event processing/temporal reasoning) -the module responsible for enabling event processing capabilities. Drools Expert is a rule engine dedicated for the Drools 5 rule format.</p><p>Drools 5 implements only forward-chaining engine, using a Rete-based algorithm -ReteOO. In the future, Drools 5 is promised to support a backward-chaining.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="3.">RULE INFERENCE ALGHORITHMS</head><p>This section discusses three the most important pattern matching algorithms. The descriptions of these algorithms introduce specific nomenclature.</p><p>A rule base in the RBS consists of a collection of rules called productions. The interpreter operates on the productions in the global memory called working memory (WM for short). Each object is related to a number of attribute-value pairs. The set of pairs related to the object and object itself constitute a single working element.</p><p>By convention, the conditional part (IF part) of a rule is called LHS (left-hand side), whereas the conclusion part is known as RHS. The inference algorithm performs the following operations: 1) Match -checks LHSs of rules to determine which are satisfied according to the current content of the working memory. 2) Conflict set resolution -selects production(s) (instantiation(s)) that has satisfied LHS. 3) Action -Perform the actions in the RHS of the selected production(s). 4) Goto 1. The first step is a bottleneck of inference process. The algorithms, which are presented in this section, try to alleviate this problem.</p><p>The Rete algorithm <ref type="bibr" target="#b4">[4]</ref> is an efficient pattern matching algorithm for implementing production rule systems. It computes the conflict set. The naive implementation of the pattern matching algorithm might check each production against each working element. The main advantage of the Rete algorithm is that it tries to avoid iterating over production and working memory.</p><p>Rete can avoid iterating over working memory by storing the information between cycles. Each pattern stores the list of the elements that it matches. Due to this fact, when working memory is changed only the changes are analysed.</p><p>Rete also can avoid iterating over production set. This is done by forming a tree-like structure (network) that is compiled from the patterns. The network comprise of two types of nodes: intra-elements that involve only one working element and inter-elements that involve more than one working element. At first, the pattern compiler builds a linear sequence of the intraelements. This part of the network is called alpha memory and contains only the one-input nodes. After that, the compiler builds the beta memory from the interelements. The beta memory consists of the two-input nodes. Each two-input node (except the first one) joins one two-input node and one one-input node. The first two-input node joins two one-input nodes.</p><formula xml:id="formula_0">R1(a &gt; 17, d(X)), R2(d(X), e(Y ), g(Z)), R3(c = on, g(Z)), R4(e(Y ), f (W )), R5(b = F riday, f (W )) (1)</formula><p>When the working memory is changed, the working elements, that has been changed, are let int to the network. Each node of the network tries to match the given working element. If it matches, then the copy of the element is passed to all the successors of the node. The</p><formula xml:id="formula_1">R1 R2 R3 R4 R5 R2 R1 R2 R5 R1 R3 R4 R2 R1 R3 R2 R1 R3 R4</formula><p>Fig. <ref type="figure">1</ref>. A general schema of the Rete network.</p><p>two-input nodes joins the elements from the two different paths of the network into bigger one. The last twoinput element (terminal element) is the output from the algorithm and contains the information about changes, which must be applied to the conflict set.</p><p>Rete algorithm has been invented by Charles L. Forgy of Carnegie Mellon University. At first, Rete has been assumed as the most efficient algorithm for this problem. The literature did not contain any comparative analysis of the Rete with any other algorithm. Nowadays, other algorithms such as Treat, A-Treat, Gator are known. Some of them are discussed in this paper. TREAT algorithm. State saving mechanism implemented in Rete is not very efficient. The structure of the Rete network often stores redundant information and number of elements stored in beta-memory nodes may be combinatorially explosive. Moreover cost of join operation in beta-memory are very expensive when many addition and deletion operations are preformed.</p><p>To address these problems new version of Rete algorithm called TREAT was proposed.</p><p>Rete algorithm is based on two concepts: Memory support that creates and maintains alpha-memory and Condition relationship that join operations in betamemory. TREAT also uses Memory support, but does not use Condition relationship. Instead Conflict set support and Condition membership are used. Absence of Condition relationship implies fact that in TREAT network structure there is no beta memory. Hence, the structure of TREAT network is flat.</p><formula xml:id="formula_2">R1 R2 R3 R4 R5 R2 R5 R1 R3 R4</formula><p>Fig. <ref type="figure">2</ref>. TREAT network for rule 1</p><p>The main idea of the TREAT algorithm is to exploit the conflict set support for temporarily redundant systems. The conflict set is explicitly retain across production system cycles which allows for the following advancements comparing to Rete <ref type="bibr" target="#b5">[5]</ref>:</p><p>• in case of addition of WM element, conflict set remains the same, and constrained search for new instantiation of only those rules that contain newly added WM element is performed.</p><p>• deletion from WM triggers direct conflict set ex-amination for rules to remove. No matching is required to process deletion since any instantiation of the rule containing removed element is simply deleted.</p><p>Condition membership introduces new property for each rule called rule-active that determines weather each of the rule condition elements is partially matched. The match algorithm ignores then rules that are non-active during production system cycles.</p><p>Gator algorithm. Both Rete and TREAT offer static networks, which structures are defined arbitrary by the design engineer (Rete) and looks mostly the same for all kinds of knowledge databases (Rete and TREAT). This very often leads to the creation of networks that are not optimal for some knowledge bases.</p><p>To address this problem a new discrimination network algorithm called Gator was proposed. It is based on Rete, but additionally implements mechanisms for optimizing network structure according to specific knowledge base characteristic. It can be said that Rete and TREAT are special cases of Gator and as reported in <ref type="bibr" target="#b6">[6]</ref> it outperforms TREAT and Rete in most cases.</p><p>Every rule in production system can be represented by a condition graph with nodes for rule condition elements and edges for join conditions.</p><p>Gator networks are general tree structures. They consist of alpha-memory elements (leaves), optional beta-memory elements (internal nodes, that can have multiple inputs) and a P-node which is a root of the tree representing a complete RHS of the rule.</p><formula xml:id="formula_3">R1 R2 R3 R4 R5 R2 R5 R1 R3 R4 R2 R5 R1 R3 R4</formula><p>Fig. <ref type="figure">3</ref>. Gator network for rule 1</p><p>The optimizing algorithm is iterative. It starts form networks of size one (which are basically alpha-memory elements) and combine them into larger optimal networks. There is a constraint which states that every newly created network have to be optimal. That ensures that the final network would also be optimal.</p><p>The network is built and optimize according to the following rules:</p><p>• Connectivity Heuristic -do not combine two Gator networks unless there is an explicit connection between them in connectivity graph.</p><p>• Disjointness constraint -do not combine networks unless their respective sets of rule condition elements do not overlap.</p><p>• Lowest Cost Heuristic -if there is already a network that covers the same set of condition as the new network, and the existing network cost (according to the cost function) no more than the new one, discard new network.</p><p>More detailed information about cost functions and rules for combining Gator networks can be found in <ref type="bibr" target="#b6">[6]</ref>.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="4.">KNOWLEDGE MODULARIZATION</head><p>Most of the well-known expert systems have a flat knowledge base. In such case, the inference mechanism have to check each rule against each fact. When the knowledge base contains a large number of rules and facts this process becomes inefficient. This problem can be solved by providing a structure in the knowledge base that allows for checking only a subset of rules. This Section describes the three well-known expert system shells CLIPS, JESS and Drools and knowledge base organisation implementen in them.</p><p>CLIPS Modules. CLIPS offers functionality for organising rules into so called modules. Modules allows for restriction of access to their elements from other modules, and can be compared to global and local scoping in other programming languages. Modularization of knowledge base helps managing rules, and improves efficiency of rule-based system execution. Modules in CLIPS are defined with defmodule command. In CLIPS each module has its own pattern-matching network for its rules and its own agenda. When a run command is given, the agenda of the module which is the current focus is executed. Rule execution continues until another module becomes the current focus, no rules are left on the agenda, or the return function is used from the RHS of a rule. Whenever a module that was focused on runs out of rules on its agenda, the current focus is removed from the focus stack and the next module on the focus stack becomes the current focus. Before a rule executes, the current module is changed to the module in which the executing rule is defined (the current focus). The current focus can be dynamically switched in RHS of the rule with focus command.</p><p>JESS Modules. Jess provides modules mechanism that helps to manage large numbers of rules. Rules modularisation can be considered as the structure of the rulebase. Modules also provide a control mechanism: the rules in a module will fire only when that module has the focus, and only one module can be in focus at a time. Jess makes the modules defining possible with the help of defmodule command. The module name can be considered as a namespace for rules. This means that two different modules can each contain a rule with a the same name without conflicting. Modules can also be used to control execution. In general, although any Jess rule can be activated at any time, only rules in the focus module will fire. It is possible to manually move the focus to another module using the focus function.</p><p>Each rule can decide which module should be focused as the next one. To accomplish that, the operation of the focus changing should be included in the rule conclusion part. This leads to the structured rulebase, but still all rules are checked against the facts. In terms of efficiency the modules mechanism does not influence on the performance of the conflict set creation.</p><p>Drools RuleFlow. It is a workflow and process engine that allows advanced integration of processes and rules. It provides a graphical interface for processes and rules modelling. Drools have built-in a functionality to define the structure of the rulebase which can determine the order of the rules evaluation and execution. The rules can be gruped in a ruleflow-groups which defines the subset of rules that are evaluated and executed. The ruleflow-groups have a graphical representation as the nodes on the ruleflow diagram. The ruleflow-groups are connected with the links what determines the order of its evaluation. A ruleflow diagram is a graphical description of a sequence of steps that the rule engine needs to take, where the order is important.</p><p>Rules grouping in Drools 5 contributes to the efficiency of the ReteOO algorithm, because only a subset of rules are evaluated and executed. However there is no policy which determines when a rule can be added to the ruleflow-group. Due to this fact, the rules grupping can provide a muddle in the rule base especially in case of large rulebases.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="5.">XTT-BASED EXPERT SYSTEMS</head><p>Knowledge bases in expert system shells described in Section 2 are flat and do not have any internal structure. To create a conflict set the entire knowledge base have to be searched, and an intelligent inference control in such unstructuralised system is very difficult. Knowledge representation languages are not formal neither in Drools, Jess, nor in CLIPS and as a consequence there are not formalized methods for verifying and analysing systems designed with those tools. To solve these problems a new knowledge representation method called XTT2 (Extended Tabular Trees) was proposed which is part of the HeKatE <ref type="bibr">[7]</ref> methodology for designing, implementing and verifying production systems.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="5.1.">Knowledge representation</head><p>Main goals of XTT2 knowledge representation was 1) to provide an expressive formal logical calculus for rules, 2) allow for advanced inference control and formal analysis of the production systems, 3) provide structural and visual knowledge representation. XTT2 incorporates extended attributive table format, where similar rules are grouped within separated tables, and the system is split into such tables linked by arrows representing the control strategy. Each table consist of two parts representing condition and decision part of the rule.</p><p>To help creating the XTT2 network, ARD+ diagrams provide the conceptual design. This stage is supported by VARDA tool that generates XML file (called HML in HeKatE methodology) with specification of types, domains, attributes and dependencies between them. Based on this file a XTT2 skeleton is created in HQEd editor, and the tables are filled with rules <ref type="bibr" target="#b8">[8]</ref>.</p><p>Rules representation in XTT2 is based on attributive logic called ALSV(FD) <ref type="bibr">[7]</ref>. Each rule in XTT table is of the form:</p><formula xml:id="formula_4">(A 1 ∝ 1 V 1 ) ∧ . . . ∧ (A n ∝ n V n ) −→ RHS<label>(2)</label></formula><p>where the logical formula on the left describes the rule condition, and RHS is the right-hand side of the rule covering conclusions (see <ref type="bibr">[7]</ref> for more details).</p><p>The logical rule representation is mapped to the HMR language (Hekate Meta Representation) which is an internal rule language for XTT. Following example shows HMR the notation and its pseudocode representation.  This formal, logical representation of the rules allows for formal analysis and verification of the system.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="5.2.">Intelligent inference controll</head><p>Described in section 5.1 XTT2 knowledge representation allows for more efficient inference control during rule-based system execution. The inference control is assured thanks to firing only rules necessary for achieving the goal. It is achieved by selecting the desired output tables and identifying the tables necessary to be fired first. The links between tables representing the partial order assure that when passing from a table to another one, the latter can be fired since the former one prepares an appropriate context knowledge. There are four algorithms based on XTT2 notation that control the inference. They were successfully implemented in HeaRT (HeKatE RunTime) inference engine <ref type="bibr" target="#b9">[9]</ref>.</p><p>[FOI] The simplest algorithm consists of a hardcoded order of inference, in such way that every table is assigned an integer number; all the numbers are different from one another. The tables are fired in order from the lowest number to the highest one. This inference algorithm is usefull when a reasoning path is well defined and does not change over rule-based system cycles.</p><p>[DDI] A data-driven inference algorithm identifies start tables, and put all tables that are linked to the initial ones in the XTT network into a FIFO queue. When there is no more tables to be added to the queue, algorithm fires selected tables in order they are poped from the queue. This inference mode s especially useful for diagnosis systems, where a lot of symptoms are given as an input that can lead to multiple diagnosis. Choosing apropriate reasoning path by the system saves time and memory. [GDI] A goal-driven approach works backwards with respect to selecting the tables necessary for a specific task, and then fires the tables forwards so as to achieve the goal. One or more output tables are identified as the ones that can generate the desired goal values and are put in LIFO queue. As a consequence only those tables that leads to desired solution are fired, and no rules are fired without purpose. This inference algorithm works best in hypotesisproving systems, where value of attribute from particular table is wanted.</p><p>[TDI] This approach is based on monitoring the partial order of inference defined by the network structure with tokens assigned to tables. A table can be fired only when there is a token at each input. A token at the input is a kind of a flag signalling that the necessary data generated by the preceding table is ready for use. This inference mode was designed to support systems where a lot of dependencies between tables and rules are denoted that would require many redundant conditions XTT tables. Tokens allow to omit those unnecessary conditions, which saves time and memory and makes the system more readable.</p><p>The highly modularised knowledge representation that is used in XTT2 was one of the reasons why inference engine -HeaRT -implemented for XTT2 approach does not use matching algorithm based on Rete. Due to the fact that HeaRT was implemented entirely in Prolog, fast and efficient unification algorithm that is implemented in Prolog interpreter was used instead.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="5.3.">Structure of the Knowledge Base</head><p>Considering the differences between the XTT2 approach and the classic Rete-based solutions, at least two meanings of the notion "structure of the rule base" can be given. The first one is related the previously discussed modules in classic expert system shells. There a physical structure of the rule base is introduced using modules. The global set of rules is partitioned by the system designer into several parts in an arbitrary way. This is a technical solution, similar to source code partitioning methods such as packages is programming languages. Practically, these partitions are often merged during the inference process. Therefore, the partitioning process itself does not support in optimizing the design and inference. The second one is realized in the XTT2 representation. Here rules working in the same context, i.e. having the same conditional attributes are grouped into tables (forming simple rule sets) during the design process. This forms a logical structure of the rule base. This structure is considered during the inference process -only necessary rules are considered, an possibly fired. Therefore, the modularization process does support optimization of both the design and inference.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="6.">CONCLUDING REMARKS</head><p>All of the common expert system shells described in this paper use Rete or its variants as a matching algorithm. This is so, because Rete algorithm is very efficient on flat and not structured knowledge base. Once knowledge base becomes modularized, Rete loses its assets. Although idea of modules as sets of not related in any way rules was introduced in CLIPS, the core inference algorithm -Rete -remained the same. Such partial modularisation slightly increases performance of the system, but still did not solve efficient design and verification problems. Most of solutions presented in CLIPS or Jess are just modifications of existing approaches that have their own historical drawbacks.</p><p>To address these problems a new knowledge representation called XTT2 was proposed that is a part of newly designed methodology for designing, implementing and verifying expert systems, called HeKatE. It provides visual representation of the knowledge base, formal verification of the rule-based systems and intelligent inference control. XTT2 knowledge base are highly modularized and hence its internal structure allows for more advanced reasoning. Modularisation in XTT is not partial as in CLIPS. XTT tables are not only a mechanism for managing large knowledge bases, but they also allow for context reasoning, due to the fact that each XTT table groups rules that belongs to the same context (have similar LHS and RHS). Moreover, rules in XTT2 are based on attributive logic which allows for formal verification of knowledge base. Table <ref type="table" target="#tab_1">1</ref> contains the comparison of the expert system shells described in this paper and XTT2 approach. The idea of integrating XTT2 approach with Drools-Flow will allow to combine business processes with formal, modular knowledge representation. Since Drools-Flow diagrams may contain other DroolsFlow diagrams, relations between XTT tables would not be limited to relation table to table, but may also be considered as realtion system to system. Integrating DroolsFlow and XTT can be done by invoking HeaRT from within Drools-Flow blocks directly, using the SWI JPL package for Java integration, or via TCP/IP protocol.</p></div><figure xmlns="http://www.tei-c.org/ns/1.0" xml:id="fig_0"><head></head><label></label><figDesc>IF today=workday AND hour&gt;=9 AND hour&lt;=17 THEN operation := bizhours IF today = workday AND hour &gt; 17 THEN operation := not_bizhours</figDesc></figure>
<figure xmlns="http://www.tei-c.org/ns/1.0" type="table" xml:id="tab_1"><head>Table 1 .</head><label>1</label><figDesc>Comparison of expert system shells</figDesc><table><row><cell>Feature</cell><cell>XTT</cell><cell cols="2">CLIPS Jess</cell><cell>Drools</cell></row><row><cell>Knowledge modulari-</cell><cell>Yes</cell><cell>Yes</cell><cell>Partial</cell><cell>Yes</cell></row><row><cell>sation</cell><cell></cell><cell></cell><cell></cell><cell></cell></row><row><cell>Knowledge visualisa-</cell><cell>Yes</cell><cell>No</cell><cell>No</cell><cell>Yes</cell></row><row><cell>tion</cell><cell></cell><cell></cell><cell></cell><cell></cell></row><row><cell>Formal rules repre-</cell><cell>Yes</cell><cell>No</cell><cell>No</cell><cell>No</cell></row><row><cell>sentation</cell><cell></cell><cell></cell><cell></cell><cell></cell></row><row><cell>Knowledge base veri-</cell><cell>Yes</cell><cell>No</cell><cell>No</cell><cell>No</cell></row><row><cell>fication</cell><cell></cell><cell></cell><cell></cell><cell></cell></row><row><cell>Inferences strategies</cell><cell>DDI,</cell><cell>DDI</cell><cell>DDI,</cell><cell>DDI</cell></row><row><cell></cell><cell>GDI,</cell><cell></cell><cell>GDI,</cell><cell></cell></row><row><cell></cell><cell>TDI, FOI</cell><cell></cell><cell></cell><cell></cell></row><row><cell>Inference algorithm</cell><cell>HeaRT +</cell><cell cols="2">Rete Rete</cell><cell>Rete</cell></row><row><cell></cell><cell>Unification</cell><cell></cell><cell></cell><cell></cell></row><row><cell>Allows for modelling</cell><cell>No</cell><cell>No</cell><cell>No</cell><cell>Yes</cell></row><row><cell>dynamic processes</cell><cell></cell><cell></cell><cell></cell><cell></cell></row></table></figure>
		</body>
		<back>

			<div type="acknowledgement">
<div xmlns="http://www.tei-c.org/ns/1.0"><head>Acknowledgements</head><p>Paper is supported by the BIMLOQ Project funded from 2010-12 resources for science as a research project.</p></div>
			</div>

			<div type="references">

				<listBibl>

<biblStruct xml:id="b0">
	<monogr>
		<title/>
		<author>
			<persName><surname>References</surname></persName>
		</author>
		<imprint/>
	</monogr>
</biblStruct>

<biblStruct xml:id="b1">
	<monogr>
		<title level="m" type="main">Expert Systems</title>
		<author>
			<persName><forename type="first">Joseph</forename><forename type="middle">C</forename><surname>Giarratano</surname></persName>
		</author>
		<author>
			<persName><forename type="first">Gary</forename><forename type="middle">D</forename><surname>Riley</surname></persName>
		</author>
		<imprint>
			<date type="published" when="2005">2005</date>
			<publisher>Thomson</publisher>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b2">
	<monogr>
		<author>
			<persName><forename type="first">E</forename><surname>Friedman-Hill</surname></persName>
		</author>
		<title level="m">Jess in Action, Rule Based Systems in Java</title>
				<imprint>
			<publisher>Manning</publisher>
			<date type="published" when="2003">2003</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b3">
	<monogr>
		<title level="m" type="main">JBoss Drools Business Rules</title>
		<author>
			<persName><forename type="first">Paul</forename><surname>Browne</surname></persName>
		</author>
		<imprint>
			<date type="published" when="2009">2009</date>
			<publisher>Packt Publishing</publisher>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b4">
	<analytic>
		<title level="a" type="main">Rete: A fast algorithm for the many patterns/many objects match problem</title>
		<author>
			<persName><forename type="first">Charles</forename><surname>Forgy</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="j">Artif. Intell</title>
		<imprint>
			<biblScope unit="volume">19</biblScope>
			<biblScope unit="issue">1</biblScope>
			<biblScope unit="page" from="17" to="37" />
			<date type="published" when="1982">1982</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b5">
	<analytic>
		<title level="a" type="main">TREAT: A Better Match Algorithm for AI Production Systems</title>
		<author>
			<persName><forename type="first">P</forename><surname>Daniel</surname></persName>
		</author>
		<author>
			<persName><surname>Miranker</surname></persName>
		</author>
		<idno>87-58</idno>
	</analytic>
	<monogr>
		<title level="m">Long Version</title>
				<imprint>
			<date type="published" when="1987-07">July 1987</date>
		</imprint>
		<respStmt>
			<orgName>University of Texas</orgName>
		</respStmt>
	</monogr>
	<note type="report_type">Tech. Rep.</note>
</biblStruct>

<biblStruct xml:id="b6">
	<monogr>
		<title level="m" type="main">Gator: An Optimized Discrimination Network for Active Database Rule Condition Testing</title>
		<author>
			<persName><forename type="first">Eric</forename><forename type="middle">N</forename><surname>Hanson</surname></persName>
		</author>
		<author>
			<persName><forename type="first">Mohammed</forename><forename type="middle">S</forename><surname>Hasan</surname></persName>
		</author>
		<idno>93- 036</idno>
		<imprint>
			<date type="published" when="1993">cember 1993</date>
			<pubPlace>De</pubPlace>
		</imprint>
		<respStmt>
			<orgName>CIS Department University of Florida</orgName>
		</respStmt>
	</monogr>
	<note type="report_type">Tech. Rep.</note>
</biblStruct>

<biblStruct xml:id="b7">
	<analytic>
		<title level="a" type="main">HeKatE methodology, hybrid engineering of intelligent systems</title>
		<author>
			<persName><forename type="first">J</forename><surname>Grzegorz</surname></persName>
		</author>
		<author>
			<persName><forename type="first">Antoni</forename><surname>Nalepa</surname></persName>
		</author>
		<author>
			<persName><surname>Ligęza</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="j">International Journal of Applied Mathematics and Computer Science</title>
		<imprint>
			<date type="published" when="2010">2010</date>
		</imprint>
	</monogr>
	<note>accepted for publication</note>
</biblStruct>

<biblStruct xml:id="b8">
	<analytic>
		<title level="a" type="main">HeKatE rule runtime and design framework</title>
		<author>
			<persName><forename type="first">J</forename><surname>Grzegorz</surname></persName>
		</author>
		<author>
			<persName><forename type="first">Antoni</forename><surname>Nalepa</surname></persName>
		</author>
		<author>
			<persName><forename type="first">Krzysztof</forename><surname>Ligęza</surname></persName>
		</author>
		<author>
			<persName><forename type="first">Weronika</forename><forename type="middle">T</forename><surname>Kaczor</surname></persName>
		</author>
		<author>
			<persName><surname>Furmańska</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="m">Proceedings of the 3rd East European Workshop on Rule-Based Applications (RuleApps 2009</title>
				<editor>
			<persName><forename type="first">Gerd</forename><surname>Wagner</surname></persName>
		</editor>
		<editor>
			<persName><forename type="first">Adrian</forename><surname>Giurca</surname></persName>
		</editor>
		<editor>
			<persName><forename type="first">Grzegorz</forename><forename type="middle">J</forename><surname>Nalepa</surname></persName>
		</editor>
		<meeting>the 3rd East European Workshop on Rule-Based Applications (RuleApps 2009<address><addrLine>Cottbus, Germany; Cottbus, Germany</addrLine></address></meeting>
		<imprint>
			<date type="published" when="2009-09-21">September 21, 2009. 2009</date>
			<biblScope unit="page" from="21" to="30" />
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b9">
	<monogr>
		<title level="m" type="main">HeaRT Hybrid XTT2 rule engine design and implementation</title>
		<author>
			<persName><forename type="first">G</forename><forename type="middle">J</forename><surname>Nalepa</surname></persName>
		</author>
		<author>
			<persName><forename type="first">S</forename><surname>Bobek</surname></persName>
		</author>
		<author>
			<persName><forename type="first">M</forename><surname>Gawędzki</surname></persName>
		</author>
		<author>
			<persName><forename type="first">A</forename><surname>Ligęza</surname></persName>
		</author>
		<idno>4/2009</idno>
		<imprint>
			<date type="published" when="2009">2009</date>
		</imprint>
		<respStmt>
			<orgName>AGH University of Science and Technology</orgName>
		</respStmt>
	</monogr>
	<note type="report_type">Tech. Rep. CSLTR</note>
</biblStruct>

				</listBibl>
			</div>
		</back>
	</text>
</TEI>
