Fast decompilation of compiled Prolog clauses

  • Kevin A. Buettner
Session 7a: Compilation
Part of the Lecture Notes in Computer Science book series (LNCS, volume 225)


Serious Prolog implementations in recent years have been primarily compiler-based, nearly all of which are founded on the abstract instruction set of Warren [1983]. The performance achieved by such implementations greatly outstrips that attainable in interpreter-based systems. Unfortunately, the sophistication of these compiler-based environments is often inferior to environments of interpreter-based systems to the extent that a “compatible” interpreter is often required for serious software development. Among the deficiencies of these environments, database operations such as assert, retract, and clause seem to be particularly afflicted. In addition, the ability to debug compiled code has been either non-existent or at best, very constrained.

Unlike compiler technology of many traditional languages, there is little reason for this to be the case in Prolog. An efficient implementation of retract, listing, and clause by decompilation of compiled clause code is the subject of this paper. Techniques used in the implementation of the decompilation process have also proven useful in the implementation of the standard four port debugger found in many Prolog systems.


Code Structure Machine Instruction Abstract Machine Database Operation Unit Clause 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. Bowen, K. A. and Weinberg, T. A Meta-level Extension of Prolog. 1985 Symposium on Logic Programming. pp. Boston, IEEE, pp. 48–53, 1985.Google Scholar
  2. Clocksin, W. F. Implementation Techniques for Prolog Databases. Software—Practice and Experience, 15(7). pp. 669–75, 1985.Google Scholar
  3. Warren D. H. D., An Abstract Prolog Instruction Set. Technical Note 309. Artificial Intelligence Center, SRI International, 1983.Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 1986

Authors and Affiliations

  • Kevin A. Buettner
    • 1
  1. 1.Logic Programming Research Group School of Computer & Information ScienceSyracuse UniversityItaly

Personalised recommendations