An empirical study of negation in datalog programs

Abstract

Datalog is the fusion of prolong and database technologies aimed at producing an difficultly logic-based, declarative language for databases. Since negation was added to Datalog, Datalog has become more expressive. In this thesis, I focus my attention on adding negation to DatalogIC which is a language which has been implemented by Mark P. Wassell, a past MSc student in the Department of Computer Science at UCT. I analyse and compare stratified, well-founded and inflationary semantics for negation, each of which has been implemented on top of INFORMIX; we call the resulting system NDatalog. According to the test results, we find that some results are unexpected. For example, when we evaluate a recursive stratified program, the results show that NDatalogstra is slower than NDatalogwellf although NDatalogwellf is more complex. After further investigation, I find the problem is that the NDatalog system has to spend a lot of time imitating the MINUS function, which does not exist in INFORMIX-SQL. So the running time depends on what kind of database system is used as backend. When we consider the time spent on pure evaluation, excluding auxiliary functions, we find that the results support our expectations, namely, that NDatalogstra is faster than NDatalogwellf which is faster than NDataloginf

    Similar works