Skip to main content

onlineSPARC: A Programming Environment for Answer Set Programming


Recent progress in logic programming (e.g. the development of the answer set programming (ASP) paradigm) has made it possible to teach it to general undergraduate and even middle/high school students. Given the limited exposure of these students to computer science, the complexity of downloading, installing, and using tools for writing logic programs could be a major barrier for logic programming to reach a much wider audience. We developed onlineSPARC, an online ASP environment with a self-contained file system and a simple interface. It allows users to type/edit logic programs and perform several tasks over programs, including asking a query to a program, getting the answer sets of a program, and producing a drawing/animation based on the answer sets of a program.

Hide All

The authors were partially supported by the National Science Foundation (Grant No. CNS-1359359). We thank Christian Reotutar, Evgenii Balai, Mbathio Diagne, Peter Lee, Maede Rayatidamavandi, Crisel Suarez, Edward Wertz, and Shao-Lon Yeh for their contribution to the implementation of the environment. Christian Reotutar also contributed to the early preparation of this paper. We thank Michael Gelfond and Yinan Zhang for their input and help. We thank the anonymous reviewers whose feedback helps to improve the quality of this paper as well as that of onlineSPARC.

Hide All
Ambroz, T., Charwat, G., Jusits, A., Wallner, J. P. and Woltran, S. 2013. Arvis: Visualizing relations between answer sets. In International Conference on Logic Programming and Nonmonotonic Reasoning. Springer, Berlin, 7378.
Balai, E. 2013. SPARC manual. URL: [Retrieved in April 2018].
Balai, E., Gelfond, M. and Zhang, Y. 2013. Towards answer set programming with sorts. In Logic Programming and Nonmonotonic Reasoning, 12th International Conference, LPNMR 2013, Corunna, Spain, 15–19 Sep. 2013. Proceedings. 135–147.
Brewka, G., Eiter, T. and Truszczyński, M. 2011. Answer set programming at a glance. Communications of the ACM 54, 12, 92103.
Clark, D., Nelson, B., Sengupta, P. and Dangelo, C. 2009. Rethinking science learning through digital games and simulations: Genres, examples, and evidence. In Learning Science: Computer Games, Simulations, and Education Workshop Sponsored by the National Academy of Sciences, Washington, DC.
Cliffe, O., De Vos, M., Brain, M. and Padget, J. 2008. Aspviz: Declarative visualisation and animation using answer set programming. In International Conference on Logic Programming. Springer, Berlin, 724728.
Dasseville, I. and Janssens, G. 2015. A web-based IDE for IDP. Arxiv preprint. arXiv:1511.00920.
Dodaro, C., Gasteiger, P., Musitsch, B., Ricca, F. and Shchekotykhin, K. 2015. Interactive debugging of non-ground asp programs. In International Conference on Logic Programming and Nonmonotonic Reasoning. Springer, Berlin, 279293.
Dovier, A., Benoli, P., Brocato, M. C., Dereani, L. and Tabacco, F. 2016. Reasoning in high schools: Do it with asp! In CILC, 205213.
Febbraro, O., Reale, K. and Ricca, F. 2011. ASPIDE: Integrated development environment for answer set programming. In Logic Programming and Nonmonotonic Reasoning– 11th International Conference, LPNMR 2011, Vancouver, Canada, 16–19 May 2011. Proceedings. 317–330.
Gebser, M., Kaufmann, B., Kaminski, R., Ostrowski, M., Schaub, T. and Schneider, M. 2011. Potassco: The potsdam answer set solving collection. AI Communications 24, 2, 107124.
Gelfond, M. and Kahl, Y. 2014. Knowledge Representation, Reasoning, and the Design of Intelligent Agents. Cambridge University Press, Cambridge.
Germano, S., Calimeri, F. and Palermiti, E. 2018. LoIDE: A web-based IDE for logic programming preliminary report. In International Symposium on Practical Aspects of Declarative Languages. Springer, Berlin, 152160.
Guzdial, M. 2001. Use of collaborative multimedia in computer science classes. ACM SIGCSE Bulletin 33, 3, 1720.
Kloimüllner, C., Oetsch, J., Pührer, J. and Tompits, H. 2013. Kara: A system for visualising and visual editing of interpretations for answer-set programs. In Applications of Declarative Programming and Knowledge Management. Springer, Berlin, 325344.
Kowalski, R. 2014. Logic programming. In Computational Logic, Vol. 9 Handbook of the History of Logic.
Kowalski, R. and Sadri, F. 2016. Programming in logic without logic programming. Theory and Practice of Logic Programming 16, 03, 269295.
Lapauw, R., Dasseville, I. and Denecker, M. 2015. Visualising interactive inferences with IDPD3. ArXiv preprint. arXiv:1511.00928.
McIlraith, S. 2011. What’s hot in knowledge representation and reasoning. Talk in the AAAI-12 SUBAREA SPOTLIGHTS TRACK on Knowledge Representation.
Mendelsohn, P., Green, T. and Brna, P. 1990. Programming languages in education: The search for an easy start. In Psychology of Programming, Hoc, J.-M., Green, T. R. G., Samurçay, R., and Gilmore, D. J., Eds. 175200.
Oetsch, J., Pührer, J. and Tompits, H. 2013. The SeaLion has landed: An IDE for answer-set programming – preliminary report. In Applications of Declarative Programming and Knowledge Management. Springer, Berlin, 305324.
Pierce, B. C. 2002. Types and Programming Languages. MIT press, Cambridge.
Reyes, M., Perez, C., Upchurch, R., Yuen, T. and Zhang, Y. 2016. Using declarative programming in an introductory computer science course for high school students. In Thirtieth AAAI Conference on Artificial Intelligence.
Sureshkumar, A., De Vos, M., Brain, M. and Fitch, J. 2007. APE: An ansprolog* environment. In Proc. SEA, Vol. 7, 101115.
Recommend this journal

Email your librarian or administrator to recommend adding this journal to your organisation's collection.

Theory and Practice of Logic Programming
  • ISSN: 1471-0684
  • EISSN: 1475-3081
  • URL: /core/journals/theory-and-practice-of-logic-programming
Please enter your name
Please enter a valid email address
Who would you like to send this to? *



Full text views

Total number of HTML views: 0
Total number of PDF views: 0 *
Loading metrics...

Abstract views

Total abstract views: 0 *
Loading metrics...

* Views captured on Cambridge Core between <date>. This data will be updated every 24 hours.

Usage data cannot currently be displayed