Expert Systems With Applications, Vol. 10, No. 3/4, pp. 481-486, 1996 Copyright © 1996 Elsevier Science Ltd Printed in Great Britain. All fights reserved 0957-4174/96 $15.00+0.00


Visual Programming Environment for Hybrid Expert Systems

C & C ResearchLaboratories,NEC Corporation,4-1-1 Miyazaki,Miyamae-ku,Kawasaki216, Japan

Abstract--This paper proposes an architecture for hybrid expert system development which combines
expert problem-solving functions and other conventional computational functions by visual programming technology. The visual programming technique is used both for task-specific knowledge representation and for procedural programming for connecting functional components. In knowledge representation, knowledge is visually represented in the form of decision tables and decision trees. In procedural visual programming, each functional object is displayed as a box-shaped icon with accessible ports which are connected by wires on the graphic editor. Based on the architecture, an expert system shell for the classification task, called HOLON/VP(DT), is incorporated in a visual programming system called HOLON/VP. This paper briefly describes the tool and its evaluation based on some application systems developed with the tool. Copyright © 1996 Elsevier Science Ltd

1. INTRODUCTION in the 1970s, a large number of expert systems have been deployed. Experience gained in the development of those systems shows that the development of general functions, such as user interface, database access and simple data manipulation, requires much more effort than the development of the problem-solving part. Although conventional expert system tools provide many convenient functions for developing the problem-solving part, considerable effort is needed to implement those "hybrid" expert systems, which combine problemsolving functions with conventional computational functions. The objective of the research described in this paper is to provide an expert system tool which enables computer-novice domain experts themselves to create their own expert systems. Since domain experts are usually not computer experts, the tool should provide an environment for novice computer users to easily create a hybrid system. In recent years, a number of tools have been developed for knowledge base development. However, few attempts have been made to provide a hybrid expert system development environment. Most of the conventional tools take one of the following approaches:

• provide interface with other development systems by function call library. All of the approaches are simple extensions of conventional programming techniques. In any case, programming must be done by an embedded textual programming language, which may be LISP or C language. This paper introduces a novel expert system tool architecture, based on a visual programming technique. Based on the architecture, a visual programming system, named HOLON/VE was developed. This tool includes a classification task-specific expert system shell called HOLON/VP(DT). This paper describes the tool and its evaluation based on some application systems developed with the tool. Section 2 introduces the general architecture based on an object-oriented visual programming approach. The visual knowledge representation of the classification task-oriented problem-solving tool is described in Section 3. Section 4 illustrates the HOLON/VP visual programming tool in detail with some examples. Section 5 summarizes the advantages and disadvantages of the architecture and presents an empirical evaluation. Section 6 concludes by pointing out several areas for further work. 2. GENERAL A R C H I T E C T U R E

• provide conventional computation tools around the problem-solving tool • provide problem solver on a pre-existent program development environment 481

2.1. Requirements
The requirements for a hybrid expert system development environment are listed below:

1991. incorporated in the classification problem-solving component. Object-Oriented Architecture To realize hybrid expert systems. One is the problem-solving part. such as rules. 2. an iconic visual programming tool was developed. Database . • "1 Problem r Solver roood . Its visual knowledge representation is briefly described in the next section. as defined in the object-oriented paradigm.482 E Koseki et al. This representation makes a more comprehensible knowledge base than do rules. Therefore. 2. FIGURE 1. a visual knowledge representation and a visual porogramming language are introduced. . high maintainability. A decision table represents a set The aim of expert system technology is to provide software systems with expert level intelligence. Tanaka et al. to allow domain experts to be able to make these procedural programs themselves. called HOLON/VP(DT) (Koseki et al. 2. This visual representation approach has been successful in knowledge representation for task-specific tools. such as material features and required quality. General architecture. User interface . decision trees and decision tables. 1994). It is unique in being based on a symbolic decision table and a graphical decision tree representation rather than on text rules. the creation and maintenance of knowledge bases must still be done by specially trained technicians called knowledge engi- . Those task-specific components are provided as objects. IK I Base owledgel . such as rule diagrams. decision tables and object relation graphs..2. The key to realizing such a system is to capture and utilize the knowledge of experienced human experts. 1993. Textual vs Visual Representation neers. other than the knowledge base. The tool has been used in the unassisted creation of practical knowledge bases by domain experts. we propose an object-oriented component assembly architecture (Fig. An expert system is assembled as a set of task-specific components glued together. procedural programs. This is the second and main topic of this paper and it is described in the later sections.4. The problem is to select an appropriate grinder for a product according to product requirements. ~ epo. This part is usually represented procedurally.. 1). In the early days. To meet these requirements. VISUAL KNOWLEDGE REPRESENTATION This section describes the visual knowledge representation.ow O O © x x O v [ presentation [ [ Tables [ [othersystems I FIGURE 2.' / . Declarative and Procedural Knowledge Expert systems consist of mainly two parts. rather than textual representations. given a set of attribute value conditions for the concept. it is necessary to fill the gap between computational representation and human knowledge representation. Sugiura et al. database query and graphical user interface. separating a domain-independent inference engine from a domain-dependent declarative knowledge base made knowledge capture and utilization easier than with conventional software technology. Grinder-H Grinder-H Grinder-L Material Hard Soft O x x O x O Quality High l. had to be written in a procedural language by programmers. we created a classification task-oriented tool which utilizes visual knowledge representation. Since domain experts are usually computer novices. Our goal is to provide a tool which allows the domain experts themselves to create knowledge bases. Some recent works utilize comprehensible visual knowledge representations. Example decision table.3. 3. Knowledge is usually represented declaratively in task-specific forms.. An example of grinder selection knowledge described in decision table form is shown in Fig. That representation and language are evaluated according to the above requirements in Section 5. Those objects have internal states and methods that can be activated by other objects. . 2. which utilizes human expert knowledge. such as main flow description. The other part combines conventional functions. (1) (2) (3) (4) short learning time minimal development effort reasonable computational performance. decision trees. For example. However. Consider a simple example for a grinder selection problem in a hypothetical factory. without the help of knowledge engineers. which consist of problem-solving components and conventional function components. The classification problem is to find appropriate classes for unknown concepts. However.

VISUAL P R O G R A M M I N G The previous section introduced visual knowledge representation for classification problem solving. The decision table representation has three advantages.Visual Programming Environment 483 Material '~ G r i n d e r . Rather than having one kind of wire to represent data flows among program components. of propositional logic functions expressed in DNF (disjunctive normal form). As well as a "what you see is what you get" editing function.H ~ i iLo--~Grinder_L j FIGURE 3. The problem solver can call multiple tables in a hierarchical manner. Although the system provides high productivity and maintainability for classification tasks. Comparing multiple concept functions is also an easy task with this representation. research on visual programming has been active and a variety of languages have been implemented. Prograph. A disadvantage of the tabular representation is that it may become sparse and take up too much space. whereas rule-based representation mixes them because the rule ordering expresses some control knowledge. such as signal processing. a decision tree editor and a problem solver. 1994). Iconic Programming Recently. The system consists of a decision table editor. such as parity functions. particularly procedural ones. The programming language described in this paper is based on an "icon and wire" representation. The second advantage is that it can provide a conclusion even if some of the query attributes are unknown. where program objects are described as boxes and connections among them are indicated by wires. However. Using that function. minimization and verification. it requires an exponential number of rows to implement certain functions. one for control and one for data. The problem solver accomplishes classification by executing a candidate discrimination cycle. This section describes visual programming for the procedural parts and component connecting routines. Another interesting architecture is based on a visual rule production system. Figure 4 shows an example display of these editors. Show and Tell and VisaVis (Hansen. The minimization function shrinks the size of the knowledge base and improves its comprehensibility. In the worst case.1. First. This knowledge can be described in decision tree form as shown in Fig. The problem solver also provides an interactive knowledge acquisition function for refining knowledge bases. 3. a user can easily find which combination of attributes gives the concept as a conclusion. When a set of attributes is given. It is unique in its computational model that is not based on a data flow model. The third advantage is that tabular representation explicitly separates control knowledge from logical knowledge. namely simulation. this situation can be avoided by using hierarchically divided tables. 4. Commercial products are already available for specific purposes. Example decision tree. without being aware of the internal representation. . The most popular architecture for recent visual programming languages is data flow iconic programming. simulation and control systems. when given a concept. For example. The decision table editor and decision tree editor allow direct manipulation of the knowledge base. such as ChemTrains (Bell & Lewis. the language employs two kinds of wires. the user can refine the knowledge base by giving a critique of the final conclusion. The simulation function allows users to validate a knowledge base. which is employed in most of other iconic visual languages. 1993). so that a large knowledge base can be implemented as a collection of tables. such as LabVIEW. It dynamically chooses an appropriate attribute to be acquired according to the information gain per attribute cost. FIGURE 4. This construct allows the handling of disjunctive concepts with multiple-value attributes. we can also see which concepts are selected as a conclusion. 4. Example display of DT. because tables provide multiple views of a knowledge base. the decision table editor provides several functions to help in the construction of knowledge bases. it is not applicable to other types of programming. The verification function checks the completeness and redundancy. Some systems have been designed for general-purpose use. the content is comprehensible to humans.

end. There are three kinds of areas in a box: property. There are three boxes and four wires. Script representation of the example. 4. Figure 7 shows a complete visual program for the previously introduced grinder selection system. Each box consists of several areas with accessible ports. which represents the terminating function. Those two boxes are created by simply dragging and dropping the GUI window objects into the visual programming editor.Bye0. I 4. the text property of the "Name" textbox of the "Reply Window" is set to the value of the "Name" textbox of the "Hello Window". Control Wires and Data Wires The two kinds of wires are represented by solid and dotted lines. database queries and control functions. The result is less comprehensible than the implementation with a task-specific tool. IN e FIGURE 5. Implementing an Expert System by Visual Programming The visual programming is intended to glue together functional components. "Click callbackmethod of FushButton(. The third box is the "exit" box. For example. ~:~i~~'?~.exit0. Pressing the "Bye" button terminates the program. In the example. whose face designs are shown on the right side of the figure. whereas dotted wires show data flow. the two windows on the right side have already been created. The callback function is particular to GUI objects. In the current implementation. Solid wires show control flow. .)" begin .Hello0.text 0 := temp I. The property area represents internal state data. The second box represents the "Reply Window".3. In the figure. After creating those windows. which may be set or read through the ports.hide0. Pressing the "Hello!" button in the top-right comer window named "Hello Window". FIGURE 6. whose face design is shown in the top right of the figure. "Reply Window" has a method called "hide". Koseki et al. Serially connected control wires represent a series of methods to be invoked in that order. the user defines the program behavior as a "visual program" by using the visual program editor. GUI windows. Then the special function "Exit" is invoked to terminate the program.Name0.2. the user at first uses the user interface editor to create face designs of the two windows.)" begin tempi := . .::i~. Among them. which is shown on the left side of the figure. such as buttons and text boxes. end. such as problem solvers. as described in the previous section. Figure 5 shows a simple visual program for a simple graphical user interface (GUI) application. The leftmost box in the visual program represents the "Hello Window". Boxes Boxes represent functional components. The first step in building a hybrid expert system is to implement the problem-solving function by providing a knowledge base and some parameters. The user interface is then designed using the user interface editor and connected to the problemsolving component by visual programming. This example is to provide two GUI windows. When the "Bye" button is pressed. the "name" text-boxes in both windows have the "text" "Click callback method of PushButton(. the box face designs are unified. GUI window objects are special objects that may contain multiple GUI objects. the visual program is translated into an internal script language. Although the intended usage of the visual programming is as "glue".Reply0.HelloO.HelloO. the "hide" method of the "Reply Window" is called and the window becomes hidden.Hello(). method and callback function. without using the decision tree component.~-J .~. it generates an event to call other methods. Simple application. shown in the bottom right. causes the contents of the text-box below to be copied to the text-box of the other window. To realize such a program.ia. which are displayed as triangles. which is called by the callback function of the "Bye" object in the "Hello Window". For example. and data ports. it is possible to implement a decision tree-based classification expert system entirely by visual programming. ~ i~]ReplyWind!~|#. . Figure 6 shows the interpretation of the given example. This is also a good sample for evaluating the comprehensibility of the visual programming. There are two kinds of ports: control ports.t¢×t(). as described in the 4. Although there are many kinds of functional components. when the "Hello!" button of the "Hello Window" is pressed. called "Reply Window". which are displayed as rectangles. Each area has ports. Method is the procedure to be invoked by other objects. . This box is provided by the visual program editor as a default.Reply0Nam¢0.484 Y.i~:~ ~' i:i::i~'ii} [Name ] property.4.

the following simple evaluation with respect to the requirements described early in this paper may be given. data dependencies must be investigated with the help of program analyzing tools.. with negligible overhead for conversion. a small system was developed both with the visual programming system and a conventional textual programming. because visual program is relatively intuitive and comprehensible. it can be observed that the general flow of the decision tree is maintained in the visual program.. However. for experienced programmers... drawing visual programs with mouse operations was expected to have a much higher productivity than textual programs.4..2.~ ~ . 5.. learning another completely different programming type seems to be a burden.r . 5. because the problem-solving knowledge and implementation-specific routines. However. 5... are mixed in the visual programming implementation.Visual Programming Environment 485 W~:. many control lines cross each other and make the visual program incomprehensible. when building a complex system. from experience... Reasonable Computational Performance Because the visual language is converted into internal textual language in the current implementation. Less Development Effort As a comparison.. system ._J . the system provides a function for splitting one box into multiple copies and putting them at arbitrary places (Koike et al. This capability allows programmers 5.. It is still too early to give a concrete evaluation without an extensive evaluation effort. development with the visual program system required almost same amount of time as did the textual programming. 1995).3. visual programs are easy to start with for inexperienced users. Before the experiment. : ~ . such as the window controlling routines (showing and hiding). That is. which may degrade maintainability... However..J • ... EVALUATION Several experimental systems have been developed with the described visual programming tool. Inexperienced users at first tend to encounter a "line congestion problem"... Decision tree Implementation by visual programming. To solve this problem. Short Learning Time Inexperienced users prefer visual programming to textual programming. High Maintainability High maintainability is considered to be the most significant advantage of visual language. for casual programmers who are already comfortable with typing text with a keyboard. 5. because text typing is seldom necessary except for variable names.. method names and class names in visual programming. This gives high maintainability to the program. Since the control flow is visible. since the program is readable and understandable at a later time by a person other than the developer.1. Especially with proper sample programs.. it is easy to understand the flow of the program at a glance.|~ ~t Oual~/ I~l~l ~ t AnswerWindow I::~IN IMa'e*''? I I I FIGURE 7. the computational performance is comparable to conventional language. m~'*i"~l I . Visible data dependency with data lines also helps the comprehensibility of the program. previous section. I J C3 ~: r m "~i Material I. In textual language. Errors due to mistyping are less frequent in visual programming. who are already familiar with textual programming style. I " ' ' " r-. However.._. The language can be either interpreted or compiled with reasonable performance..

M. & Tanaka. Hansen. Sugiura. of llth 1EEE Symposium on Visual Languages.. In Proc. & Koseki. Y. pp. such as database access and graphical user interface. on Toolsfor A1. Sassin. In Proc. 716-721. M. In Proc. Our future plan includes development of more task-oriented problem solvers. Creating user-intended programs with programming by demonstration. Aoyama. The system is being enhanced to incorporate hierarchical visual programming. pp. a variety of problem-solving objects must be provided. & Koseki.. M. Y. Acknowledgements--The authors express their appreciation to Masahiro Yamamoto. In Proc. so that the line congestion problem may be avoided. Improving readability of iconic programs with multiple view object representation. Third Int. A. In Proc. Other parts are conventional computing functions. of Japan/Korea Joint Conferences on Expert Systems. CONCLUSION This paper describes an approach to using an objectoriented visual programming technique for developing hybrid expert systems. 1994. Maeda. Y. in order to meet the various requirements of expert system development. Sugiura. The system consists of several computational components.486 Y. Y. Y.. Second. Takeshi Yoshimura and Masanobu Watanabe of the NEC Corporation for giving them the opportunity to pursue this research. 164-171. W. . We are currently investigating a way to incorporate a PBD (programming by demonstration) approach to creating initial visual programs (Sassin. such as a combinatorial optimization problem solver. 37-44. of 1994 IEEE Symposium on Visual Languages. Comprehensibility improvement of tabular knowledge base. (1995). Y. of IEEE Symposium on Visual Languages. 156-163. In Proc. it requires almost the same effort as textual programming. pp. & Koseki. However. M. of lEEE Symposium on Visual Languages. B. Sugiura. Third. pp. Suguira & Koseki. (1991). Empirical evaluation shows that its maintainability is superior to textual programming languages. (Moderator) (1994). of AAAI-93. (1993). (1994). 188-195. J. (1995). Y. because of its high comprehensibility. C. pp. some of which are taskspecific problem-solving tools. The first problem encountered is scalability. N. Conf.. Riesenhuber. & Lewis. A. 90-97. some problems remain to be solved in future work. (1994). Creating database queries by demonstration. Y. it is unable to construct highly complex systems by visual programming alone. to organize the program according to the main control flow of the program. pp. 1995). Tanaka. A. In Proc.. 159-164. even though visual programming results in high comprehensibility and maintainability. The 1994 visual languages comparison. In Proc. of llth IEEE Symposium on Visual Languages. & Koseki. Koike. The system has been used to develop some experimental expert systems. Integration of multiple knowledge representation for classification problems. REFERENCES Bell. Koseki. pp. Koseki et al. 6. pp. 153-160. Nakakuki. Since the current implementation does not support hierarchical construction of visual programming. DT: A classification problem solver with tabular-knowledge acquisition. Visual programming is used to glue those computational components together to make up a complete system. (1993). ChemTrains: a language for creating behaving pictures.

Master your semester with Scribd & The New York Times

Special offer for students: Only $4.99/month.

Master your semester with Scribd & The New York Times

Cancel anytime.