Skip to main content

On the Correctness and Efficiency of Lock-Free Expandable Tries for Tabled Logic Programs

  • Conference paper
Practical Aspects of Declarative Languages (PADL 2014)

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

Included in the following conference series:

Abstract

Tabling is an implementation technique that improves the declarativeness and expressiveness of Prolog in dealing with recursion and redundant sub-computations. A critical component in the implementation of an efficient tabling framework is the design of the data structures and algorithms to access and manipulate tabled data. One of the most successful data structures for tabling is tries. In previous work, our initial approach to deal with concurrent table accesses, implemented on top of the Yap Prolog system, was to use lock-based trie data structures. In this work, we propose a new design based on lock-free data structures and, in particular, we focus our discussion on the correctness and efficiency of extending Yap’s tabling framework to support lock-free expandable tries. Experimental results show that our new lock-free design can effectively reduce the execution time and scale better, when increasing the number of threads, than the original lock-based design.

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. Areias, M., Rocha, R.: An Efficient and Scalable Memory Allocator for Multithreaded Tabled Evaluation of Logic Programs. In: International Conference on Parallel and Distributed Systems, pp. 636–643. IEEE Computer Society (2012)

    Google Scholar 

  2. Areias, M., Rocha, R.: Towards Multi-Threaded Local Tabling Using a Common Table Space. Journal of Theory and Practice of Logic Programming, International Conference on Logic Programming, Special Issue 12(4&5), 427–443 (2012)

    Article  MATH  Google Scholar 

  3. Chen, W., Warren, D.S.: Tabled Evaluation with Delaying for General Logic Programs. Journal of the ACM 43(1), 20–74 (1996)

    Article  MATH  MathSciNet  Google Scholar 

  4. Detlefs, D.L., Martin, P.A., Moir, M., Steele Jr., G.L.: Lock-Free Reference Counting. In: ACM Symposium on Principles of Distributed Computing, pp. 190–199. ACM (2001)

    Google Scholar 

  5. Hendler, D., Shavit, N., Yerushalmi, L.: A Scalable Lock-free Stack Algorithm. In: ACM Symposium on Parallelism in Algorithms and Architectures, pp. 206–215. ACM (2004)

    Google Scholar 

  6. Herlihy, M., Wing, J.M.: Axioms for Concurrent Objects. In: ACM SIGACT-SIGPLAN Symposium on Principles of Programming Languages, pp. 13–26. ACM (1987)

    Google Scholar 

  7. Herlihy, M., Wing, J.M.: Linearizability: a correctness condition for concurrent objects. ACM Transactions on Programming Languages and Systems 12(3), 463–492 (1990)

    Article  Google Scholar 

  8. Marques, R., Swift, T.: Concurrent and Local Evaluation of Normal Programs. In: Garcia de la Banda, M., Pontelli, E. (eds.) ICLP 2008. LNCS, vol. 5366, pp. 206–222. Springer, Heidelberg (2008)

    Chapter  Google Scholar 

  9. Marques, R., Swift, T., Cunha, J.: A Simple and Efficient Implementation of Concurrent Local Tabling. In: Carro, M., Peña, R. (eds.) PADL 2010. LNCS, vol. 5937, pp. 264–278. Springer, Heidelberg (2010)

    Chapter  Google Scholar 

  10. Michael, M.M.: High Performance Dynamic Lock-Free Hash Tables and List-Based Sets. In: ACM Symposium on Parallel Algorithms and Architectures, pp. 73–82. ACM (2002)

    Google Scholar 

  11. Michael, M.M.: Hazard Pointers: Safe Memory Reclamation for Lock-Free Objects. IEEE Transactions on Parallel and Distributed Systems 15(6), 491–504 (2004)

    Article  Google Scholar 

  12. Prokopec, A., Bronson, N.G., Bagwell, P., Odersky, M.: Concurrent Tries with Efficient Non-Blocking Snapshots. In: ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming, pp. 151–160. ACM (2012)

    Google Scholar 

  13. Ramakrishnan, I.V., Rao, P., Sagonas, K., Swift, T., Warren, D.S.: Efficient Access Mechanisms for Tabled Logic Programs. Journal of Logic Programming 38(1), 31–54 (1999)

    Article  MATH  Google Scholar 

  14. Santos, J., Rocha, R.: On the Efficient Implementation of Mode-Directed Tabling. In: Gupta, G. (ed.) PADL 2013. LNCS, vol. 7752, pp. 141–156. Springer, Heidelberg (2013)

    Chapter  Google Scholar 

  15. Santos Costa, V., Rocha, R., Damas, L.: The YAP Prolog System. Journal of Theory and Practice of Logic Programming 12(1&2), 5–34 (2012)

    Article  MATH  MathSciNet  Google Scholar 

  16. Shalev, O., Shavit, N.: Split-Ordered Lists: Lock-Free Extensible Hash Tables. Journal of the ACM 53(3), 379–405 (2006)

    Article  MathSciNet  Google Scholar 

  17. Triplett, J., McKenney, P.E., Walpole, J.: Resizable, Scalable, Concurrent Hash Tables via Relativistic Programming. In: USENIX Annual Technical Conference, p. 11. USENIX Association (2011)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2014 Springer International Publishing Switzerland

About this paper

Cite this paper

Areias, M., Rocha, R. (2014). On the Correctness and Efficiency of Lock-Free Expandable Tries for Tabled Logic Programs. In: Flatt, M., Guo, HF. (eds) Practical Aspects of Declarative Languages. PADL 2014. Lecture Notes in Computer Science, vol 8324. Springer, Cham. https://doi.org/10.1007/978-3-319-04132-2_12

Download citation

  • DOI: https://doi.org/10.1007/978-3-319-04132-2_12

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-319-04131-5

  • Online ISBN: 978-3-319-04132-2

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics