Skip to main content

High-Level Multi-threading Programming in Logtalk

  • Conference paper
Book cover Practical Aspects of Declarative Languages (PADL 2008)

Part of the book series: Lecture Notes in Computer Science ((LNPSE,volume 4902))

Included in the following conference series:

Abstract

Logtalk, an object oriented logic programming language, provides experimental support for multi-threading programming with selected back-end Prolog compilers. By making use of core, low-level Prolog predicates that interface with operating-system native threads, Logtalk provides a high-level set of directives and predicates that allows programmers to easily take advantage of modern multi-processor and multi-core computers without worrying about the details of creating, synchronizing, or communicating with threads. Logtalk multi-threading programming features include support for concurrent calls akin to and-parallelism and or-parallelism, non-deterministic thread goals, asynchronous calls, and predicate synchronization. The integration with the Logtalk object-oriented features allows objects to send and receive both synchronous and asynchronous messages and to call local predicates concurrently. Logtalk multi-threading features are orthogonal to object-oriented concepts and can be useful even in the context of plain Prolog.

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

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. ISO/IEC. International Standard ISO/IEC 9945-1:1996. Information Technology–Portable Operating System Interface (POSIX)–Part 1: System Application: Program Interface (API). ISO/IEC (1996)

    Google Scholar 

  2. Butenhof, D.R.: Programming with POSIX Threads. Professional Computing Series. Addison-Wesley, Reading (1997)

    Google Scholar 

  3. Chandra, R., Dagum, L., Kohr, D., Maydan, D., McDonald, J., Menon, R.: Parallel Programming in OpenMP. Morgan Kaufmann Publishers, Los Altos, CA 94022, USA (2001)

    Google Scholar 

  4. OpenMP: Simple, Portable, Scalable SMP Programming, http://openmp.org/

  5. Intel Threading Building Blocks, http://threadingbuildingblocks.org/

  6. Gupta, G., Pontelli, E., Ali, K., Carlsson, M., Hermenegildo, M.: Parallel Execution of Prolog Programs: A Survey. ACM Transactions on Programming Languages and Systems 23(4), 472602 (2001)

    Article  Google Scholar 

  7. Costa, V.S., Warren, D.H.D., Yang, R.: Andorra-I: A Parallel Prolog System that Transparently Exploits both And- and Or-Parallelism. SIGPLAN Not. 26(7), 83–93 (1991)

    Article  Google Scholar 

  8. Ali, K., Karlsson, R.: The Muse Or-parallel Prolog model and its performance. In: Proceedings of the 1990 North American conference on Logic programming, pp. 757–776. MIT Press, Cambridge (1990)

    Google Scholar 

  9. Moura, P.: Logtalk – Design of an Object-Oriented Logic Programming Language. PhD thesis, Department of Computer Science, University of Beira Interior, Portugal (September 2003)

    Google Scholar 

  10. Moura, P.: Logtalk web site, http://logtalk.org/

  11. Moura, P., Marchetti, V.: Logtalk Processing of STEP Part 21 Files. In: Etalle, S., Truszczyński, M. (eds.) ICLP 2006. LNCS, vol. 4079, pp. 453–454. Springer, Heidelberg (2006)

    Chapter  Google Scholar 

  12. Wielemaker, J.: Native preemptive threads in SWI-Prolog. In: Palamidessi, C. (ed.) ICLP 2003. LNCS, vol. 2916, pp. 331–345. Springer, Heidelberg (2003)

    Google Scholar 

  13. Costa, V.S.: YAP Home Page, http://www.ncc.up.pt/~vsc/Yap/

  14. Clark, K.L., Robinson, P., Hagen, R.: Multi-threading and Message Communication in Qu-Prolog. Theory and Practice of Logic Programming 1(3), 283–301 (2001)

    Article  MATH  Google Scholar 

  15. Robinson, P.: Qu-prolog web site, http://www.itee.uq.edu.au/~pjr/HomePages/QuPrologHome.html

  16. Tarau, P.: BinProlog 2006 11.x Professional Edition – Advanced BinProlog Programming and Extensions Guide (2006)

    Google Scholar 

  17. Tarau, P.: BinNet Corporation. BinProlog Home Page, http://www.binnetcorp.com/BinProlog/

  18. The XSB Research Group. The XSB Programmer’s Manual: version 3.1 (2007)

    Google Scholar 

  19. The XSB Research Group. XSB Home Page, http://xsb.sourceforge.net/

  20. Carro, M., Hermenegildo, M.: Concurrency in Prolog Using Threads and a Shared Database. In: International Conference on Logic Programming, pp. 320–334 (1999)

    Google Scholar 

  21. Moura, P.(ed.): ISO/IEC DTR 132115:2007 Prolog Multi-threading predicates, http://logtalk.org/plstd/threads.pdf

  22. Hermenegildo, M.V., Rossi, F.: Strict and Nonstrict Independent And-Parallelism in Logic Programs: Correctness, Efficiency, and Compile-Time Conditions. Journal of Logic Programming 22(1), 1–45 (1995)

    Article  MATH  MathSciNet  Google Scholar 

  23. González, A.: Speculative Threading: Creating New Methods of Thread-Level Parallelization (December 2005), http://www.intel.com/technology/magazine/research/speculative-threading-1205.htm

  24. Wikipedia: Dining philosophers problem, http://en.wikipedia.org/wiki/Dining_philosophers_problem

  25. Eskilson, J., Carlsson, M.: SICStus MT—A Multithreaded Execution Environment for SICStus Prolog. In: Palamidessi, C., Glaser, H., Meinke, K. (eds.) ALP 1998 and PLILP 1998. LNCS, vol. 1490, pp. 36–53. Springer, Heidelberg (1998)

    Chapter  Google Scholar 

  26. Hedqvist, P.: A Parallel and Multithreaded Erlang Implementation. Master’s thesis, Uppsala University, Uppsala, Sweden (June 1998)

    Google Scholar 

  27. Erlang Home Page, http://www.erlang.org/

  28. Hodgson, J.: ISO/IEC/ JTC1/SC22/WG17 Official Home Page, http://www.sju.edu/~jhodgson/wg17/wg17web.html

Download references

Author information

Authors and Affiliations

Authors

Editor information

Paul Hudak David S. Warren

Rights and permissions

Reprints and permissions

Copyright information

© 2007 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Moura, P., Crocker, P., Nunes, P. (2007). High-Level Multi-threading Programming in Logtalk. In: Hudak, P., Warren, D.S. (eds) Practical Aspects of Declarative Languages. PADL 2008. Lecture Notes in Computer Science, vol 4902. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-540-77442-6_18

Download citation

  • DOI: https://doi.org/10.1007/978-3-540-77442-6_18

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-77441-9

  • Online ISBN: 978-3-540-77442-6

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics