Abstract
The semantic constructions and results for definite programs do not extend when dealing with negation. The main problem is related to a well-known problem in the area of algebraic specification: if we fix a constraint domain as a given model, its free extension by means of a set of Horn clauses defining a set of new predicates is semicomputable. However, if the language of the extension is richer than Horn clauses its free extension (if it exists) is not necessarily semicomputable. In this paper we present a framework that allows us to deal with these problems in a novel way. This framework is based on two main ideas: a reformulation of the notion of constraint domain and a functorial presentation of our semantics. In particular, the semantics of a logic program P is defined in terms of three functors: \(({\mathcal {OP}}_{P} ,{\mathcal {ALG}}_{P} ,{\mathcal {LOG}}_{P})\) that apply to constraint domains and provide the operational, the least fixpoint and the logical semantics of P, respectively. To be more concrete, the idea is that the application of \({\mathcal {OP}}_{P}\) to a specific constraint solver provides the operational semantics of P that uses this solver; the application of \({\mathcal {ALG}}_{P}\) to a specific domain provides the least fixpoint of P over this domain; and, the application of \({\mathcal {LOG}}_{P}\) to a theory of constraints provides the logic theory associated to P. In this context, we prove that these three functors are in some sense equivalent.
Similar content being viewed by others
References
Álvez, J., Lucio, P., Orejas, F.: Constructive negation by bottom-up computation of literal answers. In: Proceedings of the 2004 ACM Symposium on Applied Computing, pp. 1468–1475 (2004)
Bergstra, J.A., Broy, M., Tucker, J.V., Wirsing, M.: On the power of algebraic specifications. In: Gruska, J., Chytil, M. (eds.) Mathematical Foundations of Computer Science 1981, Strbske Pleso, Czechoslovakia, August 31–September 4, 1981, Proceedings MFCS. Lecture Notes in Computer Science, vol. 118, pp. 193–204. Springer (1981)
Carnielli, W.A.: Sistematization of finite many-valued logics through the method of tableaux. J. Symbolic Logic 52(2), 473–493 (1987)
Clark, K.L.: Negation as failure. In: Gallaire, H., Minker, J. (eds.) Logic and Databases, pp. 293–322. Plenum Press, New York (1978)
Drabent, W.: What is a failure? An approach to constructive negation. Acta Inform. 32, 27–59 (1995)
Fages, F.: Constructive negation by pruning. J. Logic Programming 32, 85–118 (1997)
Fitting, M.: A Kripke–Kleene semantics for logic programs. J. Logic Programming 4, 295–312 (1985)
Goguen, J., Meseguer, J.: Initiality, induction and computability. In: Nivat, M., Reynolds, J. (eds.) Algebraic Methods in Semantics. Cambridge Univ. Press, pp. 459–540 (1985)
Jaffar, J., Lassez, J.-L.: Constraint logic programming. In: POPL, pp. 111–119 (1987)
Jaffar, J., Maher, M.: Constraint logic programming: a survey. J. Logic Programming 19/20, 503–581 (1994)
Jaffar, J., Maher, M., Marriot, K., Stukey, P.: The semantics of constraint logic programs. J. Logic Programming 37(1), 1–46 (1998)
Kleene, S.C.: Introduction to Metamathematics. Van Nostrand (1952)
Kunen, K.: Signed data dependencies in logic programs. J. Logic Programming 7, 231–245 (1989)
Lloyd, J.W.: Foundations of Logic Programming. Springer-Verlag, 2nd edn. (1987)
Lucio, P., Orejas, F., Pino, E.: An algebraic framework for the definition of compositional semantics of normal logic programs. J. Logic Programming 40, 89–123 (1999)
Lucio, P., Orejas, F., Pasarella, E., Pino, E.: A functorial framework for constraint normal logic programming. In: Futatsugi, K., Jouannaud, J.-P., Meseguer, J. (eds.) Algebra, Meaning, and Computation, Essays, Dedicated to Joseph A. Goguen on the Occasion of His 65th Birthday. Lecture Notes in Computer Science, vol. 4060, pp. 555–577. Springer-Verlag (2006)
Pasarella, E., Pino, E., Orejas, F.: Constructive negation without subsidiary trees. In: 9th International Workshop on Functional and Logic Programming (WFLP’00), Benicàssim, Spain (2000)
Przymusinski, T.: On the declarative semantics of deductive databases and logic programs. In: Minker, J. (ed.) Foundations of Deductive Databases and Logic Progamming, pp. 193–216. Morgan Kaufmann (1988)
Shepherdson, J.C.: Language and equality theory in logic programming. Technical report PM-91-02, University of Bristol (1991)
Stuckey, P.J.: Negation and constraint logic programmming. Inform. and Comput. 118, 12–23 (1995)
Author information
Authors and Affiliations
Corresponding author
Rights and permissions
About this article
Cite this article
Lucio, P., Orejas, F., Pasarella, E. et al. A Functorial Framework for Constraint Normal Logic Programming. Appl Categor Struct 16, 421–450 (2008). https://doi.org/10.1007/s10485-008-9128-5
Received:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s10485-008-9128-5