Skip to main content

lp2normal — A Normalization Tool for Extended Logic Programs

  • Conference paper
  • First Online:
Logic Programming and Nonmonotonic Reasoning (LPNMR 2017)

Part of the book series: Lecture Notes in Computer Science ((LNAI,volume 10377))

Abstract

Answer set programming (ASP) features a rich rule-based modeling language for encoding search problems. While normal rules form the simplest rule type in the language, various forms of extended rules have been introduced in order to ease modeling of complex conditions and constraints. Normalization means replacing such extended rules with identically functioning sets of normal rules. In this system description, we present lp2normal, which is a state-of-the-art normalizer that acts as a filter on ground logic programs produced by grounders, such as gringo. It provides options to translate away choice rules, cardinality rules, and weight rules, and to rewrite optimization statements using comparable techniques. The produced logic programs are suitable inputs to tools that lack support for extended rules, in particular. We give an overview of the normalization techniques currently supported by the tool and summarize its features. Moreover, we discuss the typical application scenarios of normalization, such as when implementing the search for answer sets using a back-end solver without direct support for cardinality constraints or pseudo-Boolean constraints.

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

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Notes

  1. 1.

    Available at http://research.ics.aalto.fi/software/asp.

  2. 2.

    Participant systems are available at http://aspcomp2015.dibris.unige.it/partici pants.

References

  1. Abío, I., Nieuwenhuis, R., Oliveras, A., Rodríguez-Carbonell, E., Mayer-Eichberger, V.: A new look at BDDs for pseudo-Boolean constraints. J. Artif. Intell. Res. 45, 443–480 (2012)

    MathSciNet  MATH  Google Scholar 

  2. Asín, R., Nieuwenhuis, R., Oliveras, A., Rodríguez-Carbonell, E.: Cardinality networks: a theoretical and empirical study. Constraints 16(2), 195–221 (2011)

    Article  MathSciNet  MATH  Google Scholar 

  3. Bailleux, O., Boufkhad, Y., Roussel, O.: New encodings of pseudo-Boolean constraints into CNF. In: Kullmann, O. (ed.) SAT 2009. LNCS, vol. 5584, pp. 181–194. Springer, Heidelberg (2009). doi:10.1007/978-3-642-02777-2_19

    Chapter  Google Scholar 

  4. Bailleux, O., Boufkhad, Y.: Efficient CNF encoding of Boolean cardinality constraints. In: Rossi, F. (ed.) CP 2003. LNCS, vol. 2833, pp. 108–122. Springer, Heidelberg (2003). doi:10.1007/978-3-540-45193-8_8

    Chapter  Google Scholar 

  5. Batcher, K.: Sorting networks and their applications. In: AFIPS Spring Joint Computer Conference, pp. 307–314. ACM (1968)

    Google Scholar 

  6. Bomanson, J., Gebser, M., Janhunen, T.: Improving the normalization of weight rules in answer set programs. In: Fermé, E., Leite, J. (eds.) JELIA 2014. LNCS (LNAI), vol. 8761, pp. 166–180. Springer, Cham (2014). doi:10.1007/978-3-319-11558-0_12

    Google Scholar 

  7. Bomanson, J., Gebser, M., Janhunen, T.: Rewriting optimization statements in answer-set programs. In: Technical Communications of ICLP 2016, vol. 52, OASIcs, pp. 5:1–5:15 (2016)

    Google Scholar 

  8. Bomanson, J., Janhunen, T.: Normalizing cardinality rules using merging and sorting constructions. In: Cabalar, P., Son, T.C. (eds.) LPNMR 2013. LNCS (LNAI), vol. 8148, pp. 187–199. Springer, Heidelberg (2013). doi:10.1007/978-3-642-40564-8_19

    Chapter  Google Scholar 

  9. Brewka, G., Eiter, T., Truszczyński, M.: Answer set programming at a glance. Commun. ACM 54(12), 92–103 (2011)

    Article  Google Scholar 

  10. Eén, N., Sörensson, N.: Translating pseudo-Boolean constraints into SAT. J. Satisfiability Boolean Model. Comput. 2, 1–26 (2006)

    MATH  Google Scholar 

  11. Gebser, M., Schaub, T.: Modeling and language extensions. AI Mag. 37(3), 33–44 (2016)

    Google Scholar 

  12. Gelfond, M., Lifschitz, V.: The stable model semantics for logic programming. In: Proceedings of ICLP 1988, pp. 1070–1080. MIT Press (1988)

    Google Scholar 

  13. Hölldobler, S., Manthey, N., Steinke, P.: A compact encoding of pseudo-Boolean constraints into SAT. In: Glimm, B., Krüger, A. (eds.) KI 2012. LNCS (LNAI), vol. 7526, pp. 107–118. Springer, Heidelberg (2012). doi:10.1007/978-3-642-33347-7_10

    Chapter  Google Scholar 

  14. Janhunen, T., Niemelä, I.: Compact translations of non-disjunctive answer set programs to propositional clauses. In: Balduccini, M., Son, T.C. (eds.) Logic Programming, Knowledge Representation, and Nonmonotonic Reasoning. LNCS (LNAI), vol. 6565, pp. 111–130. Springer, Heidelberg (2011). doi:10.1007/978-3-642-20832-4_8

    Chapter  Google Scholar 

  15. Janhunen, T., Niemelä, I.: The answer set programming paradigm. AI Mag. 37(3), 13–24 (2016)

    Google Scholar 

  16. Simons, P., Niemelä, I., Soininen, T.: Extending and implementing the stable model semantics. Artif. Intell. 138(1–2), 181–234 (2002)

    Article  MathSciNet  MATH  Google Scholar 

  17. Sinz, C.: Towards an optimal CNF encoding of Boolean cardinality constraints. In: Beek, P. (ed.) CP 2005. LNCS, vol. 3709, pp. 827–831. Springer, Heidelberg (2005). doi:10.1007/11564751_73

    Chapter  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Jori Bomanson .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2017 Springer International Publishing AG

About this paper

Cite this paper

Bomanson, J. (2017). lp2normal — A Normalization Tool for Extended Logic Programs. In: Balduccini, M., Janhunen, T. (eds) Logic Programming and Nonmonotonic Reasoning. LPNMR 2017. Lecture Notes in Computer Science(), vol 10377. Springer, Cham. https://doi.org/10.1007/978-3-319-61660-5_20

Download citation

  • DOI: https://doi.org/10.1007/978-3-319-61660-5_20

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-319-61659-9

  • Online ISBN: 978-3-319-61660-5

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics