Fast decompilation of compiled Prolog clauses
Serious Prolog implementations in recent years have been primarily compiler-based, nearly all of which are founded on the abstract instruction set of Warren . 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.
KeywordsCode Structure Machine Instruction Abstract Machine Database Operation Unit Clause
Unable to display preview. Download preview PDF.
- 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
- Clocksin, W. F. Implementation Techniques for Prolog Databases. Software—Practice and Experience, 15(7). pp. 669–75, 1985.Google Scholar
- Warren D. H. D., An Abstract Prolog Instruction Set. Technical Note 309. Artificial Intelligence Center, SRI International, 1983.Google Scholar