Skip to main content

Batched Evaluation of Full-Sharing Multithreaded Tabling

  • Conference paper
  • First Online:
Languages, Applications and Technologies (SLATE 2015)

Part of the book series: Communications in Computer and Information Science ((CCIS,volume 563))

Included in the following conference series:

Abstract

Tabling is a technique that overcomes some limitations of traditional Prolog systems in dealing with redundant sub-computations and recursion. When tabling is combined with multithreading, we have the best of both worlds, since we can exploit the combination of higher declarative semantics with higher procedural control. To support this combination, the Yap Prolog system has, at engine level, multiple designs that vary from a No-Sharing design, where each thread allocates fully private tables, to a Full-Sharing (FS) design, where threads share the complete table space. In this work, we propose an extension to the table space data structures, which we named Private Answer Chaining (PAC), as way to support batched scheduling evaluation with the FS design. Batched scheduling is one of the most successful tabling scheduling strategies, known to be useful when a tabled logic program requires an eager propagation of answers and/or do not requires the complete set of answers to be found. Experimental results show that PAC is a good first approach, since with it the FS design remains quite competitive.

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 EPUB and 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

Notes

  1. 1.

    We are considering variant-based tabling [9]. Two tabled subgoals A and B are variants if they can be made identical by variable renaming. For example, p(X,1,Y) and p(Y,1,Z) are variants because both can be transformed into \(p({ VAR}_0,{\textit{1}},{ VAR}_1)\).

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. J. Theory Pract. Logic Program. 12(4 & 5), 427–443 (2012)

    Article  MATH  Google Scholar 

  3. Areias, M., Rocha, R.: A simple and efficient lock-free hash trie design for concurrent tabling. In: Technical Communications of the International Conference on Logic Programming (2014)

    Google Scholar 

  4. Areias, M., Rocha, R.: A lock-free hash trie design for concurrent tabled logic programs. Int. J. Parallel Program. 1–21 (2015)

    Google Scholar 

  5. Chen, W., Warren, D.S.: Tabled evaluation with delaying for general logic programs. J. ACM 43(1), 20–74 (1996)

    Article  MathSciNet  MATH  Google Scholar 

  6. Freire, J., Swift, T., Warren, D.S.: Beyond depth-first: improving tabled logic programs through alternative scheduling strategies. In: Kuchen, H., Swierstra, S.D. (eds.) PLILP 1996. LNCS, vol. 1140, pp. 243–258. Springer, Heidelberg (1996)

    Chapter  Google Scholar 

  7. Liang, S., Fodor, P., Wan, H., Kifer, M.: OpenRuleBench: an analysis of the performance of rule engines. In: International World Wide Web Conference, pp. 601–610. ACM (2009)

    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. Ramakrishnan, I.V., Rao, P., Sagonas, K., Swift, T., Warren, D.S.: Efficient access mechanisms for tabled logic programs. J. Logic Program. 38(1), 31–54 (1999)

    Article  MATH  Google Scholar 

  10. Sagonas, K., Swift, T.: An abstract machine for tabled execution of fixed-order stratified logic programs. ACM Trans. Program. Lang. Syst. 20(3), 586–634 (1998)

    Article  Google Scholar 

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

    Chapter  Google Scholar 

Download references

Acknowledgments

This work is partially funded by the North Portugal Regional Operational Programme (ON.2 - O Novo Norte) and by the National Strategic Reference Framework (NSRF), through the European Regional Development Fund (ERDF) and the Portuguese Foundation for Science and Technology (FCT), within projects NORTE-07-0124-FEDER-000059 and UID/EEA/50014/2013.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Miguel Areias .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2015 Springer International Publishing Switzerland

About this paper

Cite this paper

Areias, M., Rocha, R. (2015). Batched Evaluation of Full-Sharing Multithreaded Tabling. In: Sierra-Rodríguez, JL., Leal, JP., Simões, A. (eds) Languages, Applications and Technologies. SLATE 2015. Communications in Computer and Information Science, vol 563. Springer, Cham. https://doi.org/10.1007/978-3-319-27653-3_11

Download citation

  • DOI: https://doi.org/10.1007/978-3-319-27653-3_11

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-319-27652-6

  • Online ISBN: 978-3-319-27653-3

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics