Skip to main content

Introducing Computer Science to High School Students Through Logic Programming


This paper investigates how high school students in an introductory computer science (CS) course approach computing in the logic programming (LP) paradigm. This qualitative study shows how novice students operate within the LP paradigm while engaging in foundational computing concepts and skills: students are engaged in a cyclical process of abstraction, reasoning, and creating representations of their ideas in code while also being informed by the (procedural) requirements and the revision/debugging process. As these computing concepts and skills are also expected in traditional approaches to introductory K-12 CS courses, this paper asserts that LP is a viable paradigm choice for high school novices.

Hide All

The authors thank Cynthia Perez, Rocky Upchurch, and Edward Wertz for their contributions to this project, and thank Michael Gelfond for valuable discussions and sharing his teaching materials. This work is partially supported by NSF grant CNS-1359359. We thank the anonymous reviewers whose feedback helps to improve the quality of this paper.

Hide All
Allan, W., Coulter, B., Denner, J., Erickson, J., Lee, I., Malyn-Smith, J. and Martin, F. 2011. Computational Thinking for Youth. White Paper for the ITEST Small Working Group on Computational Thinking (CT).
Alviano, M., Faber, W., Leone, N., Perri, S., Pfeifer, G. and Terracina, G. 2011. The disjunctive datalog system DLV. In Datalog Reloaded. Springer, Berlin, 282301.
Balai, E., Gelfond, M. and Zhang, Y. 2013. Towards answer set programming with sorts. In International Conference on Logic Programming and Nonmonotonic Reasoning. Springer, Berlin, 135147.
Ball, T. and Zorn, B. 2015. Teach foundational language principles. Communications of the ACM 58, 5, 3031.
Barr, V. and Stephenson, C. 2011. Bringing computational thinking to k-12: What is involved and what is the role of the computer science education community? ACM Inroads 2, 1, 4854.
Beux, S., Briola, D., Corradi, A., Delzanno, G., Ferrando, A., Frassetto, F., Guerrini, G., Mascardi, V., Oreggia, M., Pozzi, F., Solimando, A. and Tacchella, A. 2015. Computational thinking for beginners: A successful experience using Prolog. In CILC. 3145.
Brennan, K. and Resnick, M. 2012. New frameworks for studying and assessing the development of computational thinking. In Proceedings of the 2012 Annual Meeting of the American Educational Research Association, Vancouver, Canada. 125.
Brewka, G., Eiter, T. and Truszczyński, M. 2011. Answer set programming at a glance. Communications of the ACM 54, 12, 92103.
Chakravarty, M. M. and Keller, G. 2004. The risks and benefits of teaching purely functional programming in first year. Journal of Functional Programming 14, 1, 113123.
Chen, T.-Y., Monge, A. and Simon, B. 2006. Relationship of early programming language to novice generated design. ACM SIGCSE Bulletin 38, 1, 495499.
Clocksin, W. and Mellish, C. S. 2003. Programming in PROLOG. Springer-Verlag, Berlin Heidelberg.
CollegeBoard. 2017. AP computer science principles including the curriculum framework. Advanced Placement Program, The College Board.
Cooper, S., Dann, W. and Pausch, R. 2000. Alice: A 3-d tool for introductory programming concepts. Journal of Computing Sciences in Colleges 15, 107116 (Consortium for Computing Sciences in Colleges).
Corbin, J. and Strauss, A. 2008. Basics of Qualitative Research: Techniques and Procedures for Developing Grounded Theory. Sage Publications, Inc, Thousand Oaks, CA, USA.
CSTA. 2012. CSTA k-12 computer science standards. Computer Science Teachers Association.
Dovier, A., Benoli, P., Brocato, M. C., Dereani, L. and Tabacco, F. 2016. Reasoning in high schools: Do it with ASP! In CILC, 205213.
Feaster, Y., Segars, L., Wahba, S. K. and Hallstrom, J. O. 2011. Teaching CS unplugged in the high school (with limited success). In Proceedings of the 16th Annual Joint Conference on Innovation and Technology in Computer Science Education. ACM, 248252.
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: The Answer-Set Programming Approach. Cambridge University Press, Cambridge.
Ginsburg, H. 1997. Entering the Child’s Mind: The Clinical Interview in Psychological Research and Practice. Cambridge University Press, Cambridge.
Grover, S. and Pea, R. 2013. Computational thinking in K-12 a review of the state of the field. Educational Researcher 42, 1, 3843.
Guzdial, M. 2004. Programming environments for novices. Computer Science Education Research 2004, 127154.
Hemmendinger, D. 2010. A plea for modesty. ACM Inroads 1, 2, 47.
K-12 CS Framework Committee. 2016. K-12 computer science framework. URL: [Accessed on January 8, 2017].
Kahn, K. 2004. Toontalk-steps towards ideal computer-based learning environments. A Learning Zone of One’s Own: Sharing Representations and Flow in Collaborative Learning Environments. IOS Press, Amsterdam. 253270.
Kelleher, C. and Pausch, R. 2007. Using storytelling to motivate programming. Communications of the ACM 50, 7, 5864.
Kleinberg, J. and Tardos, E. 2006. Algorithm Design. Pearson Education, India.
Kowalski, R. A. 1982. Logic as a computer language for children. In ECAI, 210.
Kowalski, R. A. 1987. Logic as a Computer Language for Children. Wiley-Interscience, New York, NY, USA.
Kowalski, R. A. 2014. Logic programming. Computational Logic, Volume 9 (Handbook of the History of Logic). North Holland, Amsterdam.
Levesque, H. J. 2012. Thinking as Computation: A First Course. The MIT Press, Cambridge.
Lye, S. Y. and Koh, J. H. L. 2014. Review on teaching and learning of computational thinking through programming: What is next for K-12? Computers in Human Behavior 41, 5161.
Marcopoulos, E., Reotutar, C. and Zhang, Y. 2017. An online development environment for answer set programming. CoRR abs/1707.01865.
Mendelsohn, P., Green, T. and Brna, P. 1990. Programming languages in education: The search for an easy start. Psychology of Programming. Elsevier, Amsterdam. 175200.
Nichol, J., Dean, J. and Briggs, J. 1988. Prolog, Children and Students. Nichols Publishing Co., New York, NY, USA.
Papert, S. 1980. Mindstorms: Children, Computers, and Powerful Ideas. Basic Books, Inc., New York, NY, USA.
Pears, A., Seidman, S., Malmi, L., Mannila, L., Adams, E., Bennedsen, J., Devlin, M. and Paterson, J. 2007. A survey of literature on the teaching of introductory programming. ACM SIGCSE Bulletin 39, 4, 204223.
Resnick, M. and Rosenbaum, E. 2013. Designing for tinkerability. Design, Make, Play: Growing the Next Generation of STEM Innovators. Routledge, London. 163181.
Resnick, M., Maloney, J., Monroy-Hernández, A., Rusk, N., Eastmond, E., Brennan, K., Millner, A., Rosenbaum, E., Silver, J., Silverman, B. and Kafai, Y. 2009. Scratch: Programming for all. Communications of the ACM 52, 11, 6067.
Scherz, Z. and Haberman, B. 1995. Logic programming based curriculum for high school students: The use of abstract data types. In ACM SIGCSE Bulletin. Vol. 27. ACM, 331335.
Sherin, B., diSessa, A. A. and Hammer, D. 1993. Dynaturtle revisited: Learning physics through collaborative design of a computer model. Interactive Learning Environments 3, 2, 91118.
Smith, M. 2016. Computer science for all. URL:
Sterling, L. and Shapiro, E. Y. 1994. The Art of Prolog: Advanced Programming Techniques. MIT press, Cambridge.
Stutterheim, J., Swierstra, W. and Swierstra, D. 2013. Forty hours of declarative programming: Teaching Prolog at the junior college Utrecht. arXiv:1301.5077.
Vilner, T., Zur, E. and Gal-Ezer, J. 2007. Fundamental concepts of CS1: Procedural vs. object oriented paradigm– a case study. In ACM SIGCSE Bulletin. Vol. 39. ACM, 171175.
Voogt, J., Fisser, P., Good, J., Mishra, P. and Yadav, A. 2015. Computational thinking in compulsory education: Towards an agenda for research and practice. Education and Information Technologies 20, 4, 715728.
Wing, J. 2011. Research notebook: Computational thinking– what and why? The Link Magazine, Spring. Carnegie Mellon University, Pittsburgh, PA, USA. URL:
Zhang, Y. 2015. Lecture notes for teaching computer science using asp. URL:
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