Abstract
Existing ASP languages lack support for conveniently specifying objects, their sorts and the sorts of the parameters of relations in an application domain. However, such support may allow a programmer to better structure the program, to automatically determine some syntax and semantic errors and to avoid thinking about safety of ASP rules — non-declarative conditions on rules required by existing ASP systems. In this paper, we define the syntax and semantics of a knowledge representation language \(\mathcal{SPARC}\) which offers explicit constructs to specify objects, relations, and their sorts. The language expands CR-Prolog — an extension of ASP by consistency restoring rules. We introduce an implementation of \(\mathcal{SPARC}\) based on its translation to DLV with weak constraints. A syntax checking algorithm helps to avoid errors related to misspellings as well as simple type errors. Another type checking algorithm flags program rules which, due to type conflicts, have no ground instantiations.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
Similar content being viewed by others
References
Gelfond, M., Lifschitz, V.: The stable model semantics for logic programming. In: Proceedings of ICLP 1988, pp. 1070–1080 (1988)
Syrjänen, T.: Lparse 1.0 user’s manual (2000)
Balduccini, M.: Modules and signature declarations for a-prolog: Progress report. In: Software Engineering for Answer Set Programming Workshop, SEA 2007 (2007)
Balduccini, M., Gelfond, M.: Logic programs with consistency-restoring rules. In: International Symposium on Logical Formalization of Commonsense Reasoning. AAAI 2003 Spring Symposium Series vol. 102. The AAAI Press (2003)
Leone, N., Pfeifer, G., Faber, W., Eiter, T., Gottlob, G., Perri, S., Scarcello, F.: The DLV system for knowledge representation and reasoning. ACM Transactions on Computational Logic (TOCL) 7(3), 499–562 (2006)
Buccafurri, F., Leone, N., Rullo, P.: Strong and weak constraints in disjunctive datalog. In: Fuhrbach, U., Dix, J., Nerode, A. (eds.) LPNMR 1997. LNCS, vol. 1265, pp. 2–17. Springer, Heidelberg (1997)
Balai, E., Gelfond, M., Zhang, Y.: SPARC – sorted ASP with consistency restoring rules. In: Answer Set Programming and Other Computing Paradigms (2012)
SPARC system, http://www.depts.ttu.edu/cs/research/krlab/#software
Dechter, R.: Constraint Processing. Morgan Kaufmann, San Francisco (2003)
Balai, E., Gelfond, M., Zhang, Y.: SPARC – sorted ASP with consistency restoring rules. Technical Report, Texas Tech University, USA (2012), http://www.depts.ttu.edu/cs/research/krlab/#papers
Balduccini, M.: cr-models: An Inference Engine for CR-Prolog. In: Baral, C., Brewka, G., Schlipf, J. (eds.) LPNMR 2007. LNCS (LNAI), vol. 4483, pp. 18–30. Springer, Heidelberg (2007)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2013 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Balai, E., Gelfond, M., Zhang, Y. (2013). Towards Answer Set Programming with Sorts. In: Cabalar, P., Son, T.C. (eds) Logic Programming and Nonmonotonic Reasoning. LPNMR 2013. Lecture Notes in Computer Science(), vol 8148. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-40564-8_14
Download citation
DOI: https://doi.org/10.1007/978-3-642-40564-8_14
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-642-40563-1
Online ISBN: 978-3-642-40564-8
eBook Packages: Computer ScienceComputer Science (R0)