Partial Deduction of the Ground Representation and its Application to Integrity Checking

Integrity constraints are very useful in many contexts, such as, for example, deductive databases, abductive and inductive logic programming. However, fully testing the integrity constraints after each update or modification can be very expensive and methods have been developed which simplify the integrity constraints. In this paper, we pursue the goal of writing this simplification procedure as a meta-program in logic programming and then using partial deduction to obtain pre-compiled integrity checks for certain update patterns. We argue that the ground representation has to be used to write this meta-program declaratively. We however also show that, contrary to what one might expect, current partial deduction techniques are then unable to specialise this meta-interpreter in an interesting way and no pre-compilation cf integrity checks can be obtained. In fact, we show that partial deduction is not able to perform any (sophisticated) specialisation at the object-level for meta-interpreters written in the ground representation. We present a solution which uses a novel implementation of the ground representation and an improved partial deduction strategy. With this we are able to overcome the difficulties and produce highly specialised and efficient pre-compiled integrity checks through partial deduction of meta-interpreters