Explaining program execution in deductive systems
Programs in deductive database and programming systems have a natural meaning that is based upon their mathematical reading as logical rules. High-level ‘explanations’ of a program evaluation/execution can be constructed to provide added functionality: (1) To debug a program by following a chain of deductions leading to an unexpected (and possibly incorrect) conclusion; (2) To follow the derivation of certain correct conclusions to determine why and how they are reached; (3) To identify consequences of a (typically, incorrect or unexpected) fact. This functionality can be utilized either to perform post-mortem analysis of a session, or to interactively develop programs by running queries and viewing their deductions simultaneously.
‘Explanations’ of programs are especially important in the context of deductive databases for three reasons: (1) These programs could involve recursion, and hence, the chain of inferences is often not evident. (2) When the input data set is large, it is very difficult for a user to inspect the data and determine which facts lead to which answers, and exactly how. (3) Such programs do not guarantee a fixed evaluation strategy, and this makes it difficult for a user to comprehend unexpected behavior of a program.
With this motivation, we have designed and implemented an explanation facility for the CORAL deductive database system. The design is based on the representation of a program evaluation as a set of derivation trees, and the facility provides a high-level explanation of the inferences carried out during program execution. A notable feature of the implementation is the boot-strapped use of CORAL in the implementation of the explanation tool. We believe that an explanation system can provide a novel approach to interactively querying data, and is useful even for standard relational databases.
Unable to display preview. Download preview PDF.
- [BR87]Catriel Beeri and Raghu Ramakrishnan. On the power of Magic. In Proceedings of the ACM Symposium on Principles of Database Systems, pages 269–283, San Diego, California, March 1987.Google Scholar
- [DE88]M. Ducassé and A. M. Emde. A review of automated debugging systems. In Proceedings of the 10th International Conference on Software Engineering, pages 162–171, April 1988.Google Scholar
- [DMP93]Marcia A. Derr, Shinichi Morishita, and Geoffrey Phipps. Design and implementation of the glue-nail database system. In Proceedings of ACM SIG-MOD International Conference on Management of Data, 1993.Google Scholar
- [Duc92]M. Ducassé. A general trace query mechanism based on prolog. In Proceedings of the Fourth International Symposium on Programming Language Implementation and Logic Programming, August 1992.Google Scholar
- [Mot86]Amihai Motro. Seave: A mechanism for verifying user presuppositions in query systems. ACM Transactions on Office Information Systems, 4(4):312–330, October 1986.Google Scholar
- [Mot90]Amihai Motro. Flex: A tolerant and cooperative user interface to databases. IEEE Transactions on Knowledge and Data Engineering, 2(2):231–246, June 1990.Google Scholar
- [Ram88]Raghu Ramakrishnan. Magic templates: A spellbinding approach to logic programs. In Proceedings of the International Conference on Logic Programming, pages 140–159, Seattle, Washington, August 1988.Google Scholar
- [RSS92]Raghu Ramakrishnan, Divesh Srivastava, and S. Sudarshan. Coral — control, relations and logic. In Proceedings of the International Conference on Very Large Databases(VLDB), pages 238–249, 1992.Google Scholar
- [RSSS93a]Raghu Ramakrishnan, Praveen Seshadri, Divesh Srivastava, and S. Sudarshan. The CORAL User Manual. University of Wisconsin, Madison, 1.0 edition, January 1993.Google Scholar
- [RSSS93b]Raghu Ramakrishnan, Divesh Srivastava, S. Sudarshan, and Praveen Seshadri. Implementation of the CORAL deductive database system. In Proceedings of ACM SIGMOD International Conference on Management of Data, 1993.Google Scholar
- [Sha83]Ehud Y. Shapiro. Algorithmic Program Debugging. MIT Press, Cambridge, Massachusetts, 1983.Google Scholar
- [ST90]O. Shmueli and S. Tsur. Logical diagnosis of LDL programs. In Proceedings of the Seventh International Conference on Logic Programming, 1990.Google Scholar
- [Sta]F. Staes. The Interactive LOCO Debugger: User Manual. University of Antwerp, UIA.Google Scholar