Parallel Answer Set Programming

  • Agostino Dovier
  • Andrea Formisano
  • Enrico Pontelli


Answer Set Programming (ASP) has become, in recent years, the paradigm of choice for the logic programming community and for a wide variety of application domains. Thanks to its declarative nature, ASP offers excellent opportunities for performance improvements through transparent exploitation of parallelism. This Chapter provides a survey on the main techniques and approaches in the literature to enable exploitation of parallelism in the execution of Answer Set Programming solvers. The survey explores the approaches along two orthogonal dimensions. The first dimension considers the different levels of complexity and features of the underlying language, ranging from propositional Datalog/definite Horn clauses to full ASP. The second dimension, instead, explores the different levels of granularity of exploitation of parallelism, ranging from fine grain parallelism, exploited using general-purpose graphical processing units, to very large grain parallelism exploited on distributed platforms.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.



The research pursued by the authors on the topics of this Chapter has been partially supported by NSF grants CBET-1401639, HRD-1345232, CNS-1337884, and DGE-0947465, by INdAM GNCS 2014–2017 grants, by PRID ENCASE, and by YASMIN (R.d.B.-UniPG2016/17) and FCRPG.2016.0105.021 projects.


  1. [1]
    Afrati FN, Ullman JD (2010) Optimizing joins in a map-reduce environment. In: Proc. of 13th International Conference on Extending Database Technology, pp 99–110Google Scholar
  2. [2]
    Afrati FN, Borkar VR, Carey MJ, Polyzotis N, Ullman JD (2011) Map-reduce extensions and recursive queries. In: 14th International Conference on Extending Database Technology, pp 1–8Google Scholar
  3. [3]
    Apache Software Foundation (2016) Apache Hadoop.
  4. [4]
    Apt K, Bol R (1994) Logic Programming and Negation: A Survey. Journal of Logic Programming 19/20:9–71Google Scholar
  5. [5]
    Apt K, Blair H, Walker A (1989) Towards a Theory of Declarative Knowledge. In: Minker J (ed) Foundations of Deductive Databases and Logic Programming, Morgan KaufmannGoogle Scholar
  6. [6]
    Balduccini M, Pontelli E, Elkhatib O, Le H (2005) Issues in Parallel Execution of Non-Monotonic Reasoning Systems. Parallel Computing 31(6):608–647Google Scholar
  7. [7]
    Baral C (2003) Knowledge representation, reasoning and declarative problem solving. Cambridge University PressGoogle Scholar
  8. [8]
    Biere A, Heule M, Van Maaren H, Walsh T (eds) (2009) Handbook of Satisfiability. IOS PressGoogle Scholar
  9. [9]
    Bu Y, Howe B, Balazinska M, Ernst M (2010) Haloop: efficient iterative data processing on large clusters. In: Very Large Data Bases (VLDB) Conference, ACM, pp 285–296Google Scholar
  10. [10]
    Calimeri F, Perri S, Ricca F (2008) Experimenting with parallelism for the instantiation of ASP programs. Journal of Algorithms 63(1-3):34–54Google Scholar
  11. [11]
    Ceri S, Gottlob G, Tanca L (1990) Logic Programming and Databases. SpringerGoogle Scholar
  12. [12]
    Clark K (1978) Negation as failure. In: Gallaire H, Minker J (eds) Logic and Data Bases, PlenumGoogle Scholar
  13. [13]
    Dal Palù A, Dovier A, Formisano A, Pontelli E (2015) CUD@SAT: SAT solving on GPUs. J Exp Theor Artif Intell 27(3):293–316Google Scholar
  14. [14]
    Dantsin E, Eiter T, Gottlob G, Voronkov A (2001) Complexity and expressive power of logic programming. ACM Comput Surv 33(3):374–425Google Scholar
  15. [15]
    Davis M, Putnam H (1960) A Computing Procedure for Quantification Theory. Journal of the ACM 7:201–215Google Scholar
  16. [16]
    Davis M, Logemann G, Loveland D (1962) A machine program for theorem proving. Communications of the ACM 5(7):394–397Google Scholar
  17. [17]
    Dean J, Ghemawat S (2004) MapReduce: Simplified Data Processing on Large Clusters. Tech. rep., Google, Inc.Google Scholar
  18. [18]
    Dovier A, Formisano A, Pontelli E, Vella F (2015) Parallel Execution of the ASP Computation - an Investigation on GPUs. In: Proceedings of the Technical Communications of the 31st International Conference on Logic Programming,, no. 1433 in CEUR Workshop ProceedingsGoogle Scholar
  19. [19]
    Dovier A, Formisano A, Pontelli E, Vella F (2016) A GPU implementation of the ASP computation. In: Gavanelli M, Reppy JH (eds) Practical Aspects of Declarative Languages - 18th International Symposium, PADL 2016. Proceedings, Springer, Lecture Notes in Computer Science, vol 9585, pp 30–47Google Scholar
  20. [20]
    El-Khatib O, Pontelli E (2000) Parallel Evaluation of Answer Sets Programs Preliminary Results. In: Workshop on Parallelism and Implementation of Logic ProgrammingGoogle Scholar
  21. [21]
    Fages F (1994) Consistency of Clark’s completion and existence of stable models. Methods of Logic in Computer Science 1(1):51–60Google Scholar
  22. [22]
    Finkel R, Marek V, Moore N, Truszczyński M (2001) Computing Stable Models in Parallel. In: Provetti A, Tran S (eds) Proceedings of the AAAI Spring Symposium on Answer Set Programming, AAAI/MIT Press, Cambridge, MA, pp 72–75Google Scholar
  23. [23]
    Formisano A, Vella F (2014) On multiple learning schemata in conflict driven solvers. In: Bistarelli S, Formisano A (eds) Proceedings of the 15th Italian Conference on Theoretical Computer Science,, CEUR Workshop Proceedings, vol 1231, pp 133–146Google Scholar
  24. [24]
    Ganguly S, Silberschatz A, Tsur S (1990) A Framework for the Parallel Processing of Datalog Queries. In: Garcia-Molina H, Jagadish H (eds) Proceedings of ACM SIGMOD Conference on Management of Data, ACM Press, New York, pp 143–152Google Scholar
  25. [25]
    Ganguly S, Silberschatz A, Tsur S (1992) Parallel Bottom-Up Processing of Datalog Queries. Journal of Logic Programming 14(1-2):101–126Google Scholar
  26. [26]
    Gebser M, Kaminski R, Kaufmann B, Schaub T, Schneider MT, Ziller S (2011) A portfolio solver for answer set programming: Preliminary report. In: Delgrande JP, Faber W (eds) Logic Programming and Nonmonotonic Reasoning - 11th International Conference, LPNMR 2011, Vancouver, Canada, May 16-19, 2011. Proceedings, Springer, Lecture Notes in Computer Science, vol 6645, pp 352–357Google Scholar
  27. [27]
    Gebser M, Kaminski R, Kaufmann B, Schaub T (2012) Answer Set Solving in Practice. Morgan and Claypool PublishersGoogle Scholar
  28. [28]
    Gebser M, Kaminski R, Kaufmann B, Schaub T (2014) Clingo = ASP + control: Preliminary report. CoRR
  29. [29]
    Gelfond M (2007) Answer sets. In: Handbook of Knowledge Representation. Chapter 7, ElsevierGoogle Scholar
  30. [30]
    Gelfond M, Kahl Y (2014) Knowledge Representation, Reasoning, and the Design of Intelligent Agents The Answer-Set Programming Approach. Cambridge University PressGoogle Scholar
  31. [31]
    Gelfond M, Lifschitz V (1988) The Stable Model Semantics for Logic Programs. In: International Symposium on Logic Programming, MIT Press, pp 1070–1080Google Scholar
  32. [32]
    Giunchiglia E, Lierler Y, Maratea M (2006) Answer set programming based on propositional satisfiability. J Autom Reasoning 36(4):345–377Google Scholar
  33. [33]
    Goldberg E, Novikov Y (2007) BerkMin: A fast and robust SAT-solver. Discrete Applied Mathematics 155(12):1549–1561Google Scholar
  34. [34]
    Gonzalez JE, Xin RS, Dave A, Crankshaw D, Franklin MJ, Stoica I (2014) GraphX: Graph Processing in a Distributed Dataflow Framework. In: Proceedings of the 11th USENIX Symposium on Operating Systems Design and Implementation, USENIXGoogle Scholar
  35. [35]
    Grossi G, Marchi M, Pontelli E, Provetti A (2008) Experimental Analysis of Graph-based Answer Set Computation over Parallel and Distributed Architectures. Journal of Logic and Computation 19(4):697–715Google Scholar
  36. [36]
    Gupta G, Pontelli E, Carlsson M, Hermenegildo M, Ali K (2001) Parallel Execution of Prolog Programs: a Survey. ACM Transactions on Programming Languages and Systems 23(4):472–602Google Scholar
  37. [37]
    Hayes PJ, Kowalski RA (1969) Semantic trees in automatic theorem proving. Machine lntelligence 4:87–101Google Scholar
  38. [38]
    Heule M, van Maaren H (2009) Look-ahead Based SAT Solvers. In: Handbook of Satisfiability, IOS Press, chap 5, pp 155–184Google Scholar
  39. [39]
    Hoos H, Lindauer MT, Schaub T (2014) claspfolio 2: Advances in algorithm selection for answer set programming. TPLP 14(4-5):569–585Google Scholar
  40. [40]
    Jenkins J, Arkatkar I, Owens JD, Choudhary AN, Samatova NF (2011) Lessons Learned from Exploring the Backtracking Paradigm on the GPU. In: Proc. of Euro-Par 2011, Springer Verlag, pp 425–437Google Scholar
  41. [41]
    Jeroslow RG, Wang J (1990) Solving propositional satisfiability problems. Ann Math Artif Intell 1:167–187Google Scholar
  42. [42]
    Khronos Group Inc (2015) OpenCL: The open standard for parallel programming of heterogeneous systems.
  43. [43]
    Kowalski RA (1970) Search strategies for theorem-proving. Machine Intelligence 5:181–201Google Scholar
  44. [44]
    Kowalski RA (1974) Predicate Logic as a Programming Language. In: Proceedings IFIPS, pp 569–574Google Scholar
  45. [45]
    Lassez J, Jaffar J (1987) Constraint logic programming. In: Proc. 14th ACM POPLGoogle Scholar
  46. [46]
    Le H, Pontelli E (2005) An Investigation of Sharing Strategies for Answer Set Solvers and SAT Solvers. In: Euro-Par, Springer Verlag, pp 750–760Google Scholar
  47. [47]
    Le H, Pontelli E (2007) Dynamic Scheduling in Parallel Answer Set Programming Solvers. In: High Performance Computing Symposium, ACM Press, pp 367–374Google Scholar
  48. [48]
    Leone N, Perri S, Scarcello F (2001) Improving ASP instantiators by joinordering methods. In: Logic Programming and Non-Monotonic Reasoning, Springer Verlag, pp 280–294Google Scholar
  49. [49]
    Leone N, Pfeifer G, Faber W, Eiter T, Gottlob G, Perri S, Scarcello F (2006) The DLV system for knowledge representation and reasoning. ACM Trans Comput Log 7(3):499–562Google Scholar
  50. [50]
    Lierler Y, Maratea M (2004) Cmodels-2: SAT-based Answer Set Solver Enhanced to Non-tight Programs. In: Lifschitz V, Niemelä I (eds) Proceedings of the 7th International Conference on Logic Programming and NonMonotonic Reasoning Conference (LPNMR’04), Springer Verlag, vol 2923, pp 346–350Google Scholar
  51. [51]
    Lin F, Zhao Y (2004) ASSAT: Computing Answer Sets of a Logic Program by SAT Solvers. Artificial Intelligence 157(1):115–137Google Scholar
  52. [52]
    Lindauer MT, Hoos HH, Hutter F, Schaub T (2015) Autofolio: An automatically configured algorithm selector. J Artif Intell Res (JAIR) 53:745–778Google Scholar
  53. [53]
    Liu L, Pontelli E, Son TC, TruszczyńskiM(2010) Logic programs with abstract constraint atoms: The role of computations. Artificial Intelligence 174(3-4):295–315Google Scholar
  54. [54]
    Lloyd J (1987) Foundations of Logic Programming. Springer-Verlag, HeidelbergGoogle Scholar
  55. [55]
    Low Y, Bickson D, Gonzalez J, Guestrin C, Kyrola A, Hellerstein JM (2012) Distributed GraphLab: a framework for machine learning and data mining in the cloud. Journal of the Proceedings of the VLDB Endowment 5(8):716–727Google Scholar
  56. [56]
    Malewicz G, Austern MH, Bik AJC, Dehnert JC, Horn I, Leiser N, Czajkowski G (2010) Pregel: a system for large-scale graph processing. In: Proceedings of the 2010 ACM SIGMOD International Conference on Management of data, ACM PressGoogle Scholar
  57. [57]
    Maratea M, Pulina L, Ricca F (2013) Automated selection of grounding algorithm in answer set programming. In: Baldoni M, Baroglio C, Boella G, Micalizio R (eds) AI*IA 2013: Advances in Artificial Intelligence - XIIIth International Conference of the Italian Association for Artificial Intelligence, Turin, Italy, December 4-6, 2013. Proceedings, Springer, Lecture Notes in Computer Science, vol 8249, pp 73–84Google Scholar
  58. [58]
    Maratea M, Pulina L, Ricca F (2014) A multi-engine approach to answer-set programming. TPLP 14(6):841–868Google Scholar
  59. [59]
    Maratea M, Pulina L, Ricca F (2015) Multi-engine ASP solving with policy adaptation. J Log Comput 25(6):1285–1306Google Scholar
  60. [60]
    Marek V, Truszczyński M (1999) Stable models and an alternative logic programming paradigm. In: The Logic Programming Paradigm, Springer Verlag, pp 375–398Google Scholar
  61. [61]
    Marek W, Truszczyński M (1991) Autoepistemic Logic. Journal of the ACM 38(3):588–619Google Scholar
  62. [62]
    Marques Silva JP, Sakallah KA (1999) GRASP: A search algorithm for propositional satisfiability. IEEE Transactions on Computers 48(5):506–521Google Scholar
  63. [63]
    Martinez-Angeles CA, de Castro Dutra I, Costa VS, Buenabad-Chávez J (2014) A Datalog engine for GPUs. In: Hanus M, Rocha R (eds) Declarative Programming and Knowledge Management - Declarative Programming Days, KDPD 2013, Unifying INAP, WFLP, and WLP, Kiel, Germany, September 11-13, 2013, Revised Selected Papers, Springer, Lecture Notes in Computer Science, vol 8439, pp 152–168Google Scholar
  64. [64]
    Niemelä I (1999) Logic Programs with Stable Model Semantics as a Constraint Programming Paradigm. Annals of Mathematics and AI 25Google Scholar
  65. [65]
    Niemelä I, Simons P (1996) Efficient Implementation of the Well-founded and Stable Model Semantics. In: Joint International Conference and Symposium on Logic Programming, MIT Press, pp 289–303Google Scholar
  66. [66]
    Niemelä I, Simons P (1997) Smodels - An Implementation of the Stable Model and Well-Founded Semantics for Normal LP. In: Logic Programming and Non-monotonic Reasoning, Springer Verlag, pp 421–430Google Scholar
  67. [67]
    NVIDIA Corporation (2015) NVIDIA CUDA Zone.
  68. [68]
    Perri S, Ricca F, Sirianni M (2013) Parallel instantiation of ASP programs: techniques and experiments. Theory and Practice of Logic Programming 13(2):253–278Google Scholar
  69. [69]
    Pollard GH (1981) Parallel execution of Horn clause programs. PhD thesis, Imperial College, London, Dept. of ComputingGoogle Scholar
  70. [70]
    Pontelli E, El-Khatib O (2001) Exploiting Vertical Parallelism from Answer Set Programs. In: AAAI Spring Symposium on Answer Set Programming: Towards Efficient and Scalable Knowledge Representation and ReasoningGoogle Scholar
  71. [71]
    Pontelli E, Ranjan D, Dal Palù A (2002) An Optimal Data Structure to Handle Dynamic Environments in Non-Deterministic Computations. Computer Languages 28(2):181–201Google Scholar
  72. [72]
    Pontelli E, Le H, Son T (2010) An Investigation in Parallel Execution of Answer Set Programs on Distributed Memory Platforms. Computer Languages, Systems and Structures 36(2):158–202Google Scholar
  73. [73]
    Ranjan D, Pontelli E, Gupta G (1999) On the Complexity of Or-Parallelism. New Generation Computing 17(3):285–308Google Scholar
  74. [74]
    Rao J, Ross KA (1999) Cache conscious indexing for decision-support in main memory. In: Atkinson MP, Orlowska ME, Valduriez P, Zdonik SB, Brodie ML (eds) VLDB’99, Proceedings of 25th International Conference on Very Large Data Bases, September 7-10, 1999, Edinburgh, Scotland, UK, Morgan Kaufmann, pp 78–89Google Scholar
  75. [75]
    Shepherdson J (1989) Negation in Logic Programming. In: Minker J (ed) Foundations of Deductive Databases and Logic Programming, Morgan KaufmannGoogle Scholar
  76. [76]
    Silverthorn B, Lierler Y, Schneider M (2012) Surviving solver sensitivity: An ASP practitioner’s guide. In: Dovier A, Costa VS (eds) Technical Communications of the 28th International Conference on Logic Programming, ICLP 2012, September 4-8, 2012, Budapest, Hungary, Schloss Dagstuhl - Leibniz-Zentrum fuer Informatik, LIPIcs, vol 17, pp 164–175Google Scholar
  77. [77]
    Simons P, Niemelä I, Soininen T (2002) Extending and implementing the stable model semantics. Artificial Intelligence 138(1-2):181–234Google Scholar
  78. [78]
    Sunderam V (1990) PVM: a framework for parallel distributed computing. Concurrency: Practice & Experience 2(4)Google Scholar
  79. [79]
    Tachmazidis I, Antoniou G (2013) Computing the Stratified Semantics of Logic Programs over Big Data through Mass Parallelization. In: Theory, Practice, and Applications of Rules on the Web - 7th International Symposium, RuleML 2013Google Scholar
  80. [80]
    Tachmazidis I, Antoniou G, Flouris G, Kotoulas S, McCluskey L (2012) Largescale Parallel Stratified Defeasible Reasoning. In: Proceedings of the European Conference on Artificial Intelligence (ECAI), IOS Press, pp 738–743Google Scholar
  81. [81]
    Tachmazidis I, Antoniou G, Faber W (2014) Efficient Computation of the Well-Founded Semantics over Big Data. Theory and Practice of Logic Programming 14(4-5):445–459Google Scholar
  82. [82]
    Ullman JD (1988) Principles of Database and Knowledge-Base Systems. Computer Science Press, MarylandGoogle Scholar
  83. [83]
    Urbani J, Kotoulas S, Maassen J, van Harmelen F, Bal H (2012) WebPIE: A Web-Scale Parallel Inference Engine using MapReduce. Journal of Web Semantics 10:59–75Google Scholar
  84. [84]
    Van Gelder A, Ross K, Schlipf J (1991) The Well-Founded Semantics for General Logic Programs. Journal of the ACM 38(3):620–650Google Scholar
  85. [85]
    Warren DHD (1980) Logic programming and compiler writing. Software – Practice and Experience 10(2):97–125Google Scholar
  86. [86]
    Wolfson O (1988) Sharing the load of logic-program evaluation. In: Jajodia S, Kim W, Silberschatz A (eds) Proceedings of the International Symposium on Databases in Parallel and Distributed Systems, Austin, Texas, USA, December 5-7, 1988, IEEE Computer Society, pp 46–55Google Scholar
  87. [87]
    Wolfson O, Silberschatz A (1988) Distributed Processing of Logic Programs. In: Boral H, Larson P (eds) Proceedings of the SIGMOD International Conference on Management of Data, ACM, ACM Press, New York, pp 329–336Google Scholar
  88. [88]
    Xu L, Hutter F, Hoos HH, Leyton-Brown K (2008) Satzilla: Portfolio-based algorithm selection for SAT. J Artif Intell Res (JAIR) 32:565–606Google Scholar
  89. [89]
    Yang M, Shkapsky A, Zaniolo C (2015) Parallel bottom-up evaluation of logic programs: Deals on shared-memory multicore machines. In: De Vos M, Eiter T, Lierler Y, Toni F (eds) Proceedings of the Technical Communications of the 31st International Conference on Logic Programming (ICLP) 2015,, CEUR Workshop Proceedings, vol 1433Google Scholar
  90. [90]
    Zhang W, Wang K, Chau SC (1995) Data Partition and Parallel Evaluation of Datalog Programs. IEEE Transactions on Knowledge and Data Engineering 7:163–176Google Scholar

Copyright information

© Springer International Publishing AG, part of Springer Nature 2018

Authors and Affiliations

  • Agostino Dovier
    • 1
  • Andrea Formisano
    • 2
  • Enrico Pontelli
    • 3
  1. 1.Department of Mathematics, Computer Science, and PhysicsUniversity of UdineUdineItaly
  2. 2.Department of Mathematics and Computer ScienceUniversity of PerugiaPerugiaItaly
  3. 3.Department of Computer ScienceNew Mexico State UniversityNew MexicoUSA

Personalised recommendations