Skip to main content

Lowering the Learning Curve for Declarative Programming: A Python API for the IDP System

  • Conference paper
  • First Online:
Practical Aspects of Declarative Languages (PADL 2017)

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

Included in the following conference series:

Abstract

Programmers may be hesitant to use declarative systems, because of the associated learning curve. In this paper, we present an API that integrates the IDP Knowledge Base system into the Python programming language. IDP is a state-of-the-art logical system, which uses SAT, SMT, Logic Programming and Answer Set Programming technology. Python is currently one of the most widely used (teaching) languages for programming. The first goal of our API is to allow a Python programmer to use the declarative power of IDP, without needing to learn any new syntax or semantics. The second goal is allow IDP to be added to/removed from an existing code base with minimal changes.

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

Access this chapter

Subscribe and save

Springer+ Basic
$34.99 /Month
  • Get 10 units per month
  • Download Article/Chapter or eBook
  • 1 Unit = 1 Article or 1 Chapter
  • Cancel anytime
Subscribe now

Buy Now

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Similar content being viewed by others

Notes

  1. 1.

    http://cacm.acm.org/blogs/blog-cacm/176450-python-is-now-the-most-popular-introductory-teaching-language-at-top-us-universities/fulltext.

  2. 2.

    http://spectrum.ieee.org/computing/software/the-2016-top-programming-languages.

  3. 3.

    http://xsb.sourceforge.net/.

  4. 4.

    http://rosettacode.org/wiki/Solve_a_Hidato_puzzle#Python.

References

  1. Apt, K.R., Schaerf, A.: Programming in alma-0, or imperative and declarative programming reconciled. In: FroCos (1998)

    Google Scholar 

  2. Bendisposto, J., Clark, J., Dobrikov, I., Karner, P., Krings, S., Ladenberger, L., Leuschel, M. and Plagge, D.: ProB 2.0 tutorial. In: Proceedings of the 4th Rodin User and Developer Workshop, TUCS Lecture Notes (2013)

    Google Scholar 

  3. Bruynooghe, M., Blockeel, H., Bogaerts, B., De Cat, B., De Pooter, S., Jansen, J., Labarre, A., Ramon, J., Denecker, M., Verwer, S.: Predicate logic as a modeling language: modeling and solving some machine learning and data mining problems with IDP3. Theor. Pract. Logic Program. 15(06), 783–817 (2014). Accepted

    Article  MathSciNet  MATH  Google Scholar 

  4. Moura, L., Bjørner, N.: Z3: an efficient SMT solver. In: Ramakrishnan, C.R., Rehof, J. (eds.) TACAS 2008. LNCS, vol. 4963, pp. 337–340. Springer, Heidelberg (2008). doi:10.1007/978-3-540-78800-3_24

    Chapter  Google Scholar 

  5. Denecker, M.: The well-founded semantics is the principle of inductive definition. In: Dix, J., Cerro, L.F., Furbach, U. (eds.) JELIA 1998. LNCS (LNAI), vol. 1489, pp. 1–16. Springer, Heidelberg (1998). doi:10.1007/3-540-49545-2_1

    Chapter  Google Scholar 

  6. Denecker, M., Ternovska, E.: A logic of nonmonotone inductive definitions. ACM Trans. Comput. Logic 9(2), 14 (2008)

    Article  MathSciNet  Google Scholar 

  7. Eiter, T., Fink, M., Ianni, G., Krennwallner, T., Redl, C., Schüller, P.: A model building framework for answer set programming with external computations. Theor. Pract. Logic Program. 16(4), 418–464 (2016)

    Article  MathSciNet  Google Scholar 

  8. Febbraro, O., Grasso, G., Ricca, F., Leone, N., JASP: A framework for integrating answer set programming with Java. In: KR (2012)

    Google Scholar 

  9. Gebser, M., Kaminski, R., Obermeier, P., Schaub, T.: Ricochet robots reloaded: a case-study in multi-shot ASP solving. In: Eiter, T., Strass, H., Truszczyński, M., Woltran, S. (eds.) Advances in Knowledge Representation, Logic Programming, and Abstract Argumentation. LNCS (LNAI), vol. 9060, pp. 17–32. Springer, Heidelberg (2015). doi:10.1007/978-3-319-14726-0_2

    Google Scholar 

  10. Gebser, M., Kaufmann, B., Neumann, A., Schaub, T.: clasp: a conflict-driven answer set solver. In: Baral, C., Brewka, G., Schlipf, J. (eds.) LPNMR 2007. LNCS (LNAI), vol. 4483, pp. 260–265. Springer, Heidelberg (2007). doi:10.1007/978-3-540-72200-7_23

    Chapter  Google Scholar 

  11. Köksal, A., Kuncak, V., Suter, P.: Constraints as control. In: POPL2012 (2012)

    Google Scholar 

  12. Milicevic, A., Rayside, D., Yessenov, K., Jackson, D.: Unifying execution of imperative and declarative code. In: Proceedings of 33rd International Conference on Software Engineering (ICSE) (2011)

    Google Scholar 

  13. Mitchell, D.G, Ternovska, E.: A framework for representing and solving NP search problems. In: AAAI, pp. 430–435 (2005)

    Google Scholar 

  14. Swift, T., Warren, D.S.: XSB: extending prolog with tabled logic programming. Theor. Pract. Logic Program. 12(1–2), 157–187 (2012)

    Article  MathSciNet  MATH  Google Scholar 

  15. Tasharrofi, S., Ternovska, E.: A semantic account for modularity in multi-language modelling of search problems. In: Tinelli, C., Sofronie-Stokkermans, V. (eds.) FroCoS 2011. LNCS (LNAI), vol. 6989, pp. 259–274. Springer, Heidelberg (2011). doi:10.1007/978-3-642-24364-6_18

    Chapter  Google Scholar 

  16. Torlak, E., Bodik, R.: Growing solver aided languages with ROSETTA. In: Proceedings of ACM International Symposium on New Ideas, New Paradigms, and Reflections on Programming and Software (2013)

    Google Scholar 

  17. Van Gelder, A., Ross, K.A., Schlipf, J.S.: The well-founded semantics for general logic programs. J. ACM 38(3), 620–650 (1991)

    MathSciNet  MATH  Google Scholar 

  18. Yessenov, K.: A lightweight specification language for bounded program verification. Master’s thesis, MIT (2009)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Joost Vennekens .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2017 Springer International Publishing AG

About this paper

Cite this paper

Vennekens, J. (2017). Lowering the Learning Curve for Declarative Programming: A Python API for the IDP System. In: Lierler, Y., Taha, W. (eds) Practical Aspects of Declarative Languages. PADL 2017. Lecture Notes in Computer Science(), vol 10137. Springer, Cham. https://doi.org/10.1007/978-3-319-51676-9_6

Download citation

  • DOI: https://doi.org/10.1007/978-3-319-51676-9_6

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-319-51675-2

  • Online ISBN: 978-3-319-51676-9

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics