Skip to main content

Introducing Real Variables and Integer Objective Functions to Answer Set Programming

  • Conference paper
  • First Online:
  • 513 Accesses

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

Abstract

Answer set programming languages have been extended to support linear constraints and objective functions. However, the variables allowed in the constraints and functions are restricted to integer and Boolean domains, respectively. In this paper, we generalize the domain of linear constraints to real numbers and that of objective functions to integers. Since these extensions are based on a translation from logic programs to mixed integer programs, we compare the translation-based answer set programming approach with the native mixed integer programming approach using a number of benchmark problems.

The support from the Finnish Centre of Excellence in Computational Inference Research (COIN) funded by the Academy of Finland (under grant #251170) is gratefully acknowledged.

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

Buying options

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

Learn about institutional subscriptions

Notes

  1. 1.

    The operator “=” can be represented by “\(\le \)” and “\(\ge \)”.

  2. 2.

    We use different fonts for function and predicate symbols, such as “\(h\)” and “\(\mathsf {bonus}\)” in this example, for clarity.

  3. 3.

    Linear and logarithmic encodings can be achieved using cardinality constraints [6, 18] and bit vectors [15], respectively. But both are more complex than the given ASP(LC) encoding.

  4. 4.

    More compact encoding can be obtained using choice rules, but for our purposes the current one is sufficient.

  5. 5.

    Disequalities and implications can be represented using the operators “\(\le \)” and “\(\ge \)” [17].

  6. 6.

    A prototype implementation of the mingo \(^r\) system and benchmarks can be found under http://research.ics.aalto.fi/software/asp/mingoR.

References

  1. Balduccini, M.: Industrial-size scheduling with ASP+CP. In: Delgrande, J.P., Faber, W. (eds.) LPNMR 2011. LNCS, vol. 6645, pp. 284–296. Springer, Heidelberg (2011)

    Chapter  Google Scholar 

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

    Article  Google Scholar 

  3. Clark, K.L.: Negation as failure. In: Logics and Databases, pp. 293–322 (1978)

    Google Scholar 

  4. Denecker, M., Vennekens, J., Bond, S., Gebser, M., Truszczyński, M.: The second answer set programming competition. In: Erdem, E., Lin, F., Schaub, T. (eds.) LPNMR 2009. LNCS, vol. 5753, pp. 637–654. Springer, Heidelberg (2009)

    Chapter  Google Scholar 

  5. Dutertre, B., de Moura, L.: A fast linear-arithmetic solver for DPLL(T). In: Ball, T., Jones, R.B. (eds.) CAV 2006. LNCS, vol. 4144, pp. 81–94. Springer, Heidelberg (2006)

    Chapter  Google Scholar 

  6. Gebser, M., Kaminski, R., König, A., Schaub, T.: Advances in gringo series 3. In: Delgrande, J.P., Faber, W. (eds.) LPNMR 2011. LNCS, vol. 6645, pp. 345–351. Springer, Heidelberg (2011)

    Chapter  Google Scholar 

  7. Gebser, M., Ostrowski, M., Schaub, T.: Constraint answer set solving. In: Hill, P.M., Warren, D.S. (eds.) ICLP 2009. LNCS, vol. 5649, pp. 235–249. Springer, Heidelberg (2009)

    Chapter  Google Scholar 

  8. Gelfond, M., Lifschitz, V.: The stable model semantics for logic programming. In: Kowalski, R.A., Bowen, K.A. (eds.) Logic Programming, Proceedings of the Fifth International Conference and Symposium, Seattle, Washington, August 15–19, 1988, vol. 2, pp. 1070–1080. MIT Press (1988). ISBN: 0-262-61056-6

    Google Scholar 

  9. Goldberg, D.: What every computer scientist should know about floating-point arithmetic. ACM Comput. Surv. 23(1), 5–48 (1991)

    Article  Google Scholar 

  10. Grimes, D., Hebrard, E., Malapert, A.: Closing the open shop: contradicting conventional wisdom. In: Gent, I.P. (ed.) CP 2009. LNCS, vol. 5732, pp. 400–408. Springer, Heidelberg (2009)

    Chapter  Google Scholar 

  11. IBM: CPLEX performance tuning for linear programs. http://www-01.ibm.com/support/docview.wss?uid=swg21400034

  12. Jaffar, J., Maher, M.J.: Constraint logic programming: a survey. J. Logic Program. 19/20, 503–581 (1994)

    Article  MathSciNet  Google Scholar 

  13. Liu, G., Janhunen, T., Niemelä, I.: Answer set programming via mixed integer programming. In: Brewka, G., Eiter, T., McIlraith, S.A. (eds.) Principles of Knowledge Representation and Reasoning: Proceedings of the Thirteenth International Conference, KR 2012, Rome, Italy, June 10–14, 2012, pp. 32–42. AAAI Press (2012). ISBN: 978-1-57735-560-1

    Google Scholar 

  14. Mellarkod, V.S., Gelfond, M., Zhang, Y.: Integrating answer set programming and constraint logic programming. AMAI 53(1–4), 251–287 (2008)

    MATH  MathSciNet  Google Scholar 

  15. Nguyen, M., Janhunen, T., Niemelä, I.: Translating answer-set programs into bit-vector logic. In: Tompits, H., Abreu, S., Oetsch, J., Pührer, J., Seipel, D., Umeda, M., Wolf, A. (eds.) INAP/WLP 2011. LNCS, vol. 7773, pp. 91–109. Springer, Heidelberg (2013)

    Chapter  Google Scholar 

  16. Niemelä, I.: Logic programs with stable model semantics as a constraint programming paradigm. AMAI 25(3–4), 241–273 (1999)

    MATH  Google Scholar 

  17. Niemelä, I.: Linear and integer programming modelling and tools. Lecture Notes for the course on Search Problems and Algorithms, Helsinki University of Technology (2008)

    Google Scholar 

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

    Article  MATH  Google Scholar 

  19. You, J.-H., Hou, G.: Arc-consistency + unit propagation = lookahead. In: Demoen, B., Lifschitz, V. (eds.) ICLP 2004. LNCS, vol. 3132, pp. 314–328. Springer, Heidelberg (2004)

    Chapter  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Tomi Janhunen .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2014 Springer International Publishing Switzerland

About this paper

Cite this paper

Liu, G., Janhunen, T., Niemelä, I. (2014). Introducing Real Variables and Integer Objective Functions to Answer Set Programming. In: Hanus, M., Rocha, R. (eds) Declarative Programming and Knowledge Management. INAP WLP WFLP 2013 2013 2013. Lecture Notes in Computer Science(), vol 8439. Springer, Cham. https://doi.org/10.1007/978-3-319-08909-6_8

Download citation

  • DOI: https://doi.org/10.1007/978-3-319-08909-6_8

  • Published:

  • Publisher Name: Springer, Cham

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

  • Online ISBN: 978-3-319-08909-6

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics