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.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Similar content being viewed by others
Notes
- 1.
- 2.
- 3.
- 4.
References
Apt, K.R., Schaerf, A.: Programming in alma-0, or imperative and declarative programming reconciled. In: FroCos (1998)
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)
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
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
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
Denecker, M., Ternovska, E.: A logic of nonmonotone inductive definitions. ACM Trans. Comput. Logic 9(2), 14 (2008)
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)
Febbraro, O., Grasso, G., Ricca, F., Leone, N., JASP: A framework for integrating answer set programming with Java. In: KR (2012)
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
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
Köksal, A., Kuncak, V., Suter, P.: Constraints as control. In: POPL2012 (2012)
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)
Mitchell, D.G, Ternovska, E.: A framework for representing and solving NP search problems. In: AAAI, pp. 430–435 (2005)
Swift, T., Warren, D.S.: XSB: extending prolog with tabled logic programming. Theor. Pract. Logic Program. 12(1–2), 157–187 (2012)
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
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)
Van Gelder, A., Ross, K.A., Schlipf, J.S.: The well-founded semantics for general logic programs. J. ACM 38(3), 620–650 (1991)
Yessenov, K.: A lightweight specification language for bounded program verification. Master’s thesis, MIT (2009)
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights 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)