Hostname: page-component-78c5997874-mlc7c Total loading time: 0 Render date: 2024-11-17T14:34:54.113Z Has data issue: false hasContentIssue false

Speedup of logic programs by binarization and partial deduction

Published online by Cambridge University Press:  16 April 2004

JAN HRŮZA
Affiliation:
Department of Theoretical Computer Science and Mathematical Logic, Charles University, Malostranské náměstí 25, 118 00 Praha 1, Czech Republic (e-mail: hruza@kti.mff.cuni.cz)
PETER šTĚPÁNEK
Affiliation:
Department of Theoretical Computer Science and Mathematical Logic, Charles University, Malostranské náměstí 25, 118 00 Praha 1, Czech Republic (e-mail: petr.stepanek@mff.cuni.cz)

Abstract

Binary logic programs can be obtained from ordinary logic programs by a binarizing transformation. In most cases, binary programs obtained this way are less efficient than the original programs. (Demoen, 1992) showed an interesting example of a logic program whose computational behaviour was improved when it was transformed to a binary program and then specialized by partial deduction. The class of B-stratifiable logic programs is defined. It is shown that for every B-stratifiable logic program, binarization and subsequent partial deduction produce a binary program which does not contain variables for continuations introduced by binarization. Such programs usually have a better computational behaviour than the original ones. Both binarization and partial deduction can be easily automated. A comparison with other related approaches to program transformation is given.

Type
Technical Note
Copyright
© 2004 Cambridge University Press

Access options

Get access to the full version of this content by using one of the access options below. (Log in options will check for institutional or personal access. Content may require purchase if you do not have access.)