Nothing Special   »   [go: up one dir, main page]

skip to main content
research-article

High-Performance Logic Programming with the Aquarius Prolog Compiler

Published: 01 January 1992 Publication History

Abstract

Aquarius Prolog, a high performance compiler designed and built to test the hypothesis that Prolog can be implemented as efficiently as an imperative language by compiling the more powerful features of logic programming only where they are needed, and then only in the simplest form, is described. The authors begin with some background on logic programming and then discuss the Prolog language in more detail. They present an overview of their compiler, giving its structure and the principles underlying its high performance. They compare their system with two popular high-performance commercial systems and with two implementations of C and conclude with an overview of ways to extend this work.

References

[1]
1. R. Kowalski, Logic for Problem Solving, Elsevier North-Holland, Amsterdam, 1979.
[2]
2. H. Aït-Kaci, Warren's Abstract Machine: A Tutorial Reconstruction , MIT Press, Cambridge, Mass., 1991.
[3]
3. J.W. Lloyd, Foundations of Logic Programming, Springer-Verlag, New York, 1987.
[4]
4. W.F. Clocksin and C.S. Mellish, Programming in Prolog, Springer-Verlag, New York, 1981.
[5]
5. L. Sterling and E. Shapiro, The Art of Prolog, MIT Press, Cambridge, Mass., 1986.
[6]
6. B.K. Holmer et al., "Fast Prolog with an Extended General-Purpose Architecture," Proc. 17th Int'l Symp. Computer Architecture , CS Press, Los Alamitos, Calif., Order No. 2047, 1990, pp. 282-291.
[7]
7. P. Van Roy, Can Logic Programming Execute as Fast as Imperative Programming? doctoral dissertation; also Tech. Report UCB/ CSD 90/600, Univ. of California, Berkeley, Calif., 1990.
[8]
8. J. Beer, "The Occur-Check Problem Revisited," J. Logic Programming , Vol. 5, No. 3, Sept. 1988, pp. 243-261.
[9]
9. P. Cousot and R. Cousot, "Abstract Interpretation: A Unified Lattice Model for Static Analysis of Programs by Construction or Approximation of Fixpoints," Proc. Fourth Symp. Principles Programming Languages, ACM, New York, 1977, pp. 238-252.
[10]
10. M. Bruynooghe and G. Janssens, "An Instance of Abstract Interpretation Integrating Type and Mode Inferencing (Extended Abstract)," Fifth Int'l Conf. and Symp. Logic Programming, MIT Press, Cambridge, Mass., 1988, pp. 669-683.
[11]
11. A. Taylor, High-Performance Prolog Implementation, doctoral dissertation, Basser Department of Computer Science, Univ. of Sydney, 1991.
[12]
12. R. Warren, M. Hermenegildo, and S.K. Debray, "On the Practicality of Global Flow Analysis of Logic Programs," Fifth Int'l Conf. and Symp. Logic Programming, MIT Press, Cambridge, Mass., 1988, pp. 684-699.

Cited By

View all
  • (2024)A Case Study in Functional Conversion and Mode Inference in miniKanrenProceedings of the 2024 ACM SIGPLAN International Workshop on Partial Evaluation and Program Manipulation10.1145/3635800.3636966(107-118)Online publication date: 11-Jan-2024
  • (2019)Computing Abstract Distances in Logic ProgramsLogic-Based Program Synthesis and Transformation10.1007/978-3-030-45260-5_4(57-72)Online publication date: 8-Oct-2019
  • (2018)WAM for everyoneDeclarative Logic Programming10.1145/3191315.3191320(237-277)Online publication date: 1-Sep-2018
  • Show More Cited By

Recommendations

Reviews

Yu-Wen Tung

Codes generated by the Aquarius Prolog compiler can be executed faster than other Prolog code, and may be as fast as C code for a restricted class of problems. To demonstrate the ideas behind Aquarius and present the performance results, this paper is organized into six sections. All except the fifth section are well organized and easy to read. The first two sections provide an excellent tutorial for novices in logic programming and Prolog, but can safely be skipped by other readers. The third section describes the Warren Abstract Machine, on which previous Prolog implementations are based. The next section states the performance difficulties that prevent such implementations from becoming a rival to imperative languages. These difficulties include costly backtracking, unnecessary copying of large data structures, and architectural mismatches. Section 5 describes how the Aquarius compiler overcomes the above difficulties . One major idea is its use of an improved execution model called the Berkeley Abstract Machine. This model has an efficient instruction set that allows the compiler to apply expensive operations such as dereferencing and trailing only when necessary. Other techniques employed by Aquarius include finding type information by global analysis and exploiting determinism extensively. The last section presents some significant performance results. Aquarius is typically two or three times faster than Quintus and BIM systems in execution, although its compilation time may be long and it does not generate the most compact code among the three. As for the performance comparison to C, Aquarius beat C on three out of four test programs. It is not clear, however, whether this result implies that Prolog can be made as efficient as an imperative language, which seems to be a major message of this paper. Nevertheless, the paper is worth reading.

Access critical reviews of Computing literature here

Become a reviewer for Computing Reviews.

Comments

Please enable JavaScript to view thecomments powered by Disqus.

Information & Contributors

Information

Published In

cover image Computer
Computer  Volume 25, Issue 1
January 1992
85 pages
ISSN:0018-9162
Issue’s Table of Contents

Publisher

IEEE Computer Society Press

Washington, DC, United States

Publication History

Published: 01 January 1992

Qualifiers

  • Research-article

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)0
  • Downloads (Last 6 weeks)0
Reflects downloads up to 02 Oct 2024

Other Metrics

Citations

Cited By

View all
  • (2024)A Case Study in Functional Conversion and Mode Inference in miniKanrenProceedings of the 2024 ACM SIGPLAN International Workshop on Partial Evaluation and Program Manipulation10.1145/3635800.3636966(107-118)Online publication date: 11-Jan-2024
  • (2019)Computing Abstract Distances in Logic ProgramsLogic-Based Program Synthesis and Transformation10.1007/978-3-030-45260-5_4(57-72)Online publication date: 8-Oct-2019
  • (2018)WAM for everyoneDeclarative Logic Programming10.1145/3191315.3191320(237-277)Online publication date: 1-Sep-2018
  • (2018)Declarative Logic ProgrammingundefinedOnline publication date: 1-Sep-2018
  • (2015)Automated data structure generationProceedings of the 37th International Conference on Software Engineering - Volume 110.5555/2818754.2818761(32-43)Online publication date: 16-May-2015
  • (2012)The yap prolog systemTheory and Practice of Logic Programming10.1017/S147106841100051212:1-2(5-34)Online publication date: 1-Jan-2012
  • (2012)Sicstus prolog-the first 25 yearsTheory and Practice of Logic Programming10.1017/S147106841100048212:1-2(35-66)Online publication date: 1-Jan-2012
  • (2012)On the implementation of gnu prologTheory and Practice of Logic Programming10.1017/S147106841100047012:1-2(253-282)Online publication date: 1-Jan-2012
  • (2008)Translating owl and semantic web rules into prologTheory and Practice of Logic Programming10.1017/S14710684070032498:3(301-322)Online publication date: 1-May-2008
  • (2007)Design, implementation, and evaluation of a dynamic compilation framework for the YAP systemProceedings of the 23rd international conference on Logic programming10.5555/1778180.1778217(410-424)Online publication date: 8-Sep-2007
  • Show More Cited By

View Options

View options

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media