Hostname: page-component-848d4c4894-jbqgn Total loading time: 0 Render date: 2024-06-30T10:05:46.588Z Has data issue: false hasContentIssue false

Parallel instantiation of ASP programs: techniques and experiments

Published online by Cambridge University Press:  25 January 2012

SIMONA PERRI
Affiliation:
Dipartimento di Matematica, Università della Calabria, 87030 Rende, Italy (e-mail: perri@mat.unical.it, ricca@mat.unical.it, sirianni@mat.unical.it)
FRANCESCO RICCA
Affiliation:
Dipartimento di Matematica, Università della Calabria, 87030 Rende, Italy (e-mail: perri@mat.unical.it, ricca@mat.unical.it, sirianni@mat.unical.it)
MARCO SIRIANNI
Affiliation:
Dipartimento di Matematica, Università della Calabria, 87030 Rende, Italy (e-mail: perri@mat.unical.it, ricca@mat.unical.it, sirianni@mat.unical.it)

Abstract

Answer-Set Programming (ASP) is a powerful logic-based programming language, which is enjoying increasing interest within the scientific community and (very recently) in industry. The evaluation of Answer-Set Programs is traditionally carried out in two steps. At the first step, an input program undergoes the so-called instantiation (or grounding) process, which produces a program ′ semantically equivalent to , but not containing any variable; in turn, ′ is evaluated by using a backtracking search algorithm in the second step. It is well-known that instantiation is important for the efficiency of the whole evaluation, might become a bottleneck in common situations, is crucial in several real-world applications, and is particularly relevant when huge input data have to be dealt with. At the time of this writing, the available instantiator modules are not able to exploit satisfactorily the latest hardware, featuring multi-core/multi-processor Symmetric MultiProcessing technologies. This paper presents some parallel instantiation techniques, including load-balancing and granularity control heuristics, which allow for the effective exploitation of the processing power offered by modern Symmetric MultiProcessing machines. This is confirmed by an extensive experimental analysis reported herein.

Type
Regular Papers
Copyright
Copyright © Cambridge University Press 2012

Access options

Get access to the full version of this content by using one of the access options below. (Log in options will check for institutional or personal access. Content may require purchase if you do not have access.)

References

Aiello, L. C. and Massacci, F. 2001. Verifying security protocols as planning in logic programming. ACM Transactions on Computational Logic 2, 4, 542580.CrossRefGoogle Scholar
Anger, C., Konczak, K. and Linke, T. 2001. NoMoRe: A system for non-monotonic reasoning. In Proc. of the 6th International Conference on Logic Programming and Nonmonotonic Reasoning. LPNMR '01, vol. 2173. Springer-Verlag, Berlin, 406410.Google Scholar
Balduccini, M., Pontelli, E., Elkhatib, O. and Le, H. 2005. Issues in parallel execution of non-monotonic reasoning systems. Parallel Computing 31, 6, 608647.Google Scholar
Baral, C. 2003. Knowledge Representation, Reasoning and Declarative Problem Solving. Cambridge University Press, Cambridge, UK.Google Scholar
Baral, C. and Uyan, C. 2001. Declarative specification and solution of combinatorial auctions using logic programming. In Proc. of the 6th International Conference on Logic Programming and Nonmonotonic Reasoning. LPNMR '01, vol. 2173. Springer-Verlag, Berlin, 186199.Google Scholar
Bell, C., Nerode, A., Ng, R. T. and Subrahmanian, V. 1994. Mixed integer programming methods for computing nonmonotonic deductive databases. Journal of the ACM 41, 11781215.Google Scholar
Calimeri, F., Perri, S. and Ricca, F. 2008. Experimenting with parallelism for the instantiation of ASP programs. Journal of Algorithms in Cognition, Informatics and Logics 63, 1–3, 3454.Google Scholar
Carey, M. J. and Lu, H. 1986. Load balancing in a locally distributed db system. In Proc. of the 1986 International Conference on Management of Data. SIGMOD '86, vol. 15. ACM, New York, 108119.Google Scholar
Dantsin, E., Eiter, T., Gottlob, G. and Voronkov, A. 2001. Complexity and expressive power of logic programming. ACM Computing Surveys 33, 3, 374425.Google Scholar
Denecker, M., Vennekens, J., Bond, S., Gebser, M. and Truszczyński, M. 2009. The second answer set programming competition. In Proc. of the 10th International Conference on Logic Programming and Nonmonotonic Reasoning. LPNMR '09, vol. 5753. Springer-Verlag, Berlin, 637654.CrossRefGoogle Scholar
Dewan, H. M., Stolfo, S. J., Hernández, M. and Hwang, J.-J. 1994. Predictive dynamic load balancing of parallel and distributed rule and query processing. In Proc. of the 1994 International Conference on Management of Data. SIGMOD '94, vol. 23. ACM, New York, 277288.Google Scholar
Eiter, T., Gottlob, G. and Mannila, H. 1997. Disjunctive datalog. ACM Transactions on Database Systems 22, 364418.Google Scholar
Ellguth, E., Gebser, M., Gusowski, M., Kaufmann, B., Kaminski, R., Liske, S., Schaub, T., Schneidenbach, L. and Schnor, B. 2009. A simple distributed conflict-driven answer set solver. In Proc. of The 10th International Conference on Logic Programming and Nonmonotonic Reasoning. LPNMR '09, vol. 5753. Springer-Verlag, Berlin, 490495.Google Scholar
Faber, W., Leone, N., Mateis, C. and Pfeifer, G. 1999. Using database optimization techniques for nonmonotonic reasoning. In Proc. of the 7th International Workshop on Deductive Databases and Logic Programming. DDLP '99. Prolog Association of Japan, Tokyo, 135139.Google Scholar
Faber, W., Leone, N. and Pfeifer, G. 2004. Recursive aggregates in disjunctive logic programs: Semantics and complexity. In Proc. of the 9th European Conference on Artificial Intelligence. JELIA '04, vol. 3229. Springer Verlag, Berlin, 200212.Google Scholar
Finkel, R. A., Marek, V. W., Moore, N. and Truszczyński, M. 2001. Computing stable models in parallel. In Proc. of the Symposium on Answer Set Programming, Towards Efficient and Scalable Knowledge Representation and Reasoning. ASP'01, AAAI Press, Palo Alto, CA, 7276.Google Scholar
Ganguly, S., Silberschatz, A. and Tsur, S. 1990. A framework for the parallel processing of datalog queries. In Proc. of the 1990 International Conference on Management of Data. SIGMOD '90, vol. 19. ACM, New York, 143152.Google Scholar
Gebser, M., Kaufmann, B., Neumann, A. and Schaub, T. 2007a. Conflict-driven answer set solving. In Proc. of the 10th International Joint Conference on Artificial Intelligence. IJCAI '07. Morgan Kaufmann Publishers, San Mateo, CA, 386392.Google Scholar
Gebser, M., Liu, L., Namasivayam, G., Neumann, A., Schaub, T. and Truszczyński, M. 2007b. The first answer set programming system competition. In Proc. of the 9th International Conference on Logic Programming and Nonmonotonic Reasoning. LPNMR'07, vol. 4483. Springer-Verlag, 317.CrossRefGoogle Scholar
Gebser, M., Schaub, T. and Thiele, S. 2007c. GrinGo: A new grounder for answer set programming. In Proc. of the 9th International Conference on Logic Programming and Nonmonotonic Reasoning. LPNMR'07, vol. 4483. Springer-Verlag, Berlin, 266271.CrossRefGoogle Scholar
Gelfond, M. and Leone, N. 2002. Logic programming and knowledge representation – the A-Prolog perspective. Artificial Intelligence 138, 1–2, 338.CrossRefGoogle Scholar
Gelfond, M. and Lifschitz, V. 1991. Classical negation in logic programs and disjunctive databases. New Generation Computing 9, 365385.CrossRefGoogle Scholar
Grasso, G., Iiritano, S., Leone, N., Lio, V., Ricca, F. and Scalise, F. 2010. An asp-based system for team-building in the Gioia-Tauro seaport. In Proc. of the 12th International Symposium on Practical Aspects of Declarative Languages. PADL '10, vol. 5937. Springer-Verlag, 4042.CrossRefGoogle Scholar
Grasso, G., Leone, N., Manna, M. and Ricca, F. 2011. ASP at work: Spin-off and applications of the DLV system. In Logic Programming, Knowledge Representation, and Nonmonotonic Reasoning: Essays in Honor of Michael Gelfond, vol. 6565. Springer-Verlag, Berlin, 120.Google Scholar
Gressmann, J., Janhunen, T., Mercer, R. E., Schaub, T., Thiele, S. and Tichy, R. 2005. Platypus: A platform for distributed answer set solving. In Proc. of the 8th International Conference on Logic Programming and Nonmonotonic Reasoning. LPNMR '05, vol. 3662. Springer-Verlag, Berlin, 227239.CrossRefGoogle Scholar
Ielpa, S. M., Iiritano, S., Leone, N. and Ricca, F. 2009. An ASP-based system for e-tourism. In Proc. of the 10th International Conference on Logic Programming and Nonmonotonic Reasoning. LPNMR '09, vol. 5753. Springer-Verlag, Berlin, 368381.CrossRefGoogle Scholar
Janhunen, T., Niemelä, I., Seipel, D., Simons, P. and You, J.-H. 2006. Unfolding partiality and disjunctions in stable model semantics. ACM Transactions on Computational Logic 7, 1 (January), 137.CrossRefGoogle Scholar
Knuth, D. E. 1994. The Stanford GraphBase: A Platform for Combinatorial Computing, vols. I–VII. ACM, New York.Google Scholar
Lembo, D., Lenzerini, M. and Rosati, R. 2002. Integrating inconsistent and incomplete data sources. In Proc. of the 10th Italian Symposium on Advanced Database Systems 2005. SEBD '05. 299–308.Google Scholar
Leone, N., Perri, S. and Scarcello, F. 2001. Improving ASP instantiators by join-ordering methods. In Proc. of the 6th International Conference on Logic Programming and Nonmonotonic Reasoning. LPNMR '01, vol. 2173. Springer-Verlag, Berlin, 280294.Google Scholar
Leone, N., Perri, S. and Scarcello, F. 2004. BackJumping techniques for rules instantiation in the DLV system. In Proc. of the 10th International Workshop on Non-monotonic Reasoning. NMR '04. 258–266.Google Scholar
Leone, N., Pfeifer, G., Faber, W., Eiter, T., Gottlob, G., Perri, S. and Scarcello, F. 2006. The DLV system for knowledge representation and reasoning. ACM Transactions on Computational Logic 7, 499562.CrossRefGoogle Scholar
Lierler, Y. and Maratea, M. 2004. Cmodels-2: SAT-based answer set solver enhanced to non-tight programs. In Proc. of the 7th International Conference on Logic Programming and Non-Monotonic Reasoning. LPNMR '04, vol. 2923. Springer Verlag, Berlin, 346350.Google Scholar
Lifschitz, V. 1999. Answer set planning. In Proc. of the 16th International Conference on Logic Programming. ICLP '99. The MIT Press, Cambridge, MA, USA, 2337.Google Scholar
Lin, F. and Zhao, Y. 2004. ASSAT: Computing answer sets of a logic program by SAT solvers. Artificial Intelligence 157, 1–2, 115137.CrossRefGoogle Scholar
Marek, V. W. and Truszczyński, M. 1999. Stable models and an alternative logic programming paradigm. In The Logic Programming Paradigm – A 25-Year Perspective. Springer Verlag, Berlin, 375398.Google Scholar
Niemelä, I. and Simons, P. 1997. Smodels – an implementation of the stable model and well-founded semantics for normal lp. In Proc. of the 4th International Conference on Logic Programming and Nonmonotonic Reasoning. LPNMR '97, vol. 1265. Springer-Verlag, Berlin, 421430.Google Scholar
Perri, S., Ricca, F. and Sirianni, M. 2010. A parallel ASP instantiator based on DLV. In Proc. of the 5th ACM SIGPLAN Workshop on Declarative Aspects of Multicore Programming. DAMP '10. ACM, New York, 7382.Google Scholar
Perri, S., Ricca, F. and Vescio, S. 2008. Efficient parallel ASP instantiation via dynamic rewriting. In Proc. of the First Workshop on Answer Set Programming and Other Computing Paradigms. ASPOCP '08, 16–30.Google Scholar
Pontelli, E. and El-Khatib, O. 2001. Exploiting vertical parallelism from answer Set programs. In Proc. of the Symposium on Answer Set Programming, Towards Efficient and Scalable Knowledge Representation and Reasoning. ASP'01, AAAI Press, Palo Alto, CA, 174180.Google Scholar
Simons, P. 2000. Extending and Implementing the Stable Model Semantics. PhD thesis, Helsinki University of Technology, Finland.Google Scholar
Simons, P., Niemelä, I. and Soininen, T. 2002. Extending and implementing the stable model semantics. Artificial Intelligence 138, 181234.CrossRefGoogle Scholar
Stallings, W. 1998. Operating Systems: Internals and Design Principles, 3rd ed. Prentice-Hall, Englewood Cliffs, NJ.Google Scholar
Subrahmanian, V., Nau, D. and Vago, C. 1995. WFS + branch andbound = stable models. IEEE Transactions on Knowledge and Data Engineering 7, 362377.Google Scholar
Ullman, J. D. 1989. Principles of Database and Knowledge Base Systems. Computer Science Press, New York, NY, USA.Google Scholar
Wolfson, O. and Ozeri, A. 1990. A new paradigm for parallel and distributed rule-processing. In Proc. of the 1990 International Conference on Management of Data. SIGMOD '90, vol. 19. ACM, New York, 133142.Google Scholar
Wolfson, O. and Silberschatz, A. 1988. Distributed processing of logic programs. In Proc. of the 1988 International Conference on Management of Data. SIGMOD '88, vol. 17. ACM, New York, 329336.Google Scholar
Zhang, W., Wang, K. and Chau, S.-C. 1995. Data partition and parallel evaluation of datalog programs. IEEE Transactions on Knowledge and Data Engineering 7, 163176.CrossRefGoogle Scholar
Supplementary material: PDF

PERRI et al. supplementary material

Online Appendix

Download PERRI et al. supplementary material(PDF)
PDF 213.4 KB