ICLP 2002: Logic Programming pp 469-469

# Fuzzy Prolog: A Simple General Implementation Using CLP($$\mathcal{R}$$ )

• Claudio Vaucheret
• Susana Muñoz
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 2401)

## Abstract

The result of introducing Fuzzy Logic into Logic Programming has been the development of several “Fuzzy Prolog” systems. These systems replace the inference mechanism of Prolog with a fuzzy variant which is able to handle partial truth as a real value or as an interval on [0,1]. Most of these systems consider only one operator to propagate the truth value through the fuzzy rules.

We aim at defining a Fuzzy Prolog Language in a general way and to provide an implementation of a Fuzzy Prolog System for our general approach that is extraordinary simple thanks to the use of constraints. Our approach is general in two aspects: (i) Truth value will be a countable union of sub-intervals on [0,1], representation also called Borel Algebra over this interval, $$\mathcal{B}$$ ([0,1]). Former representations of truth value are particular cases of this definition and many real fuzzy problems only can be modeled using this representation. (ii) The concept of aggregation generalizes the computable operators. It subsumes conjunctive operators (triangular norms as min, prod, etc), disjunctive operators (triangular co-norms as max, sum, etc), average operators (arithmetic average, cuasi-linear average, etc) and hybrid operators (combinations of previous operators). We define and use aggregation operator for our language instead of limiting ourselves to a particular one. Therefore, we have implemented several aggregation operators and others can be added to the system with little effort.

We have incorporated uncertainty into a Prolog system in a simple way. This extension to Prolog is realized by interpreting fuzzy reasoning (truth values and the result of aggregations) as a set of constraints then translating fuzzy rules into CLP($$\mathcal{R}$$ ) clauses. The implementation is based on a syntactic expansion of the source code at compilation-time. The novelty of the Fuzzy Prolog presented is that it is implemented over Prolog, using its resolution system, instead of implementing a new resolution system such as other approaches. The current implementation is a syntactic extension that uses the CLP($$\mathcal{R}$$ ) system of Ciao Prolog. Lastest distributions includes our Fuzzy Prolog implementation and can be downloaded from http://www.clip.dia.fi.upm.es/Software. Our approach can be easily implemented on other CLP($$\mathcal{R}$$ ) system.