The validation of a Knowledge Based System (KBS) involves comparisons between an external reference model and a system’s component parts. In this paper I describe how such comparisons can be aided by the application of software visualization technology. Software visualization is the use of filmcraft, cartoon animation and graphic design techniques to display data structures, programs, and algorithms. The described approach eases the task of mapping between the comparates by the use of dynamic code, design, and domain oriented visualizations of KBS execution. 1 . INTRODUCTION Software Visualization (SV) [Price et al., 1993] is the use of filmcraft, cartoon animation and graphic design techniques to display data structures, programs, and algorithms. Software visualization is basically the unification of algorithm animation and program visualization, two concurrent developments from the 1980s. Algorithm animations are high level characterisations of how data is manipulated during a program execution. Program visualization systems display graphical representations that are more tightly coupled with a program's code or data and show more or less faithful representations of the code as it is executing. The validation of a Knowledge Based System (KBS) involves the comparison of a model residing within the KBS against a reference model which is usually external to the system. A variety of techniques exist for carrying out the comparisons. The techniques are either carried out by hand or involve the use of a ‘black box’ program. In this paper I describe how software visualization technology could be used to support the validation process. In particular I address the following questions: • what types of validation can SV aid? • what validation techniques can most benefit from SV? • what sorts of validation questions can be answered using SV? I will also describe how SV was used in the ESPRIT-II funded VITAL 2,3 project [Shadbolt et al., 1994] [Domingue et al., 1993] to validate the Sisyphus I [Linster, 1992] application. The rest of this paper is structured as follows. In the next section I will review some related SV work including KBS visualization systems. Section 3 contains an overview of KBS validation structured according to the three questions posed above. The following section outlines the SV supported approach to validation adopted in the VITAL project. Section 5 contains the example validation. Section 6 discusses the approach in detail, and the final section contains some conclusions. 2 . SOFTWARE VISUALIZATION 2 . 1 . Algorithm Animation As may seem self evident algorithm animations are designed to explain algorithms. The explanations are generally used to educate students or aid researchers understand/improve/create algorithms. The birth of the algorithm animation field can be traced back to the Sorting Out Sorting (SOS) film [Baecker, 1981]. The film, which depicts various sorting algorithms, was developed for an undergraduate computer science course. After SOS, the next major contribution to the field was provided by the BALSA system [Brown, 1988]. BALSA allowed developers to create graphical views which could be tied into computer programs. As the programs ran, high level animations of the data would be displayed enabling aspects of the underlying 1 Accepted at KAW'95 the Ninth Knowledge Acquisition Workshop for Knowledge Based Systems Banff Canada. 2 VITAL is partially funded by the ESPRIT Program of the Commision of the European Communities, as project number 5365. 3 The partners in the VITAL project are the following: Syseca Temps Reel (F), Bull Cediag (F), Onera (F), The Open University (UK), University of Nottingham (UK), Royal PTT Netherland (NL), Nokia (SF), University of Helsinki (SF), and Andersen Consulting (E). This paper reflects the opinions of the author and not necessarily those of the consortium. Using Software Visualization Technology in the Validation of Knowledge Based Systems Page 2 algorithm to be viewed. BALSA was successfully used at Brown university to teach undergraduate computer science courses. A screen snapshot of BALSA is shown below. Figure 1. A screen snapshot from the Balsa system showing an animation of the insertion sort algorithm. Since BALSA a number of systems have been created which have added smooth animation (TANGO [Stasko, 199?]), three dimensional graphics (POLKA [Stasko & Wehrli, 1993] and ZEUS [Brown & Najork, 1993]) and sound (ZEUS [Brown & Hershberger, 1991]). Figure 1 above shows a screen snapshot from the BALSA system animating an insertion sort algorithm. The window on the left represents each item to be sorted as a stick. The position of the item within the array is represented by its x co-ordinate and the item’s value is represented by its height. The item currently being examined is shown in grey. The first row within the window on the right shows the initial array. Each subsequent row shows the history of each item, so, for example, the sixth row indicates that item E was compared with items K, J, G and B. E was smaller than the first three but larger than the last. 2 . 2 . Program Visualization Systems Program visualization systems use graphics to show control flow in program execution. Program visualization systems are broader in scope than algorithm animations since they provide a graphical representation of any program within a given language. Partly due to their broad scope and partly due to the fact that they are designed to show the execution of a program rather than an abstract algorithm, program visualization systems tend to use simpler graphics than algorithm animation systems. In the rest of this section I shall review some KBS visualization systems. 2 . 2 . 1 Visualizing the Execution of KBS Guidon-Watch [Richer & Clancey, 1985] is a graphic interface to NEOMYCIN, providing multiple views on a knowledge base. The knowledge base includes findings, hypotheses, rules, tasks and relations. The taxonomy of diseases is displayed graphically as a tree. Program visualization is provided by highlighting the diseases that are currently being considered. Diseases which were once considered but are no longer, are shown Using Software Visualization Technology in the Validation of Knowledge Based Systems Page 3 as dim boxes. Guidon-Watch also allows the Knowledge Engineer (KE) to view facts which have been inferred from the rulebase and the current stack of goals. DTree [Mott & Brooke, 1987] uses a tree based representation to display rule structure. The trees are made up of nodes, each of which contain a feature and a colour. Features are global predicates which may be true or false. The value of a feature is indicated by its colour. TPM (Transparent Prolog Machine) [Eisenstadt & Brayshaw, 1988] provides synchronised fine and coarsegrained visualizations (examples are shown in the two figures below) for Prolog based on augmented ‘and/or’ trees. TPM can visualize the execution of arbitrarily sized Prolog programs using several navigation techniques. For example, a programmer can specify a set of predicates whose subtrees should be collapsed (this is shown in figure 3). This enables irrelevant submodules of a program to be ‘black boxed away’. member(X , [Head | Tail ] ) 2 member(joe, [ tom | [ joe, sue ] ] )
[1]
John Domingue,et al.
A framework for describing and implementing software visualization systems
,
1992
.
[2]
Robert M. O'Keefe,et al.
Knowledge Base Verification
,
1997
.
[3]
Blaine A. Price,et al.
A Principled Taxonomy of Software Visualization
,
1993,
J. Vis. Lang. Comput..
[4]
William J. Clancey,et al.
Guidon-Watch: A Graphic Interface for Viewing a Knowledge-Based System
,
1985,
IEEE Computer Graphics and Applications.
[5]
John Domingue.
Compressing and comparing metric execution spaces
,
1990,
INTERACT.
[6]
Enrico Motta,et al.
Grounding GDMs: a structured case study
,
1994,
Int. J. Hum. Comput. Stud..
[7]
John Hershberger,et al.
Color and sound in algorithm animation
,
1992,
Computer.
[8]
Enrico Motta,et al.
Constructing knowledge-based systems
,
1993,
IEEE Software.
[9]
J.T. Stasko,et al.
Three-dimensional computation visualization
,
1993,
Proceedings 1993 IEEE Symposium on Visual Languages.
[10]
Peter L. Mott,et al.
A graphical inference mechanism
,
1987
.
[11]
Enrico Motta,et al.
The Emerging VITAL Workbench
,
1993,
EKAW.
[12]
Enrico Motta,et al.
Visual Knowledge Engineering
,
1990,
IEEE Trans. Software Eng..
[13]
Marc H. Brown,et al.
Zeus: a system for algorithm animation and multi-view editing
,
1991,
Proceedings 1991 IEEE Workshop on Visual Languages.
[14]
John Domingue,et al.
A New Metaphor for the Graphical Explanation of Forward-Chaining Rule Execution
,
1989,
IJCAI.
[15]
Johanna D. Moore,et al.
Enhanced Maintenance and Explanation of Expert Systems Through Explicit Models of Their Development
,
1984,
IEEE Transactions on Software Engineering.
[16]
Osman Balci,et al.
Validating Expert System Performance
,
1987,
IEEE Expert.
[17]
Stéphane Loiseau,et al.
A method for checking and restoring the consistency of knowledge bases
,
1994,
Int. J. Hum. Comput. Stud..
[18]
Brian R. Gaines,et al.
Integration Issues in Knowledge Support Systems
,
1989,
Int. J. Man Mach. Stud..
[19]
Marc Eisenstadt,et al.
The Transparent Prolog Machine (TPM): An Execution Model and Graphical Debugger for Logic Programming
,
1988,
J. Log. Program..
[20]
Philip Klahr,et al.
Evaluation of expert systems: issues and case studies
,
1983
.
[21]
Izak Benbasat,et al.
A framework for the validation of knowledge acquisition
,
1989
.
[22]
J.T. Stasko,et al.
Tango: a framework and system for algorithm animation
,
1990,
Computer.
[23]
Enrico Motta,et al.
The Abstract Interpretation of Hybrid Rule/Frame-Based Systems
,
1991,
EUROVAV.
[24]
Enrico Motta,et al.
Symbol-Level Requirements for Agent-Level Programming
,
1994,
ECAI.
[25]
Walton A. Perkins,et al.
Checking an Expert Systems Knowledge Base for Consistency and Completeness
,
1985,
IJCAI.