Skip to main content

A compile-time memory-reuse scheme for concurrent logic programs

  • Logic Programming Languages I
  • Conference paper
  • First Online:

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 637))

Abstract

As large amounts of garbage are generated in concurrent logic programs, it becomes necessary to salvage used memory frequently and efficiently, with a garbage collector. Another approach is to detect when a data structure becomes garbage and reuse it. In concurrent languages it is particularly difficult to determine when a data structure is garbage and suitable for destructive update. Dynamic schemes, such as reference counting, incur space and time overheads that can be unacceptable. In contrast, static-analysis techniques identify data objects whose storage may be reused. Information from static analysis can be used by the compiler in generating appropriate instructions for reuse, incurring little or no runtime overhead. In this paper we present a new static-analysis technique for reuse detection. We present empirical performance measurements comparing the new scheme against binary reference counting (MRB). It is shown that, a simple static analysis can achieve most of the benefits of MRB and improve the execution time.

This is a preview of subscription content, log in via an institution.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. A. Bloss. Path Analysis and Optimization of Non-Strict Functional Languages. PhD thesis, Yale University, Dept. of Computer Science, New Haven, May 1989.

    Google Scholar 

  2. M. Bruynooghe et al. Abstract Interpretation: Towards the Global Optimization of Prolog Programs. In International Symposium on Logic Programming, pages 192–204. San Francisco, IEEE Computer Society, August 1987.

    Google Scholar 

  3. D. R. Chase, M. Wegman, and F. K. Zadeck. Analysis of Pointers and Structures. In SIGPLAN Conference on Programming Language Design and Implementation, pages 296–309, White Plains, NY, June 1990. ACM Press.

    Google Scholar 

  4. T. Chikayama and Y. Kimura. Multiple Reference Management in Flat GHC. In International Conference on Logic Programming, pages 276–293. University of Melbourne, MIT Press, May 1987.

    Google Scholar 

  5. C. Codognet, P. Codognet, and M. Corsini. Abstract Interpretation of Concurrent Logic Languages. In North American Conference on Logic Programming, pages 215–232. Austin, MIT Press, October 1990.

    Google Scholar 

  6. L. P. Deutsch and D. G. Bobrow. An Efficient Incremental, Automatic Garbage Collector. Communications of the ACM, 19:522–526, September 1976.

    Article  Google Scholar 

  7. S. Duvvuru. Monaco: A High Performance Architecture for Concurrent Logic Programs. Master's thesis, University of Oregon, June 1992.

    Google Scholar 

  8. I. Foster and W. Winsborough. A Computational Collecting Semantics for Strand. Research report, Argonne National Laboratory, 1990. unpublished.

    Google Scholar 

  9. I. Foster and W. Winsborough. Copy Avoidance through Compile-Time Analysis and Local Reuse. In International Symposium on Logic Programming, pages 455–469. San Diego, MIT Press, November 1991.

    Google Scholar 

  10. P. Hudak. A Semantic Model of Reference Counting and Its Abstraction. In Conference on Lisp and Functional Programming, pages 351–363, Cambridge, 1986. ACM Press.

    Google Scholar 

  11. P. Hudak and A. Bloss. The Aggregate Update Problem in Functional Programming Languages. In SIGPLAN Symposium on Principles of Programming Languages, pages 300–314, New Orleans, January 1985. ACM Press.

    Google Scholar 

  12. ICOT. PDSS Manual (Version 2.52e). 21F Mita Kokusai Bldg, 1-4-28 Mita, Minatoku Tokyo 108, Japan, February 1989.

    Google Scholar 

  13. Y. Inamura, N. Ichiyoshi, K. Rokusawa, and K. Nakajima. Optimization Techniques Using the MRB and Their Evaluation on the Multi-PSI/V2. In North American Conference on Logic Programming, pages 907–921. Cleveland, MIT Press, October 1989.

    Google Scholar 

  14. D. Jacobs and A. Langen. Accurate and Efficient Approximation of Variable Aliasing in Logic Programs. In North American Conference on Logic Programming, pages 154–165. Cleveland, MIT Press, October 1989.

    Google Scholar 

  15. A. Mulkers, W. Winsborough, and M. Bruynooghe. Analysis of Shared Data Structures for Compile-Time Garbage Collection in Logic Programs. In International Conference on Logic Programming, pages 747–762. Jerusalem, MIT Press, June 1990.

    Google Scholar 

  16. V. A. Saraswat, K. Kahn, and J. Levy. Janus: A Step Towards Distributed Constraint Programming. In North American Conference on Logic Programming, pages 431–446. Austin, MIT Press, October 1990.

    Google Scholar 

  17. A. V. S. Sastry and W. Clinger. Order-of-Evaluation Analysis for Destructive Updates in Strict Functional Languages with Flat Aggregates. Technical Report CIS-TR-92-14, University of Oregon, Computer Science Department, 1992.

    Google Scholar 

  18. D. Schmidt. Detecting Global Variables in Denotational Specifications. ACM Transactions on Programming Languages and Systems, 7(2):299–310, 1985.

    Article  Google Scholar 

  19. E. Y. Shapiro. The Family of Concurrent Logic Programming Languages. ACM Computing Surveys, 2l(3):413–510, September 1989.

    Article  Google Scholar 

  20. J. E. Stoy. Denotational Semantics: The Scott-Strachey Approach to Programming Language Theory. MIT Press, Cambridge MA, first edition, 1977.

    Google Scholar 

  21. R. Sundararajan. An Abstract Interpretation Scheme for Groundness, Freeness, and Sharing Analysis of Logic Programs. Technical Report CIS-TR-91-06, University of Oregon, Department of Computer Science, October 1991.

    Google Scholar 

  22. R. Sundararajan, A. V. S. Sastry, and E. Tick. Variable Threadedness Analysis for Concurrent Logic Programs. In Joint International Conference and Symposium on Logic Programming. Washington D.C., MIT Press, November 1992.

    Google Scholar 

  23. K. Ueda and M. Morita. A New Implementation Technique for Flat GHC. In International Conference on Logic Programming, pages 3–17. Jerusalem, MIT Press, June 1990.

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Yves Bekkers Jacques Cohen

Rights and permissions

Reprints and permissions

Copyright information

© 1992 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Duvvuru, S., Sundararajan, R., Tick, E., Sastry, A.V.S., Hansen, L., Zhong, X. (1992). A compile-time memory-reuse scheme for concurrent logic programs. In: Bekkers, Y., Cohen, J. (eds) Memory Management. IWMM 1992. Lecture Notes in Computer Science, vol 637. Springer, Berlin, Heidelberg. https://doi.org/10.1007/BFb0017195

Download citation

  • DOI: https://doi.org/10.1007/BFb0017195

  • Published:

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-55940-5

  • Online ISBN: 978-3-540-47315-2

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics