Hostname: page-component-76fb5796d-45l2p Total loading time: 0 Render date: 2024-04-26T23:24:10.711Z Has data issue: false hasContentIssue false

Annotating answer-set programs in Lana*

Published online by Cambridge University Press:  05 September 2012

MARINA DE VOS
Affiliation:
Department of Computing, University of Bath, BA2 7AY, Bath, UK (e-mail: mdv@cs.bath.ac.uk)
DOĞA GIZEM KISA
Affiliation:
Faculty of Engineering and Natural Sciences, Sabanci University, Orhanli, Tuzla, Istanbul 34956, Turkey (e-mail: dgkisa@su.sabanciuniv.edu)
JOHANNES OETSCH
Affiliation:
Institut für Informationssysteme 184/3, Technische Universität Wien, Favoritenstraße 9-11, A-1040 Vienna, Austria (e-mail: oetsch@kr.tuwien.ac.at, puehrer@kr.tuwien.ac.at, tompits@kr.tuwien.ac.at)
JÖRG PÜHRER
Affiliation:
Institut für Informationssysteme 184/3, Technische Universität Wien, Favoritenstraße 9-11, A-1040 Vienna, Austria (e-mail: oetsch@kr.tuwien.ac.at, puehrer@kr.tuwien.ac.at, tompits@kr.tuwien.ac.at)
HANS TOMPITS
Affiliation:
Institut für Informationssysteme 184/3, Technische Universität Wien, Favoritenstraße 9-11, A-1040 Vienna, Austria (e-mail: oetsch@kr.tuwien.ac.at, puehrer@kr.tuwien.ac.at, tompits@kr.tuwien.ac.at)

Abstract

While past research in answer-set programming (ASP) mainly focused on theory, ASP solver technology, and applications, the present work situates itself in the context of a quite recent research trend: development support for ASP. In particular, we propose to augment answer-set programs with additional meta-information formulated in a dedicated annotation language, called Lana. This language allows the grouping of rules into coherent blocks and to specify language signatures, types, pre- and postconditions, as well as unit tests for such blocks. While these annotations are invisible to an ASP solver, as they take the form of program comments, they can be interpreted by tools for documentation, testing, and verification purposes, as well as to eliminate sources of common programming errors by realising syntax checking or code completion features. To demonstrate its versatility, we introduce two such tools, viz. (i) ASPDoc, for generating an HTML documentation for a program based on the annotated information, and (ii) ASPUnit, for running and monitoring unit tests on program blocks. Lana is also exploited in the SeaLion system, an integrated development environment for ASP based on Eclipse.

Type
Regular Papers
Copyright
Copyright © Cambridge University Press 2012

Access options

Get access to the full version of this content by using one of the access options below. (Log in options will check for institutional or personal access. Content may require purchase if you do not have access.)

References

Balduccini, M. 2007. Modules and signature declarations for A-Prolog: Progress report. See De Vos and Schaub, 4155.Google Scholar
Baral, C. 2003. Knowledge Representation, Reasoning, and Declarative Problem Solving. Cambridge University Press, Cambridge, England.CrossRefGoogle Scholar
Beck, K. 2003. Test-Driven Development: By Example. Addison-Wesley Professional.Google Scholar
Boenn, G., Brain, M., DeVos, M. Vos, M. and Fitch, J. 2011. Automatic music composition using answer set programming. Theory and Practice of Logic Programming 11, 2–3, 397427.CrossRefGoogle Scholar
Brain, M., Gebser, M., Pührer, J., Schaub, T., Tompits, H. and Woltran, S. 2007. “That is illogical captain!” – The debugging support tool spock for answer-set programs: System description. See De Vos and Schaub, 7185.Google Scholar
Bugliesi, M., Lamma, E. and Mello, P. 1994. Modularity in logic programming. The Journal of Logic Programming 19&20, 443502.CrossRefGoogle Scholar
Cliffe, O., DeVos, M. Vos, M., Brain, M. and Padget, J. 2008. ASPVIZ: Declarative visualisation and animation using answer set programming. In Proceedings of the ICLP 2008. Lecture Notes in Computer Science, vol. 5366. Springer, 724728.Google Scholar
De Vos, M. and Schaub, T., Eds. 2007. First International Workshop on Software Engineering for Answer Set Programming (SEA 2007).Google Scholar
De Vos, M. and Schaub, T., Eds. 2009. Second International Workshop on Software Engineering for Answer Set Programming (SEA 2009).Google Scholar
Dworschak, S., Grell, S., Nikiforova, V. J., Schaub, T. and Selbig, J. 2008. Modelling biological networks by action languages via answer set programming. Constraints 12, 1, 2165.CrossRefGoogle Scholar
Eiter, T., Faber, W., Leone, N., Pfeifer, G. and Polleres, A. 2002. The DLVk planning system: Progress report. In Proceedings of the JELIA 2002. Lecture Notes in Computer Science, vol. 2424. Springer, 541544.Google Scholar
Eiter, T., Gottlob, G. and Veith, H. 1997. Modular logic programming and generalized quantifiers. In Proceedings of the LPNMR'97. Lecture Notes in Computer Science, vol. 1265. Springer, 290309.Google Scholar
Eiter, T., Leone, N., Mateis, C., Pfeifer, G. and Scarcello, F. 1998. The KR system DLV: Progress report, comparisons and benchmarks. In Proceedings of the KR'98. Morgan Kaufmann, 406417.Google Scholar
Febbraro, O., Leone, N., Reale, K. and Ricca, F. 2011. Unit testing in ASPIDE. In Proceedings of the INAP/WLP 2011. INFSYS Research Report 1843-11-06, 165176.Google Scholar
Febbraro, O., Reale, K. and Ricca, F. 2011. ASPIDE: Integrated development environment for answer set programming. In Proceedings of the LPNMR 2011. Lecture Notes in Computer Science, vol. 6645. Springer, 317330.Google Scholar
Gebser, M., Kaufmann, B., Neumann, A. and Schaub, T. 2007. Conflict-driven answer set solving. In Proceedings of the IJCAI 2007. AAAI Press/The MIT Press, 386392.Google Scholar
Gelfond, M. and Gabaldon, A. 1999. Building a knowledge base: An example. Annals of Mathematics and Artificial Intelligence 25, 3-4, 165199.CrossRefGoogle Scholar
Gelfond, M. and Lifschitz, V. 1988. The stable model semantics for logic programming. In Proceedings of the 5th International Conference and Symposium on Logic Programming. MIT Press, 10701080.Google Scholar
Gelfond, M. and Lifschitz, V. 1991. Classical Negation in Logic Programs and Disjunctive Databases. New Generation Computing 9, 3-4, 365386.CrossRefGoogle Scholar
Giunchiglia, E., Lierler, Y. and Maratea, M. 2004. SAT-based answer set programming. In Proceedings of the AAAI 2004. AAAI Press / The MIT Press, 6166.Google Scholar
Janhunen, T., Niemelä, I., Oetsch, J., Pührer, J. and Tompits, H. 2010. On testing answer-set programs. In Proceedings of the ECAI 2010. Frontiers in Artificial Intelligence and Applications, vol. 215. IOS Press, 951956.Google Scholar
Janhunen, T., Niemelä, I., Oetsch, J., Pührer, J. and Tompits, H. 2011. Random vs. structure-based testing of answer-set programs: An experimental comparison. In Proceedings of the LPNMR 2011. Lecture Notes in Computer Science, vol. 6645. Springer, 242247.Google Scholar
Janhunen, T., Oikarinen, E., Tompits, H. and Woltran, S. 2009. Modularity aspects of disjunctive stable models. Journal Artificial Intelligence Research 35, 813857.CrossRefGoogle Scholar
Kloimüllner, C., Oetsch, J., Pührer, J. and Tompits, H. 2011. Kara: A system for visualising and visual editing of interpretations for answer-set programs. In Proceedings of the INAP/WLP 2011. INFSYS Research Report 1843-11-06, 152164.Google Scholar
Kulas, M. 2000. Annotations for Prolog - A concept and runtime handling. In Selected Papers of the 9th International Workshop on Logic-Based Program Synthesis and Transformation (LOPSTR 1999). Lecture Notes in Computer Science, vol. 1817. Springer-Verlag, 234254.CrossRefGoogle Scholar
Leavens, G. T. and Cheon, Y. 2006. Design by contract with JML. ftp://ftp.cs.iastate.edu/pub/leavens/JML/jmldbc.pdf.Google Scholar
Lifschitz, V. 2002. Answer set programming and plan generation. Journal of Artificial Intelligence 138, 1-2, 3954.CrossRefGoogle Scholar
Niemelä, I. and Simons, P. 1997. Smodels – an implementation of the stable model and well-founded semantics for normal logic programs. In Proceedings of the LPNMR'97. Lecture Notes in Computer Science, vol. 1265. Springer, 420429.Google Scholar
Niemelä, I., Simons, P. and Soininen, T. 1999. Stable model semantics of weight constraint rules. In Proceedings of the LPNMR'99. Lecture Notes in Computer Science, vol. 1730. Springer, 317331.Google Scholar
Oetsch, J., Prischink, M., Pührer, J., Schwengerer, M. and Tompits, H. 2012. On the small-scope hypothesis for testing answer-set programs. In Proceedings of the KR 2012.Google Scholar
Oetsch, J., Pührer, J. and Tompits, H. 2010. Methods and methodologies for developing answer-set programs—project description. In Technical Communications of the 26th International Conference on Logic Programming (ICLP 2010). LIPIcs, vol. 7. Schloss Dagstuhl - Leibniz-Zentrum für Informatik, 154161.Google Scholar
Oetsch, J., Pührer, J. and Tompits, H. 2011. The SeaLion has landed: An IDE for answer-set programming—preliminary report. In Proceedings of the INAP/WLP 2011. INFSYS Research Report 1843-11-06, 141151.Google Scholar
Perri, S., Ricca, F., Terracina, G., Cianni, D. and Veltri, P. 2007. An integrated graphic tool for developing and testing DLV programs. See De Vos and Schaub, 86100.Google Scholar
Soininen, T. and Niemelä, I. 1998. Developing a declarative rule language for applications in product configuration. In Proceedings of the PADL'98. Lecture Notes in Computer Science, vol. 1551. Springer, 305319.Google Scholar
Sureshkumar, A., DeVos, M. Vos, M., Brain, M. and Fitch, J. 2007. APE: An Ans Prolog* environment. See De Vos and Schaub, 101115.Google Scholar