Skip to main content

Towards a High-Level Implementation of Execution Primitives for Unrestricted, Independent And-Parallelism

  • Conference paper
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

Most efficient implementations of parallel logic programming rely on complex low-level machinery which is arguably difficult to implement and modify. We explore an alternative approach aimed at taming that complexity by raising core parts of the implementation to the source language level for the particular case of and-parallelism. We handle a significant portion of the parallel implementation at the Prolog level with the help of a comparatively small number of concurrency-related primitives which take care of lower-level tasks such as locking, thread management, stack set management, etc. The approach does not eliminate altogether modifications to the abstract machine, but it does greatly simplify them and it also facilitates experimenting with different alternatives. We show how this approach allows implementing both restricted and unrestricted (i.e., non fork-join) parallelism. Preliminary experiments show that the performance sacrificed is reasonable, although granularity control is required in some cases. Also, we observe that the availability of unrestricted parallelism contributes to better observed speedups.

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. Ait-Kaci, H.: Warren’s Abstract Machine, A Tutorial Reconstruction. MIT Press, Cambridge (1991)

    Google Scholar 

  2. Ali, K.A.M., Karlsson, R.: The Muse Or-Parallel Prolog Model and its Performance. In: 1990 North American Conference on Logic Programming, pp. 757–776. MIT Press, Cambridge (1990)

    Google Scholar 

  3. Bueno, F., Cabeza, D., Carro, M., Hermenegildo, M., López-García, P., Puebla, G. (Eds.): The Ciao System. Ref. Manual (v1.13). Technical report, C. S. School (UPM) (2006), http://www.ciaohome.org

  4. Burton, F.W., Sleep, M.R.: Executing functional programs on a virtual tree of processors. In: Functional Programming Languages and Computer Architecture, pp. 187–195 (October 1981)

    Google Scholar 

  5. Cabeza, D.: An Extensible, Global Analysis Friendly Logic Programming System. PhD thesis, Universidad Politécnica de Madrid (UPM), Facultad Informatica UPM, 28660-Boadilla del Monte, Madrid-Spain (August 2004)

    Google Scholar 

  6. Cabeza, D., Hermenegildo, M.: Implementing Distributed Concurrent Constraint Execution in the CIAO System. In: Proc. of the AGP 1996 Joint Conference on Declarative Programming, pp. 67–78 (July 1996)

    Google Scholar 

  7. Carro, M., Morales, J., Muller, H.L., Puebla, G., Hermenegildo, M.: High-Level Languages for Small Devices: A Case Study. In: Flautner, K., Kim, T. (eds.) Compilers, Architecture, and Synthesis for Embedded Systems, pp. 271–281. ACM Press/Sheridan (October 2006)

    Google Scholar 

  8. Casas, A., Cabeza, D., Hermenegildo, M.: A Syntactic Approach to Combining Functional Notation, Lazy Evaluation and Higher-Order in LP Systems. In: Hagiya, M., Wadler, P. (eds.) FLOPS 2006. LNCS, vol. 3945, Springer, Heidelberg (2006)

    Chapter  Google Scholar 

  9. Casas, A., Carro, M., Hermenegildo, M.: Annotation Algorithms for Unrestricted Independent And-Parallelism in Logic Programs. In: LOPSTR 2007. 17th International Symposium on Logic-based Program Synthesis and Transformation, The Technical University of Denmark, Springer, Heidelberg (2007)

    Google Scholar 

  10. de la Banda, M.G., Hermenegildo, M., Marriott, K.: Independence in CLP Languages. ACM Transactions on Programming Languages and Systems 22(2), 269–339 (2000)

    Article  Google Scholar 

  11. 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), 472–602 (2001)

    Article  Google Scholar 

  12. Halstead, R.H.: MultiLisp: A Language for Concurrent Symbolic Computation. ACM TOPLAS 7(4), 501–538 (1985)

    Article  MATH  Google Scholar 

  13. Hermenegildo, M.: An Abstract Machine for Restricted AND-parallel Execution of Logic Programs. In: Shapiro, E. (ed.) Third International Conference on Logic Programming. LNCS, vol. 225, pp. 25–40. Springer, Heidelberg (1986)

    Google Scholar 

  14. Hermenegildo, M.: Parallelizing Irregular and Pointer-Based Computations Automatically: Perspectives from Logic and Constraint Programming. Parallel Computing 26(13–14), 1685–1708 (2000)

    Article  MATH  Google Scholar 

  15. Hermenegildo, M., Carro, M.: Relating Data–Parallelism and (And–) Parallelism in Logic Programs. The Computer Languages Journal 22(2/3), 143–163 (1996)

    Article  Google Scholar 

  16. Hermenegildo, M., Greene, K.: The &-Prolog System: Exploiting Independent And-Parallelism. New Generation Computing 9(3,4), 233–257 (1991)

    Article  Google Scholar 

  17. Hermenegildo, M., Nasr, R.I.: Efficient Management of Backtracking in AND-parallelism. In: Shapiro, E. (ed.) Third International Conference on Logic Programming. LNCS, vol. 225, pp. 40–55. Springer, Heidelberg (1986)

    Google Scholar 

  18. Hermenegildo, M., Puebla, G., Bueno, F., López García, P.: Integrated Program Debugging, Verification, and Optimization Using Abstract Interpretation (and The Ciao System Preprocessor). Science of Computer Programming 58(1–2), 115–140 (2005)

    Article  MATH  MathSciNet  Google Scholar 

  19. Hermenegildo, M., Rossi, F.: Strict and Non-Strict 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 

  20. Janson, S.: AKL. A Multiparadigm Programming Language. PhD thesis, Uppsala University (1994)

    Google Scholar 

  21. López-García, P., Hermenegildo, M., Debray, S.K.: A Methodology for Granularity Based Control of Parallelism in Logic Programs. Journal of Symbolic Computation, Special Issue on Parallel Symbolic Computation 21(4–6), 715–734 (1996)

    Google Scholar 

  22. Lusk, E., et al.: The Aurora Or-Parallel Prolog System. New Generation Computing 7(2,3) (1990)

    Google Scholar 

  23. Mera, E., López-García, P., Puebla, G., Carro, M., Hermenegildo, M.: Combining Static Analysis and Profiling for Estimating Execution Times. In: Hanus, M. (ed.) PADL 2007. LNCS, vol. 4354, pp. 140–154. Springer, Heidelberg (2006)

    Chapter  Google Scholar 

  24. Pontelli, E., Gupta, G., Hermenegildo, M.: ACE: A High-Performance Parallel Prolog System. In: International Parallel Processing Symposium, pp. 564–572. IEEE Computer Society Technical Committee on Parallel Processing, IEEE Computer Society, Los Alamitos (1995)

    Google Scholar 

  25. Santos-Costa, V.: Optimising Bytecode Emulation for Prolog. In: Nadathur, G. (ed.) PPDP 1999. LNCS, vol. 1702, pp. 261–277. Springer, Heidelberg (1999)

    Chapter  Google Scholar 

  26. de Morais Santos-Costa, V.M.: Compile-Time Analysis for the Parallel Execution of Logic Programs in Andorra-I. PhD thesis, University of Bristol (August 1993)

    Google Scholar 

  27. Shen, K.: Overview of DASWAM: Exploitation of Dependent And-parallelism. Journal of Logic Programming 29(1–3), 245–293 (1996)

    Article  MATH  Google Scholar 

  28. Shen, K., Hermenegildo, M.: Flexible Scheduling for Non-Deterministic, And-parallel Execution of Logic Programs. In: Fraigniaud, P., Mignotte, A., Robert, Y., Bougé, L. (eds.) Euro-Par 1996. LNCS, vol. 1124, pp. 635–640. Springer, Heidelberg (1996)

    Chapter  Google Scholar 

  29. Warren, D.H.D.: An Abstract Prolog Instruction Set. TR 309, SRI International (1983)

    Google Scholar 

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

Casas, A., Carro, M., Hermenegildo, M.V. (2007). Towards a High-Level Implementation of Execution Primitives for Unrestricted, Independent And-Parallelism. 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_16

Download citation

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

  • 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