skip to main content
research-article

Integrated symbol table, engine and heap memory management in multi-engine prolog

Published:04 June 2011Publication History
Skip Abstract Section

Abstract

We describe an integrated solution to symbol, heap and logic engine memory management in a context where exchanges of arbitrary Prolog terms occur between multiple dynamically created engines, implemented in a new Java-based experimental Prolog system.

As our symbols represent not just Prolog atoms, but also handles to Java objects (including arbitrary size integers and decimals), everything is centered around a symbol garbage collection algorithm ensuring that external objects are shared and exchanged between logic engines efficiently.

Taking advantage of a tag-on-data heap representation of Prolog terms, our algorithm performs in-place updates of live symbol references directly on heap cells.

With appropriate fine tuning of collection policies our algorithm provides an integrated memory management solution for Prolog systems, with amortized cost dominated by normally occurring heap garbage collection costs.

References

  1. H. Aït-Kaci. Warren's Abstract Machine: A Tutorial Reconstruction. MIT Press, 1991. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. M. Banbara, N. Tamura, and K. Inoue. Prolog Cafe: a Prolog to Java translator system. Lecture Notes in Computer Science, 4369: 1, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. M. Carlsson, J. Widen, J. Andersson, S. Andersson, K. Boortz, H. Nilsson, and T. Sjoland. SICStus Prolog user's manual.Google ScholarGoogle Scholar
  4. Manuel Carro and Manuel V. Hermenegildo. Concurrency in Prolog Using Threads and a Shared Database. In ICLP, pages 320--334, 1999. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. J.J. Cook. P#: A concurrent Prolog for the .NET Framework. Software: Practice and Experience, 34 (9): 815--845, 2004. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. B. Demoen and P. Tarau. jProlog home page (1996) http://www. cs. kuleuven. ac. be/~bmd.Google ScholarGoogle Scholar
  7. B. Demoen, P.L. Nguyen, and R. Vandeginste. Copying garbage collection for the WAM: To mark or not to mark? Lecture notes in computer science, pages 194--208, 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. Bart Demoen, Gert Engels, and Paul Tarau. Segment Preserving Copying Garbage Collection for WAM based Prolog. In Proceedings of the 1996 ACM Symposium on Applied Computing, pages 380--386, Philadelphia, February 1996. ACM Press. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. Gopal Gupta, Enrico Pontelli, Khayri A.M. Ali, Mats Carlsson, and Manuel V. Hermenegildo. Parallel execution of prolog programs: a survey. ACM Trans. Program. Lang. Syst., 23 (4): 472--602, 2001. ISSN 0164-0925. http://doi.acm.org/10.1145/504083.504085. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. Manuel V Hermenegildo. An abstract machine for restricted and-parallel execution of logic programs. In Proceedings on Third international conference on logic programming, pages 25--39, New York, NY, USA, 1986. Springer-Verlag New York, Inc. ISBN 0-387-16492-8. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. T. Lindgren. Atom garbage collection. In Proceedings of the 2005 ACM SIGPLAN workshop on Erlang. ACM, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. Ewing Lusk, Shyam Mudambi, Ecrc Gmbh, and Ross Overbeek. Applications of the aurora parallel prolog system to computational molecular biology. In In Proc. of the JICSLP'92 Post-Conference Joint Workshop on Distributed and Parallel Implementations of Logic Programming Systems, Washington DC. MIT Press, 1993. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. Paul Tarau. A Simplified Abstract Machine for the Execution of Binary Metaprograms. In Proceedings of the Logic Programming Conference'91, pages 119--128. ICOT, Tokyo, 7 1991.Google ScholarGoogle Scholar
  14. Paul Tarau. Program Transformations and WAM-support for the Compilation of Definite Metaprograms. In Andrei Voronkov, editor, Logic Programming, RCLP Proceedings, number 592 in Lecture Notes in Artificial Intelligence, pages 462--473, Berlin, Heidelberg, 1992. Springer-Verlag. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. Paul Tarau. Low level Issues in Implementing a High-Performance Continuation Passing Binary Prolog Engine. In M.-M. Corsini, editor, Proceedings of JFPL'94, June 1994.Google ScholarGoogle Scholar
  16. Paul Tarau. Inference and Computation Mobility with Jinni. In K.R. Apt, V.W. Marek, and M. Truszczynski, editors, The Logic Programming Paradigm: a 25 Year Perspective, pages 33--48. Springer, 1999. ISBN 3-540-65463-1.Google ScholarGoogle Scholar
  17. Paul Tarau. Fluents: A Refactoring of Prolog for Uniform Reflection and Interoperation with External Objects. In John Lloyd, editor, Computational Logic--CL 2000: First International Conference, London, UK, July 2000. LNCS 1861, Springer-Verlag. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. Paul Tarau. Orthogonal Language Constructs for Agent Oriented Logic Programming. In Manuel Carro and Jose F. Morales, editors, Proceedings of CICLOPS 2004, Fourth Colloquium on Implementation of Constraint and Logic Programming Systems, Saint-Malo, France, September 2004. URL http://clip.dia.fi.upm.es/Conferences/CICLOPS-2004/.Google ScholarGoogle Scholar
  19. Paul Tarau. BinProlog 11.x Professional Edition: Advanced BinProlog Programming and Extensions Guide. Technical report, BinNet Corp., 2006. URL http://www.binnetcorp.com/BinProlog.Google ScholarGoogle Scholar
  20. Paul Tarau. Logic Engines as Interactors. In Maria Garcia de la Banda and Enrico Pontelli, editors, Logic Programming, 24-th International Conference, ICLP, pages 703--707, Udine, Italy, December 2008. Springer, LNCS. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. Paul Tarau. Concurrent programming constructs in multi-engine prolog. In Proceedings of DAMP'11: ACM SIGPLAN Workshop on Declarative Aspects of Multicore Programming, New York, NY, USA, 2011. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. Paul Tarau and Michel Boyer. Elementary Logic Programs. In P. Deransart and J. MaluszyŃski, editors, Proceedings of Programming Language Implementation and Logic Programming, number 456 in Lecture Notes in Computer Science, pages 159--173. Springer, August 1990. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. Paul Tarau and Arun Majumdar. Interoperating Logic Engines. In Practical Aspects of Declarative Languages, 11th International Symposium, PADL 2009, pages 137--151, Savannah, Georgia, January 2009. Springer, LNCS 5418. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. Paul Tarau and Ulrich Neumerkel. A Novel Term Compression Scheme and Data Representation in the BinWAM. In M. Hermenegildo and J. Penjam, editors, Proceedings of Programming Language Implementation and Logic Programming, number 844 in Lecture Notes in Computer Science, pages 73--87. Springer, September 1994. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. Satyam Tyagi and Paul Tarau. A Most Specific Method Finding Algorithm for Reflection Based Dynamic Prolog-to-Java Interfaces. In I.V. Ramakrishan and Gopal Gupta, editors, Proceedings of PADL'2001, Las Vegas, March 2001. Springer-Verlag. Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. R. Vandeginste, K. Sagonas, and B. Demoen. Segment order preserving and generational garbage collection for Prolog. Lecture notes in computer science, pages 299--317, 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. J. Wielemaker, M. Hildebrand, and J. van Ossenbruggen. Using Prolog as the fundament for applications on the semantic web. Proceedings of ALPSWS2007, pages 84--98, 2007.Google ScholarGoogle Scholar
  28. Jan Wielemaker. Native Preemptive Threads in SWI-Prolog. In Catuscia Palamidessi, editor, ICLP, volume 2916 of Lecture Notes in Computer Science, pages 331--345. Springer, 2003. ISBN 3-540-20642-6.Google ScholarGoogle Scholar
  29. Qinan Zhou and Paul Tarau. Garbage Collection Algorithms for Java-Based Prolog Engines. In V. Dahl and P. Wadler, editors, Practical Aspects of Declarative Languages, 5th International Symposium, PADL 2003, pages 304--320, New Orleans, USA, January 2003. Springer, LNCS 2562. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Integrated symbol table, engine and heap memory management in multi-engine prolog

      Recommendations

      Comments

      Login options

      Check if you have access through your login credentials or your institution to get full access on this article.

      Sign in

      Full Access

      PDF Format

      View or Download as a PDF file.

      PDF

      eReader

      View online with eReader.

      eReader
      About Cookies On This Site

      We use cookies to ensure that we give you the best experience on our website.

      Learn more

      Got it!