Skip to main content Accesibility Help

A Transformation-based implementation for CLP with qualification and proximity*


Uncertainty in logic programming has been widely investigated in the last decades, leading to multiple extensions of the classical logic programming paradigm. However, few of these are designed as extensions of the well-established and powerful Constraint Logic Programming (CLP) scheme for CLP. In a previous work we have proposed the proximity-based qualified constraint logic programming (SQCLP) scheme as a quite expressive extension of CLP with support for qualification values and proximity relations as generalizations of uncertainty values and similarity relations, respectively. In this paper we provide a transformation technique for transforming SQCLP programs and goals into semantically equivalent CLP programs and goals, and a practical Prolog-based implementation of some particularly useful instances of the SQCLP scheme. We also illustrate, by showing some simple – and working – examples, how the prototype can be effectively used as a tool for solving problems where qualification values and proximity relations play a key role. Intended use of SQCLP includes flexible information retrieval applications.

Hide All

This work has been partially supported by the Spanish projects STAMP (TIN2008-06622-C03-01), PROMETIDOS–CM (S2009TIC-1465) and GPD–UCM (UCM–BSCH–GR58/08-910502).

Hide All
Apt, K. R. 1990. Logic programming. In Handbook of Theoretical Computer Science, Vol. B: Formal Models and Semantics, van Leeuwen, J., Ed. Elsevier and MIT Press, Cambridge, MA, USA, 493574.
Arcelli Fontana, F. 2002. Likelog for flexible query answering. Soft Computing 7, 107114.
Arcelli Fontana, F. and Formato, F. 1999. Likelog: A logic programming language for flexible data retrieval. In Proceedings of the 1999 ACM Symposium on Applied Computing (SAC'99). ACM Press, New York, NY, USA, 260267.
Arcelli Fontana, F. and Formato, F. 2002. A similarity-based resolution rule. International Journal of Intelligent Systems 17, 9, 853872.
Arenas, P., Fernández, A. J., Gil, A., López-Fraguas, F. J., Rodríguez-Artalejo, M. and Sáenz-Pérez, F. 2007. , a multiparadigm declarative language (version 2.3.1). In User Manual, Caballero, R. and Sánchez, J., Eds. Accessed 20 February 2012. Available at
Baldwin, J. F., Martin, T. and Pilsworth, B. 1995. Fril-Fuzzy and Evidential Reasoning in Artificial Intelligence. John Wiley, Hoboken, NJ, USA.
Bistarelli, S., Montanari, U. and Rossi, F. 2001. Semiring-based constraint logic programming: Syntax and semantics. ACM Transactions on Programming Languages and Systems 3, 1 (January), 129.
Caballero, R., Rodríguez-Artalejo, M. and Romero-Díaz, C. A. 2008. Similarity-based reasoning in qualified logic programming. In PPDP '08: Proceedings of the 10th International ACM SIGPLAN Conference on Principles and Practice of Declarative Programming, ACM, Valencia, Spain, 185194.
Caballero, R., Rodríguez-Artalejo, M. and Romero-Díaz, C. A. 2009. Qualified computations in functional logic programming. In Logic Programming (ICLP'09), Hill, P. and Warren, D., Eds. LNCS, vol. 5649, Springer-Verlag, Berlin, Germany, 449463.
Campi, A., Damiani, E., Guinea, S., Marrara, S., Pasi, G. and Spoletini, P. 2009. A fuzzy extension of the XPath query language. Journal of Intelligent Information Systems 33, 3 (December), 285305.
Dubois, D. and Prade, H. 1980. Fuzzy Sets and Systems: Theory and Applications. Academic Press, New York, NY, USA.
Freuder, E. C. and Wallace, R. J. 1992. Partial constraint satisfaction. Artificial Intelligence 58, 1–3, 2170.
Georget, Y. and Codognet, P. 1998. Compiling semiring-based constraints with CLP(FD,S). In Proceedings of the 4th International Conference on Principles and Practice of Constraint Programming. LNCS, vol. 1520. Springer-Verlag, Berlin, Germany, 205219.
Gerla, G. 2001. Fuzzy Logic: Mathematical Tools for Approximate Reasoning. Kluwer Academic, Norwell, MA, USA.
Guadarrama, S., Muñoz, S. and Vaucheret, C. 2004. Fuzzy prolog: A new approach using soft constraint propagation. Fuzzy Sets and Systems 144, 1, 127150.
Hájek, P. 1998. Metamathematics of Fuzzy Logic. Kluwer, Dordrecht, Netherlands.
Höhfeld, M. and Smolka, G. 1988. Definite Relations Over Constraint Languages. Tech. Rep. LILOG Report 53, IBM, Deutschland, Germany.
Ishizuka, M. and Kanai, N. 1985. Prolog-ELF incorporating fuzzy logic. In Proceedings of the 9th International Joint Conference on Artificial Intelligence (IJCAI'85), Joshi, A. K., Ed. Morgan Kaufmann, Los Angeles, CA, USA, 701703.
Jaffar, J. and Lassez, J. L. 1987. Constraint logic programming. In Proceedings of the 14th ACM SIGACT-SIGPLAN Symposium on Principles of Programming Languages (POPL'87). ACM Press, New York, NY, USA, 111119.
Jaffar, J., Maher, M., Marriott, K. and Stuckey, P. J. 1998. Semantics of constraints logic programs. Journal of Logic Programming 37, 1–3, 146.
Julián, R., Moreno, G. and Penabad, J. 2009. An improved reductant calculus using fuzzy partial evaluation techniques. Fuzzy Sets and Systems 160, 2, 162181.
Julián-Iranzo, P., Rubio, C. and Gallardo, J. 2009. Bousi~Prolog: A prolog extension language for flexible query answering. In Proceedings of the Eighth Spanish Conference on Programming and Computer Languages (PROLE 2008), Almendros-Jiménez, J. M., Ed. ENTCS, vol. 248. Elsevier, Gijón, Spain, 131147.
Julián-Iranzo, P. and Rubio-Manzano, C. 2009a. A declarative semantics for Bousi~Prolog. In PPDP'09: Proceedings of the 11th ACM SIGPLAN Conference on Principles and Practice of Declarative Programming. ACM, Coimbra, Portugal, 149160.
Julián-Iranzo, P. and Rubio-Manzano, C. 2009b. A similarity-based WAM for Bousi~Prolog. In Bio-Inspired Systems: Computational and Ambient Intelligence (IWANN 2009). LNCS, vol. 5517. Springer, Berlin, Germany, 245252.
Kifer, M. and Subrahmanian, V. S. 1992. Theory of generalized annotated logic programs and their applications. Journal of Logic Programming 12, 3 & 4, 335367.
Lee, R. C. T. 1972. Fuzzy logic and the resolution principle. Journal of the Association for Computing Machinery (ACM) 19, 1 (January), 109119.
Li, D. and Liu, D. 1990. A Fuzzy Prolog Database System. John Wiley, Hoboken, NJ, USA.
Lloyd, J. W. 1987. Foundations of Logic Programming, 2nd ed., Springer, New York, USA.
Loia, V., Senatore, S. and Sessa, M. I. 2004. Similarity-based SLD resolution and its role for web knowledge discovery. Fuzzy Sets and Systems 144, 1, 151171.
Medina, J., Ojeda-Aciego, M. and Vojtáš, P. 2001a. Multi-adjoint logic programming with continuous semantics. In Logic Programming and Non-Monotonic Reasoning (LPNMR'01), Eiter, T., Faber, W. and Truszczyinski, M., Eds. LNAI, vol. 2173. Springer-Verlag, Berlin, Germany, 351364.
Medina, J., Ojeda-Aciego, M. and Vojtáš, P. 2001b. A procedural semantics for multi-adjoint logic programming. In Progress in Artificial Intelligence (EPIA'01), Brazdil, P. and Jorge, A., Eds. LNAI, vol. 2258. Springer-Verlag, Berlin, Germany, 290297.
Medina, J., Ojeda-Aciego, M. and Vojtáš, P. 2004. Similarity-based unification: A multi-adjoint approach. Fuzzy Sets and Systems 146, 4362.
Riezler, S. 1998. Probabilistic Constraint Logic Programming. PhD thesis, Neuphilologischen Fakultät del Universität Tübingen, Tübingen, Germany.
Rodríguez-Artalejo, M. and Romero-Díaz, C. A. 2008. Quantitative logic programming revisited. In Functional and Logic Programming (FLOPS'08), Garrigue, J. and Hermenegildo, M., Eds. LNCS, vol. 4989. Springer-Verlag, Ise, Japan, 272288.
Rodríguez-Artalejo, M. and Romero-Díaz, C. A. 2010a. A declarative semantics for CLP with qualification and proximity. Theory and Practice of Logic Programming, 26th Int'l. Conference on Logic Programming (ICLP'10) Special Issue 10, 4–6, 627642.
Rodríguez-Artalejo, M. and Romero-Díaz, C. A. 2010b. Fixpoint & Proof-theoretic Semantics for CLP with Qualification and Proximity. Tech. Rep. SIC-1-10 (CoRR abs/1009.1977), Universidad Complutense, Departamento de Sistemas Informáticos y Computación, Madrid, Spain.
Sessa, M. I. 2001. Translations and similarity-based logic programming. Soft Computing 5, 2, 160170.
Sessa, M. I. 2002. Approximate reasoning by similarity-based SLD resolution. Theoretical Computer Science 275, 1–2, 389426.
SICS AB. 2010. SICStus Prolog. Accessed 20 February 2012. URL:
SWI-Prolog . 2010. SWI-Prolog. Accessed 20 February 2012. URL:
van Emden, M. H. 1986. Quantitative deduction and its fixpoint theory. Journal of Logic Programming 3, 1, 3753.
Vojtáš, P. 2001. Fuzzy logic programming. Fuzzy Sets and Systems 124, 361370.
Zadeh, L. A. 1965. Fuzzy sets. Information and Control 8, 3, 338353.
Zadeh, L. A. 1971. Similarity relations and fuzzy orderings. Information Sciences 3, 2, 177200.
Recommend this journal

Email your librarian or administrator to recommend adding this journal to your organisation's collection.

Theory and Practice of Logic Programming
  • ISSN: 1471-0684
  • EISSN: 1475-3081
  • URL: /core/journals/theory-and-practice-of-logic-programming
Please enter your name
Please enter a valid email address
Who would you like to send this to? *



Full text views

Total number of HTML views: 0
Total number of PDF views: 0 *
Loading metrics...

Abstract views

Total abstract views: 0 *
Loading metrics...

* Views captured on Cambridge Core between <date>. This data will be updated every 24 hours.

Usage data cannot currently be displayed