Skip to main content

A GPU Implementation of the ASP Computation

  • Conference paper
  • First Online:

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

Abstract

General Purpose Graphical Processing Units (GPUs) are affordable multi-core platforms, providing access to large number of cores, but at the price of a complex architecture with non-trivial synchronization and communication costs. This paper presents the design and implementation of a conflict-driven ASP solver, that is capable of exploiting the parallelism offered by GPUs. The proposed system builds on the notion of ASP computation, that avoids the generation of unfounded sets, enhanced by conflict analysis and learning. The proposed system uses the CPU exclusively for input and output, in order to reduce the negative impact of the expensive data transfers between the CPU and the GPU. All the solving components, i.e., the management of nogoods, the search strategy, backjumping, the search heuristics, conflict analysis and learning, and unit propagation, are performed on the GPU, by exploiting Single Instruction Multiple Threads (SIMT) parallelism. The preliminary experimental results confirm the feasibility and scalability of the approach, and the potential to enhance performance of ASP solvers.

Research partially supported by INdAM GNCS-14, GNCS-15 projects and NSF grants DBI-1458595, HRD-1345232, and DGE-0947465. Hardware partially supported by NVIDIA under the GPU Research Center Program. A preliminary version of this work has been presented in [9].

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

Buying options

Chapter
USD   29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD   34.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD   44.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

Learn about institutional subscriptions

References

  1. Balduccini, M., Pontelli, E., El-Khatib, O., Le, H.: Issues in parallel execution of non-monotonic reasoning systems. Parallel Comput. 31(6), 608–647 (2005)

    Article  Google Scholar 

  2. Baral, C.: Knowledge Representation, Reasoning and Declarative Problem Solving. Cambridge University Press, Cambridge (2010)

    MATH  Google Scholar 

  3. Biere, A., Heule, M., van Maaren, H., Walsh, T. (eds.): Handbook of Satisfiability (Frontiers in Artificial Intelligence and Applications), vol. 185. IOS Press, Amsterdam (2009)

    Google Scholar 

  4. Campeotto, F., Dal Palù, A., Dovier, A., Fioretto, F., Pontelli, E.: Exploring the use of GPUs in constraint solving. In: Flatt, M., Guo, H.-F. (eds.) PADL 2014. LNCS, vol. 8324, pp. 152–167. Springer, Heidelberg (2014)

    Chapter  Google Scholar 

  5. Campeotto, F., Dovier, A., Fioretto, F., Pontelli, E.: A GPU implementation of large neighborhood search for solving constraint optimization problems. In: Schaub, T., Friedrich, G., O’Sullivan, B. (eds.) ECAI 2014–21st European Conference on Artificial Intelligence - Including Prestigious Applications of Intelligent Systems (PAIS) 2014. Frontiers in Artificial Intelligence and Applications, vol. 263, pp. 189–194. IOS Press, Prague, Czech Republic (2014)

    Google Scholar 

  6. Campeotto, F., Dovier, A., Pontelli, E.: A declarative concurrent system for protein structure prediction on GPU. J. Exp. Theor. Artif. Intell. (JETAI) 27(5), 503–541 (2015)

    Article  Google Scholar 

  7. Dal Palù, A., Dovier, A., Formisano, A., Pontelli, E.: CUD@SAT: SAT solving on GPUs. J. Exp. Theor. Artif. Intell. (JETAI) 27(3), 293–316 (2015)

    Article  Google Scholar 

  8. Dal Palù, A., Dovier, A., Pontelli, E., Rossi, G.: GASP: answer set programming with lazy grounding. Fundamenta Informaticae 96(3), 297–322 (2009)

    MathSciNet  MATH  Google Scholar 

  9. Dovier, A., Formisano, A., Pontelli, E., Vella, F.: Parallel execution of the ASP computation - an investigation on GPUs. In: De Vos, M., Eiter, T., Lierler, Y., Toni, F. (eds.) Technical Communications of the 31st International Conference on Logic Programming (ICLP 2015), Cork, Ireland, August 31 - September 4, 2015, vol. 1433, CEUR Workshop Proceedings (2015). CEUR-WS.org

  10. Fages, F.: Consistency of Clark’s completion and existence of stable models. Methods Logic Comput. Sci. 1(1), 51–60 (1994)

    Google Scholar 

  11. Finkel, R.A., Marek, V.W., Moore, N., Truszczynski, M.: Computing stable models in parallel. In: Answer Set Programming, Towards Efficient and Scalable Knowledge Representation and Reasoning, Proceedings of the 1st International ASP 2001 Workshop, Stanford (2001)

    Google Scholar 

  12. Formisano, A., Vella, F.: On multiple learning schemata in conflict driven solvers. In: Bistarelli, S., Formisano, A. (eds.) Proceedings of ICTCS 2014, vol. 1231, pp. 133–146. CEUR Workshop Proceedings, (2014). CEUR-WS.org

  13. Gebser, M., Kaminski, R., Kaufmann, B., Schaub, T.: Answer set solving in practice. Morgan & Claypool Publishers, San Rafael (2012)

    MATH  Google Scholar 

  14. Gebser, M., Kaufmann, B., Schaub, T.: Multi-threaded ASP solving with clasp. TPLP 12(4–5), 525–545 (2012)

    MathSciNet  MATH  Google Scholar 

  15. Gelfond, M.: Answer sets. In: van Harmelen, F., Lifschitz, V., Porter, B.W. (eds.) Handbook of Knowledge Representation. Foundations of Artificial Intelligence, vol. 3, pp. 285–316. Elsevier, Amsterdam (2008)

    Chapter  Google Scholar 

  16. Goldberg, E., Novikov, Y.: BerkMin: a fast and robust SAT-solver. Discrete Appl. Math. 155(12), 1549–1561 (2007)

    Article  MathSciNet  MATH  Google Scholar 

  17. Järvisalo, M., Junttila, T.A., Niemelä, I.: Unrestricted vs restricted cut in a tableau method for boolean circuits. Ann. Math. Artif. Intell. 44(4), 373–399 (2005)

    Article  MathSciNet  MATH  Google Scholar 

  18. Kao, M., Klein, P.N.: Towards overcoming the transitive-closure bottleneck: efficient parallel algorithms for planar digraphs. J. Comput. Syst. Sci. 47(3), 459–500 (1993)

    Article  MathSciNet  MATH  Google Scholar 

  19. Khronos Group Inc., OpenCL: the open standard for parallel programming of heterogeneous systems (2015). http://www.khronos.org

  20. Khuller, S., Vishkin, U.: On the parallel complexity of digraph reachability. Inf. Process. Lett. 52(5), 239–241 (1994)

    Article  MathSciNet  MATH  Google Scholar 

  21. Lin, F., Zhao, Y.: ASSAT: computing answer sets of a logic program by SAT solvers. Artif. Intell. 157(1), 115–137 (2004)

    Article  MathSciNet  MATH  Google Scholar 

  22. Liu, L., Pontelli, E., Son, T.C., Truszczynski, M.: Logic programs with abstract constraint atoms: the role of computations. Artif. Intell. 174(3–4), 295–315 (2010)

    Article  MathSciNet  MATH  Google Scholar 

  23. Manolios, P., Zhang, Y.: Implementing survey propagation on graphics processing units. In: Biere, A., Gomes, C.P. (eds.) SAT 2006. LNCS, vol. 4121, pp. 311–324. Springer, Heidelberg (2006)

    Chapter  Google Scholar 

  24. Marek, V.W., Truszczynski, M.: Stable models and an alternative logic programming paradigm (1998). CoRR, cs.LO/9809032

  25. Marques-Silva, J.P., Sakallah, K.A.: GRASP: a search algorithm for propositional satisfiability. IEEE Trans. Comput. 48(5), 506–521 (1999)

    Article  MathSciNet  Google Scholar 

  26. Niemelä, I.: Logic programs with stable model semantics as a constraint programming paradigm. Ann. Math. Artif. Intell. 25(3–4), 241–273 (1999)

    Article  MathSciNet  MATH  Google Scholar 

  27. NVIDIA Corporation. NVIDIA CUDA Zone (2015). https://developer.nvidia.com/cuda-zone

  28. Perri, S., Ricca, F., Sirianni, M.: Parallel instantiation of ASP programs: techniques and experiments. TPLP 13(2), 253–278 (2013)

    MathSciNet  MATH  Google Scholar 

  29. Cabalar, P.: Answer set; programming? In: Balduccini, M., Son, T.C. (eds.) Logic Programming, Knowledge Representation, and Nonmonotonic Reasoning. LNCS, vol. 6565, pp. 334–343. Springer, Heidelberg (2011)

    Chapter  Google Scholar 

  30. Pontelli, E., Le, H.V., Son, T.C.: An investigation in parallel execution of answer set programs on distributed memory platforms: task sharing and dynamic scheduling. Comput. Lang. Syst. Struct. 36(2), 158–202 (2010)

    Google Scholar 

  31. Rossi, F., van Beek, P., Walsh, T.: Handbook of Constraint Programming. Foundations of Artificial Intelligence. Elsevier Science Inc., New York (2006)

    MATH  Google Scholar 

  32. Simons, P., Niemelä, I., Soininen, T.: Extending and implementing the stable model semantics. Artif. Intell. 138(1–2), 181–234 (2002)

    Article  MathSciNet  MATH  Google Scholar 

  33. Syrjänen, T., Niemelä, I.: The smodels system. In: Eiter, T., Faber, W., Truszczyński, M. (eds.) LPNMR 2001. LNCS (LNAI), vol. 2173, pp. 434–438. Springer, Heidelberg (2001)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Agostino Dovier .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2016 Springer International Publishing Switzerland

About this paper

Cite this paper

Dovier, A., Formisano, A., Pontelli, E., Vella, F. (2016). A GPU Implementation of the ASP Computation. In: Gavanelli, M., Reppy, J. (eds) Practical Aspects of Declarative Languages. PADL 2016. Lecture Notes in Computer Science(), vol 9585. Springer, Cham. https://doi.org/10.1007/978-3-319-28228-2_3

Download citation

  • DOI: https://doi.org/10.1007/978-3-319-28228-2_3

  • Published:

  • Publisher Name: Springer, Cham

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

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

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics