Abstract
Modern answer set programming solvers such as clingo support advanced language constructs that improve the expressivity and conciseness of logic programs. Conditional literals are one such construct. They form “subformulas” that behave as nested implications within the bodies of logic rules. Their inclusion brings the form of rules closer to the less restrictive syntax of first-order logic. These qualities make conditional literals useful tools for knowledge representation. In this paper, we propose a semantics for logic programs with conditional literals and arithmetic based on the \(\text {SM}\) operator. These semantics do not require grounding, unlike the established semantics for such programs that relies on a translation to infinitary propositional logic. The main result of this paper establishes the precise correspondence between the proposed and existing semantics.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
References
Abels, D., Jordi, J., Ostrowski, M., Schaub, T., Toletti, A., Wanko, P.: Train scheduling with hybrid answer set programming. Theory Pract. Logic Program. 21(3), 317–347 (2021). https://doi.org/10.1017/S1471068420000046
Balduccini, M., Gelfond, M.: Model-based reasoning for complex flight systems. In: Proceedings of Infotech@Aerospace (American Institute of Aeronautics and Astronautics) (2005)
Balduccini, M., Gelfond, M., Nogueira, M., Watson, R., Barry, M.: An a-prolog decision support system for the Space Shuttle. In: Working Notes of the AAAI Spring Symposium on Answer Set Programming (2001)
Bomanson, J., Janhunen, T., Niemelä, I.: Applying visible strong equivalence in answer-set program transformations. ACM Trans. Comput. Logic 21(4) (2020). https://doi.org/10.1145/3412854
Cabalar, P., Fandinno, J., Lierler, Y.: Modular answer set programming as a formal specification language. Theory Pract. Logic Program. 20(5), 767–782 (2020)
Cabalar, P., Muñiz, B., Pérez, G., Suárez, F.: Explainable machine learning for liver transplantation (2021). https://arxiv.org/abs/2109.13893
Fandinno, J., Hansen, Z., Lierler, Y.: Axiomatization of aggregates in answer set programming. In: Proceedings of the Thirty-Six National Conference on Artificial Intelligence (AAAI 2022). AAAI Press (2022)
Fandinno, J., Lifschitz, V., Lühne, P., Schaub, T.: Verifying tight logic programs with anthem and vampire. Theory Pract. Logic Program. 20(5), 735–750 (2020)
Fandinno, J., Hansen, Z., Lierler, Y.: Arguing correctness of asp programs with aggregates. In: Gottlob, G., Inclezan, D., Maratea, M. (eds.) LPNMR 2022. LNCS, vol. 13416, pp. 190–202. Springer, Cham (2022). https://doi.org/10.1007/978-3-031-15707-3_15
Fandinno, J., Hansen, Z., Lierler, Y.: Axiomatization of non-recursive aggregates in first-order answer set programming. J. Artif. Intell. Res. 80, 977–1031 (2024). https://doi.org/10.1613/jair.1.15786
Fandinno, J., Hansen, Z., Lierler, Y., Lifschitz, V., Temple, N.: External behavior of a logic program and verification of refactoring. Theory Pract. Logic Program. 23(4), 933–947 (2023). https://doi.org/10.1017/S1471068423000200
Fandinno, J., Lifschitz, V., Temple, N.: Locally tight programs. Theory Pract. Log. Program. 1–31 (2024). https://doi.org/10.1017/S147106842300039X
Ferraris, P., Lee, J., Lifschitz, V.: Stable models and circumscription. Artif. Intell. 175(1), 236–263 (2011)
Gebser, M., Kaminski, R., Kaufmann, B., Ostrowski, M., Schaub, T., Thiele, S.: A user’s guide to gringo, clasp, clingo, and iclingo. http://potassco.org
Gebser, M., Harrison, A., Kaminski, R., Lifschitz, V., Schaub, T.: Abstract gringo. Theory Pract. Logic Program. 15(4–5), 449–463 (2015). https://doi.org/10.1017/S1471068415000150
Gebser, M., et al.: Experimenting with robotic intra-logistics domains. Theory Pract. Logic Program. 18(3–4), 502–519 (2018). https://doi.org/10.1017/S1471068418000200
Hansen, Z., Lierler, Y.: Semantics for conditional literals via the SM operator. In: Gottlob, G., Inclezan, D., Maratea, M. (eds.) LPNMR 2022. LNCS, vol. 13416, pp. 259–272. Springer, Cham (2022). https://doi.org/10.1007/978-3-031-15707-3_20
Harrison, A., Lifschitz, V., Pearce, D., Valverde, A.: Infinitary equilibrium logic and strongly equivalent logic programs. Artif. Intell. 246, 22–33 (2017). https://doi.org/10.1016/j.artint.2017.02.002
Janhunen, T., Oikarinen, E.: LPEQ and DLPEQ—translators for automated equivalence testing of logic programs. In: Lifschitz, V., Niemelä, I. (eds.) LPNMR 2004. LNCS (LNAI), vol. 2923, pp. 336–340. Springer, Heidelberg (2003). https://doi.org/10.1007/978-3-540-24609-1_30
Kaminski, R., Romero, J., Schaub, T., Wanko, P.: How to build your own ASP-based system?! Theory Pract. Log. Program. 1–63 (2021). https://doi.org/10.1017/S1471068421000508
Lifschitz, V., Lühne, P., Schaub, T.: Verifying strong equivalence of programs in the input language of gringo. In: Proceedings of the 15th International Conference on Logic Programming and Non-monotonic Reasoning (2019). http://www.cs.utexas.edu/users/ai-lab?verification
Lifschitz, V.: Transforming gringo rules into formulas in a natural way. In: Faber, W., Friedrich, G., Gebser, M., Morak, M. (eds.) JELIA 2021. LNCS (LNAI), vol. 12678, pp. 421–434. Springer, Cham (2021). https://doi.org/10.1007/978-3-030-75775-5_28
Lifschitz, V., Pearce, D., Valverde, A.: Strongly equivalent logic programs. ACM Trans. Comput. Log. 2(4), 526–541 (2001). https://doi.org/10.1145/383779.383783
Marek, V.W., Truszczyński, M.: Stable models and an alternative logic programming paradigm. In: Apt, K.R., Marek, V.W., Truszczynski, M., Warren, D.S. (eds.) The Logic Programming Paradigm. Artificial Intelligence, pp. 375–398. Springer, Heidelberg (1999)
Niemelä, I.: Logic programs with stable model semantics as a constraint programming paradigm. Ann. Math. Artif. Intell. 25(3), 241–273 (1999). https://doi.org/10.1023/A:1018930122475
Oetsch, J., Seidl, M., Tompits, H., Woltran, S.: Testing relativised uniform equivalence under answer-set projection in the system ccT. In: Seipel, D., Hanus, M., Wolf, A. (eds.) INAP/WLP -2007. LNCS (LNAI), vol. 5437, pp. 241–246. Springer, Heidelberg (2009). https://doi.org/10.1007/978-3-642-00675-3_16
Syrjänen, T.: Cardinality constraint programs. In: Alferes, J.J., Leite, J. (eds.) JELIA 2004. LNCS (LNAI), vol. 3229, pp. 187–199. Springer, Heidelberg (2004). https://doi.org/10.1007/978-3-540-30227-8_18
Truszczynski, M.: Connecting first-order ASP and the logic FO(ID) through reducts. In: Erdem, E., Lee, J., Lierler, Y., Pearce, D. (eds.) Correct Reasoning. LNCS, vol. 7265, pp. 543–559. Springer, Heidelberg (2012). https://doi.org/10.1007/978-3-642-30743-0_37
Wotawa, F., Kaufmann, D.: Model-based reasoning using answer set programming. Appl. Intell. 52(15), 16993–17011 (2022). https://doi.org/10.1007/s10489-022-03272-2
Acknowledgments
We are grateful to Jorge Fandinno and Vladimir Lifschitz for their valuable comments, and to our anonymous reviewers for their feedback.
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Ethics declarations
Disclosure of Interests
The authors have no competing interests.
Rights and permissions
Copyright information
© 2025 The Author(s), under exclusive license to Springer Nature Switzerland AG
About this paper
Cite this paper
Hansen, Z., Lierler, Y. (2025). SM-Based Semantics for Answer Set Programs Containing Conditional Literals and Arithmetic. In: Erdem, E., Vidal, G. (eds) Practical Aspects of Declarative Languages. PADL 2025. Lecture Notes in Computer Science, vol 15537. Springer, Cham. https://doi.org/10.1007/978-3-031-84924-4_5
Download citation
DOI: https://doi.org/10.1007/978-3-031-84924-4_5
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-031-84923-7
Online ISBN: 978-3-031-84924-4
eBook Packages: Computer ScienceComputer Science (R0)