Integrity constraints are useful for the specification of deductive databases, as well as for inductive and abductive logic programs. Verifying integrity constraints upon updates is a major efficiency bottleneck and specialised methods have been developed to speedup this task. They can however still incur a considerable overhead. In this paper we propose a solution to this problem by using partial evaluation to pre-compile the integrity checking for certain update patterns. The idea being, that a lot of the integrity checking can already be performed given an update pattern without knowing the actual, concrete update. In order to achieve the pre-compilation, we write the specialised integrity checking as a meta-interpreter in logic programming. This meta-interpreter incorporates the knowledge that the integrity constraints were not violated prior to a given update and uses a technique to lift the ground representation to the non-ground one for resolution. By partially evaluating this meta-interpreter for certain transaction patterns, using a sophisticated partial evaluation technique presented in earlier work, we are able to automatically obtain very efficient specialised update procedures, executing, for instance, substantially faster than the original meta-interpreter. Abstract Integrity constraints are useful for the speci cation of deductive databases, as well as for inductive and abductive logic programs. Verifying integrity constraints upon updates is a major e ciency bottleneck and specialised methods have been developed to speedup this task. They can however still incur a considerable overhead. In this paper we propose a solution to this problem by using partial evaluation to precompile the integrity checking for certain update patterns. The idea being, that a lot of the integrity checking can already be performed given an update pattern without knowing the actual, concrete update. In order to achieve the pre-compilation, we write the specialised integrity checking as a meta-interpreter in logic programming. This meta-interpreter incorporates the knowledge that the integrity constraints were not violated prior to a given update and uses a technique to lift the ground representation to the non-ground one for resolution. By partially evaluating this meta-interpreter for certain transaction patterns, using a sophisticated partial evaluation technique presented in earlier work, we are able to automatically obtain very e cient specialised update procedures, executing, for instance, substantially faster than the original meta-interpreter.
In REF , a partial evaluation of a meta-interpreter is used to produce logic programs that correspond to simplified constraints.
Creating Specialised Integrity Checks Through Partial Evaluation of Meta-Interpreters
J. Log. Program.
J. Log. Program.
Computer Science