BOUSIPROLOG
A Fuzzy Logic Programming Language for Modeling Vague Knowledge
and Approximate Reasoning
Pascual Juli´an Iranzo and Clemente Rubio Manzano
Department of Information Technologies and Systems, University of Castilla-La Mancha, Ciudad Real, Spain
Keywords:
Fuzzy logic programming, Fuzzy prolog, Weak SLD resolution, BousiProlog applications.
Abstract:
BousiProlog is an extension of the standard Prolog language. Its operational semantics is an adaptation of
the SLD resolution principle where classical unification has been replaced by a fuzzy unification algorithm
based on fuzzy relations defined on a syntactic domain. In this paper we describe how BousiProlog may
contribute to resolve several problems extracted from different application areas, where it is mandatory to deal
with vagueness and uncertain knowledge, such as: flexible deductive databases, fuzzy control, fuzzy experts
systems, data retrieval or approximate reasoning. Hence, through several (small but meaningful) examples we
show the great potential of this programming language.
1 INTRODUCTION
Logic Programming has been used widely in the area
of Artificial Intelligence for knowledge representa-
tion, expert system development or design of deduc-
tive databases. However, in recent years, it has lost
ground in the Artificial Intelligence scene. One rea-
son, perhaps the most important, has been the in-
ability of Logic Programming languages to represent
and to handle in an explicit, natural way the vague-
ness and/or the imprecision existing in the real world.
Vagueness and/or imprecision involve concepts that
cannot be sharply defined, such as: tall, small, close,
far, cheap, expensive, etc. Our main concern is rep-
resenting, manipulating, and drawing inferences from
such imprecise notions. Certainly, dealing with ap-
proximate reasoning and vagueness is essential in
most Artificial Intelligence application areas, such as
expert systems, fuzzy control, robotics, computer vi-
sion, machine learning or information retrieval. So,
it is crucial to enhance these languages with new fa-
cilities. If we want to preserve them as useful pro-
gramming tools for Artificial Intelligence, it is nec-
essary to allow an explicit management of vagueness
and approximate reasoning.
In order to address these limitations, the Fuzzy
Logic Programming (FLP) paradigm was born, so
early as in the seventies of the past century. FLP is
a research area which investigates how to introduce
fuzzy logic concepts into logic programming aiming
at to deal with the imprecision and/or vagueness ex-
isting in the real world. Despite it has long ancestry,
it is not a well established area with firm standards.
There are multiple lines of work between the one that
modifies the classical resolution procedure, replacing
it by a fuzzy resolution mechanism (Lee, 1972; Li
and Liu, 1990; P. Vojt´aˇs, 2001) and the one that ex-
tends the classical SLD resolution principle, modify-
ing its classical unification algorithm and replacing it
by a fuzzy unification algorithm (Arcelli and Formato,
2002; Sessa, 2002; Virtanen, 1998).
One distinguished feature of the first approach of
FLP is that it has produced programming languages
with explicitly annotated rules. These annotations or
weights are expressing the confidence which the user
of the system has in the truth of the rules integrating a
program. This way of expressing uncertainty may be
inappropriate, or at least inconvenient, in some con-
texts. Also it seems unnatural, from a declarative
point of view, to specify vagueness by means of a
precise number. If we want to be more accurate to
the spirit of declarative programming, we should find
mechanisms that allow us to express the vagueness in
a way independent from the program. That is, surpass
the well known assertion stating that an Algorithm =
Logic + Control (Kowalski, 1979) and to move to a
new assertion: an Algorithm = Logic + Vague Knowl-
edge + Control.
BousiProlog (Juli´an and Rubio, 2009; Juli´an and
Rubio, 2009; P. Juli´an et al, 2009) is a FLP language,
93
Julián Iranzo P. and Rubio Manzano C..
BOUSIâ
´
LijPROLOG - A Fuzzy Logic Programming Language for Modeling Vague Knowledge and Approximate Reasoning.
DOI: 10.5220/0003079200930098
In Proceedings of the International Conference on Fuzzy Computation and 2nd International Conference on Neural Computation (ICFC-2010), pages
93-98
ISBN: 978-989-8425-32-4
Copyright
c
2010 SCITEPRESS (Science and Technology Publications, Lda.)
that may be classified among those programming lan-
guages pertaining to the second approach mentioned
above, whose design has been conceived to make a
clean separation between Logic, Vague Knowledge
and Control. In a BousiProlog program Logic is spec-
ified by a set of Prolog facts and rules, Vague Knowl-
edge is mainly specified by a set of (what we call)
proximity equations, defining a fuzzy binary relation
(which is expressing how close are two concepts), and
Control is let automatic to the system, through an en-
hanced SLD resolution procedure with a fuzzy unifi-
cation algorithm based on fuzzy binary relations. In-
formally, this weak unification algorithm states that
two terms f(t
1
, ..., t
n
) and g(s
1
, ..., s
n
) weakly unify
if the root symbols f and g are close, with a certain
degree, and each of their arguments t
i
and s
i
weakly
unify. Therefore, the weak unification algorithm does
not produce a failure if there is a clash of two syntacti-
cal distinct symbols, whenever they are approximate,
but a success with a certain approximation degree.
Hence, BousiProlog computes answers as well as ap-
proximation degrees. These features are evidenced by
the following example.
Assume a fragment of a deductive database that
stores information about people and their preferences.
Under the question about whether somebody likes
whiskey, that person may answer: ‘I do not like’, ‘a
little’, ‘so much’, very much’. This situation can be
modeled by a BousiProlog program, where vagueness
and preferences of users are specified by a set of prox-
imity equations.
%% PROXIMITY EQUATIONS
does_not˜a_little=0.5. a_little˜very_much=0.2.
does_not˜so_much=0.1. so_much˜very_much=0.6.
a_little˜so_much=0.4.
%% FACTS
likes(john, whiskey, a_little).
likes(mary, whiskey, very_much).
likes(peter, whiskey, so_much).
likes(paul, whiskey, does_not).
%% RULES
buy(X,P):-likes(X, P, very_much).
In a standard Prolog system, if we ask about people
who will buy scotch whiskey
‘‘?-buy(X,whiskey)’’
,
only one answer is obtained:
Yes, X=mary
. How-
ever
john
and
peter
also are reasonable candidates
to buy scotch whiskey. Hence, if we are looking for
a flexible query answering procedure, more accurate
to the real world behavior,
john
and
peter
should
be appear as answers. The BousiProlog system an-
swers
‘‘X=john with 0.2’’, ‘‘X=mary with 1.0’’,
and ‘‘X=peter with 0.6’’
. To obtain the first an-
swer, the BousiProlog system operates as follows:
since we have specified that
a little
is close to
very much
, with degree0.2, these two terms may unify
“weakly” with approximation degree
0.2
, leading to
the unification of
likes(john, whiskey, a little)
and
likes(X, whiskey, very much)
, with
X=john
and
approximation degree
0.2
; therefore, the assertion
buy(john,whiskey)
is stated with approximation de-
gree
0.2
. Similarly for the remainder answers.
The aim of this paper is to describe how
BousiProlog may contribute to resolve several prob-
lems extracted from different application areas, where
it is mandatory to deal with vagueness and uncertain
knowledge, such as: deductive databases, knowledge-
based systems, data retrieval or approximate reason-
ing. To accomplish this goal, through the paper, we
discuss and implement several (small but meaning-
ful) examples showing the great potential of this pro-
gramming language. For a more detailed study of
BousiProlog foundations, as well as pieces of related
work, we direct the interested reader to the papers
(Juli´an and Rubio, 2009; Juli´an and Rubio, 2009; P.
Juli´an et al, 2009). Also, a reference manual (with its
precise syntax) and more examples can be found at
the URL: http://dectau.uclm.es/bousi/.
2 FLEXIBLE QUERY
ANSWERING IN DEDUCTIVE
DATABASES
There are several approaches to fuzzy flexible
database. We highlight two of them: i) the model of
Buckles-Petry (Buckles and Petry, 1985) and Shenoi-
Melton (Shenoi and Melton, 1999), where a rela-
tional database is fuzzified by means of a similar-
ity/proximity relation defined on an universal do-
main; ii) the model of Prade-Testemale (Prade and
Testemale, 1984) in which attribute values may be ex-
pressed in (vague) linguistic terms (roughly speaking,
using fuzzy sets).
In this section we show how BousiProlog allows
to simulate both fuzzy flexible database approaches
effectively. We begin with an example illustrating
how to implement a fragment of a flexible database in
the the Buckles-Petry and Shenoi-Melton style. This
example is adapted from a work of Motro (Motro,
1988), althoughthe techniquesused there differs from
ours. In Motro’s work the relational data model is ex-
tended using data metrics, and the query language is
extended with a single feature, a similar-to compara-
tor. On the other hand, we concentrate on deductive
databases, i.e., databases consisting of facts and rules
that have a deductive capability.
Assume a database storing information on films
which are shown at some cinema of a specific neigh-
ICFC 2010 - International Conference on Fuzzy Computation
94
bourhood of Los Angeles city. The database con-
sists of three tables (relations, represented by BPL
facts) with a total of eight attributes. The
film
ta-
ble has three attributes: title, director and category
of the film. The
theater
table is characterized by
the theater name, owner and location of the theater.
The
engagement
table is used to link the information
stored in the first two tables and it has two attributes:
the title of the film and the name of the theater. The
fuzzy component is defined by two proximity rela-
tions. The first one states the similarity between the
different film categories (i.e., it is defined on the syn-
tactic domain of film categories) and the second one
states the closeness of two theater locations (i.e., it is
defined on the syntactic domain of theater locations).
In this example, both fuzzy relations are implemented
explicitly by means of a set of proximity equations.
%% DIRECTIVE
:-lambdaCut(0.5). %% only approximation degrees equal or
%% greater than 0.5 are considered
%% PROXIMITY RELATIONS
%% Location Distance Relationship
bervely_hills˜downtown=0.3. downtown˜santa_monica=0.23.
bervely_hills˜santa_monica=0.45.downtown˜westwood=0.25.
bervely_hills˜hollywood=0.56. hollywood˜santa_monica=0.3.
bervely_hills˜westwood=0.9. hollywood˜westwood=0.45.
downtown˜hollywood=0.45. santa_monica˜westwood=0.9.
%% Category Relationship
comedy˜drama=0.6. drama˜adventure=0.6.
comedy˜adventure=0.3. drama˜suspense=0.6.
comedy˜suspense=0.3. adventure˜suspense=0.9.
%% Films Table
%% film(Title, Director, Category)
film(four_feathers, korda, adventure).
film(modern_times, chaplin, comedy).
film(psycho, hitchcock, suspense).
film(rear_window, hitchcock, suspense).
film(robbery, yates, suspense).
film(star_wars, lucas, adventure).
film(surf_party, dexter, drama).
%% Theaters Table
%% theater(Name,Owner,Location).
theater(chinese, mann, hollywood).
theater(egyptian, va, westwood).
theater(music_hall, lae, bervely_hills).
theater(odeon, cineplex, santa_monica).
theater(rialto, independent, downtown).
theater(village, mann, westwood).
%% Engagements Table
%% engagement(Film,Theater)
engagement(modern_times, rialto).
engagement(start_wars, rialto).
engagement(star_wars, chinese).
engagement(rear_window, egyptian).
engagement(surf_party, village).
engagement(robbery, odeon).
engagement(modern_times, odeon).
engagement(four_feathers, music_hall).
%% MAIN RULE
%% search(input, input, output, output)
search(Category, Location, Film, Theater) :-
film(Film, _, Category), engagement(Film, Theater),
theater(Theater, _, Location).
The predicate
search/4
allows us to know the
cinema which is showing a film closest to our
location and category of preference. If we
launch the goal
search(adventure, westwood,
Film, Theater).
”, the system answers:
Film =
rear window, Theater = egyptian, with 0.9
(a suspense film located at
west- wood
),
Film =
surf party, Theater = village, with 0.6
(a
drama film located at
westwood
),
Film = robbery,
Theater = odeon, with 0.9
(a suspense film lo-
cated at
santa monica
),
Film = four feathers,
Theater = music hall, with 0.9
(an adventure
film located at
bervely hills
).
Next, we present a BPL program implementing a
fragment of a flexible deductive database in the style
of Prade and Testemale. That is, databases that incor-
porate the notion of fuzziness by means of fuzzy sets
that may be used as attributes of a table.
In this example we model a database fragment for
a real state company with information about flats to
be hired. The company wants to help clients to select
flats in stock, according their preferences.
%% DIRECTIVES declaring and defining linguistic variables
%% (i.e., fuzzy sets)
%% Linguistic variable: rental
:-domain(rental(0,600,euros)).
:-fuzzy_set(rental[cheap(100,100,250,500),
normal(100,300,400,600), expensive(300,450,600,600)]).
%% Linguistic variable: distance
:-domain(distance(0,50,minutes)).
:-fuzzy_set(distance[close(0,0,15,40),
medial(15,25,30,35), far(20,35,50,50)]).
%% Linguistic variable: flat conditions
:-domain(condition(0,10,conditions)).
:-fuzzy_set(conditions[unfair(0,0,1,3), fair(1,3,6),
good(4,6,8), excellent(7,9,10,10)]).
%% FACTS
%% Flats table
%% flat(Code, Street, Rental, Condition).
flat(f1, libertad_street, rental#300, more_or_less#good).
flat(f2, ciruela_street, rental#450, somewhat#good).
flat(f3, granja_street, rental#200, unfair).
%% Streets table
%% street(Name, District)
street(libertad_street, ronda_la_mata).
street(ciruela_street, downtwon).
þÿBOUSI"<PROLOG - A Fuzzy Logic Programming Language for Modeling Vague Knowledge and Approximate Reasoning
95
street(granja_street, ronda_santa_maria).
%% Distance table
%% distance(District, District, Distance)
%% to university campus
distance(ronda_la_mata, campus, somewhat#close).
distance(downtwon, campus, medial).
distance(ronda_santa_maria, campus, far).
%% RULES
%% close_to(Flat, District)
close_to(Flat, District):-
flat(Flat, Street, _, _), street(Street, Flat_Dist),
distance(Flat_Dist, District, close).
select_flat(Flat, Street):-
flat(Flat, Street, cheap, good), close_to(Flat,campus).
Now
select flat/2
selects those flats which may be
considered
cheap
,
good
and
close
to the
campus
with a
certain degree. More precisely, if we launch the goal
?- select flat(Flat, Street).
”, we obtain:
Flat
= f1, Street = libertad, with 0.8
and
Flat =
f2, Street = ciruela, with 0.2
”, being flat
f3
at
granja
street disregarded.
Finally, it is noteworthy that in many cases it
will be necessary, or preferable, to combine both ap-
proaches, in order to model a problem properly. That
is, to declare and define linguistic variables in con-
junction with proximity relations. This last option is
completely feasible in BousiProlog.
3 KNOWLEDGE-BASED
SYSTEMS
As an example of Knowledge-Based System, we im-
plement a fuzzy logic controller which is an adapta-
tion of the one described in (Shalfield, 2005)
1
.
In the general model, the device being controlled
has a set of activators that take the input and use this
to affect its settings and a set of sensors that get in-
formation from the device. The fuzzy logic controller
takes the ’crisp’ information from the sensors as in-
put and fuzzifies this into some linguistic variables,
propagates membership values using linguistic rules
and, finally, defuzzifies the output and returns these
’crisp’ values to the activators. The controller we
shall implement will use a set of fuzzy rules to adjust
the throttle of a steam turbine according to its current
temperature and pressure to keep it running smoothly.
Defining Linguistic Variables. First we need to de-
cide upon the linguistic variables that are going to be
1
We suggest to compare our solution with the one ap-
peared in (Shalfield, 2005), in order to observe how natural
is our codification of this problem.
used in the BPL program. We do this by looking at
the descriptors that will be used by the rules, in this
case ‘temperature’, ‘pressure’ and ‘throttle’:
:-domain(temperature(0,500,Celsius)).
:-fuzzy_set(temperature, [cold(0,0,110,165),
cool(110,165,220), normal(165,220,275),
warm(220,275,330), hot(275,330,500,500)]).
:-domain(pressure(0,300,kpa)).
:-fuzzy_set(pressure, [weak(0,0,10,70), low(10,70,130),
ok(70,130,190), strong(130,190,250),
high(190,250,300,300)]).
:-domain(throttle(-60,60,rpm)).
:-fuzzy_set(throttle, [neg_large(-60,-60,-45,-30),
neg_medium(-45,-30,-15), neg_small(-30,-15,0),
zero(-15,0,15), pos_small(0,15,30),
pos_medium(15,30,45), pos_large(30,45,60,60)]).
For the ’throttle’ variable, a negative value indicates
that the throttle should be moved back and a positive
value that it should be moved forward. The prob-
lem results in moving the throttle by large, medium
or small amounts in the negative and positive direc-
tions.
Defining Rules. After defining the linguistic vari-
ables used by our program, we can proceed to de-
fine the rules. In this example the rules will cover
all the possiblecombinationsof temperatureand pres-
sure and give a resultant throttle change for each. An
example of a rule specified by an expert is:
If the temperature is cold and the pressure is weak then
increase the throttle by a large amount.
This rule has a direct translation to BPL code:
throttle(pos_large):- temperature(cold), pressure(weak).
In particular, the remainder rules for a situation of
cold
temperature and for a situation of
cool
temper-
ature are:
%% Cold
throttle(pos_medium):- temperature(cold), pressure(low).
throttle(pos_small):- temperature(cold), pressure(ok).
throttle(neg_small):- temperature(cold), pressure(strong).
throttle(neg_medium):- temperature(cold), pressure(high).
%% Cool
throttle(pos_large):- temperature(cool), pressure(weak).
throttle(pos_medium):- temperature(cool), pressure(low).
throttle(zero):- temperature(cool), pressure(ok).
throttle(neg_medium):- temperature(cool), pressure(strong).
throttle(neg_medium):- temperature(cool), pressure(high).
We can define the rest of rules (for
normal
,
warm
, and
hot
temperature), in a similar linguistic declarative
way.
The inputs to the logical system should be taken
from the sensors of the real device, but in this simple
example they are modeled by facts:
ICFC 2010 - International Conference on Fuzzy Computation
96
%% Facts
temperature(temperature#300). pressure(pressure#150).
Running this BPL program, it is possible to re-
turn a ’crisp’ value for the throttle by means of the
BPL built-in predicate
defuzzify
2
. If we launch the
goal
?-defuzzify(throttle( ),Y).
we obtain the
answer “
Y = throttle#-14.09
”.
4 INFORMATION RETRIEVAL
The following example shows how proximity equa-
tions can be used as a fuzzy model for information
retrieval where textual information is selected or an-
alyzed using an ontology (Gruber, 1995), that is, a
structured collection of terms that formally defines
the relations among them. Hence, inside a seman-
tic context instead of a purely syntactic context. A
practical textual inference task is finding concepts
which are structurally analogous. Proximity equa-
tions can help in this task. The set of proximity
equations shown below has been obtained using Con-
ceptNet (Liu and Singh, 2004), a freely available
commonsense knowledge-base and natural-language-
processing toolkit
3
. ConceptNet is structured as
a network of semi-structured natural language frag-
ments. It has a
GetAnalogousConcepts()
function
that returns a list of structurally analogous concepts
given a source concept. In our case the source con-
cept is “wheat”. The degree of structural analogy be-
tween terms is also provided by ConceptNet. The set
of proximity equations is a partial view of the original
output, which was hand-made adapted by ourselves.
We want to extract information on terms struc-
turally analogous to “wheat” on a given text. In our
example, the input text is borrowed from Reuters, a
test collection for text categorization research
4
. The
data in this collection was originally collected and la-
beled by Carnegie Group, Inc. and Reuters, Ltd. in
the course of developing the CONSTRUE text cate-
gorization system. The fragment text of our example
is one classified with the label (topic) “wheat” and
processed by erasing stop words and the endings of a
word stem.
% DIRECTIVE
:- transitivity(yes). %% builds a similarity starting from
%% the proximity equations
% PROXIMITY EQUATIONS
2
As a reasonable starting point we are using the stan-
dard method of average of the maximum as defuzzifying
method.
3
Available at http://conceptnet.media.mit.edu/.
4
Available at http://www.daviddlewis.com/resources/test
collections/reuters21578/.
wheat˜bean=0.315. wheat˜human=0.205. bean˜crop=0.315.
wheat˜corn=0.315. bean˜animal=0.35. bean˜child=0.33.
wheat˜grass=0.315. bean˜corn=0.48. bean˜grass=0.315.
wheat˜horse=0.315. bean˜flower=0.315. bean˜potato=0.5.
bean˜horse=0.335. bean˜table=0.35.
% FACTS and RULES
%% searchTerm(T,L1,L2), true if T is a (constant) term, L1
%% is a list of (constant) terms (representing a text) and
%% L2 is a list of triples t(X,N,D); where X is a term
%% similar to T with degree D, which occurs N times in the
%% text L1
searchTerm(T,[],[]).
searchTerm(T,[X|R],L):-
T˜X=AD, !, searchTerm(T,R,L1), insert(t(X,1,AD),L1,L).
searchTerm(T,[X|R],L):- searchTerm(T,R,L).
insert(t(T,N,D), [], [t(T,N,D)]).
insert(t(T1,N1,D), [t(T2,N2,_)|R],[t(T1,N,D)|R]) :-
T1 == T2, N is N1+N2.
insert(t(T1,N1,D), [t(T2,N2,D2)|R2],[t(T2,N2,D2)|R]) :-
T1 \== T2, insert(t(T1,N1,D), R2, R).
% GOAL
g(T,L):-searchTerm(T, [agriculture,department,report,farm,
own,reserve,national,average,price,loan,release,
price,reserves,matured,bean,grain,enter,corn,
sorghum,rates,bean,potato], L).
A simple session with the BPL system, launching
the goal
?- g(corn,L).
provides the answer:
L =
[t(potato, 1, 0.48), t(bean, 2, 0.48), t(corn,
1, 1.0)] with 1.0
”. The information returned by
the goal can be used lately to analyze the input text or
to obtain a degree of preference in a retrieval process.
It is noteworthy, that using similar techniques to
the above decribeded here, in (Romero et al, 2010) we
have presented a declarative approach to text catego-
rization using the ability of BousiProlog for flexible
matching and knowledge representation by means of
an ontology of terms modeled by a set of proximity
equations.
5 APPROXIMATE REASONING
Approximate reasoning is basically the inference of
an imprecise conclusion from imprecise premises.
All the examples discussed along this paper concerns
with approximate reasoning in some degree. How-
ever, in this section we want to make a reflexion on
fuzzy inference, such as it was formalized by Zadeh
(Zadeh, 1975a; Zadeh, 1975b), and how BousiProlog
can deal with this kind of reasoning. In this ap-
proach, each granule of knowledge is represented by
a fuzzy set or a fuzzy relation on the appropriate uni-
verse. The premises of an argument are expressed
as fuzzy rules and a fuzzy inference is a generaliza-
þÿBOUSI"<PROLOG - A Fuzzy Logic Programming Language for Modeling Vague Knowledge and Approximate Reasoning
97
tion of modus ponens that can be formalized as:
if
x
is
F
then
y
is
G” and “x
is
F
” then “y
is
G
”.
Roughly speaking, x and y are variables that takes val-
ues on ordinary sets U and W, F and F
are fuzzy
subsets on U whilst G and G
are fuzzy subsets on
W. There has been proposed several methods to com-
pute G
, though there is not consensus as to which is
the best. The method proposed by Zadeh consists of
identifying from F and G a fuzzy relation, R onU and
W, which has a consequence over G
on W.
BousiProlog proceeds in a different way. It con-
structs a fuzzy relation over the fuzzy domains (more
accurately, the set of linguistic labels in a linguistic
variable) involved in a BPL program. This fuzzy rela-
tion is built at compile time. Afterwards, at run time,
it is used by the weak SLD resolution procedure to
infer an answer to a query. For instance, BousiProlog
models the following fuzzy inference in a very natural
way:
if
x
is young then
x
is fast
and
Robert
is middle
” then “
Robert is somewhat fast
”.
:-domain(age(0,100,years)).
:-fuzzy_set(age,[young(0,0,30,50),
middle(20,40,60,80), old(50,80,100,100)]).
:-domain(speed(0,40,km/h)).
:-fuzzy_set(speed,[slow(0,0,15,20),
normal(15,20,25,40), fast(25,30,40,40)]).
speed(X, fast) :- age(X, young). age(robert, middle).
Now, if we launch the goal
?- speed(robert,
somewhat#fast)
”, the BPL system answers
Yes with
0.375
”. On the other hand, in our case, BousiProlog
may treat linguistic terms as function or predicate
symbols and no limitations are imposed to the first or-
der syntax of the language. This feature may produce
big benefices with little effort.
6 CONCLUSIONS
BousiProlog is an extension of the standard Prolog
language with a fuzzy unification algorithm based on
proximity relations. In this paper, through a num-
ber of (small but meaningful) examples extracted
from different application areas (such as deductive
databases, knowledge-based systems, data retrieval or
approximate reasoning), we have shown the potential
power of BousiProlog for these areas and how it is
an useful tool for dealing with approximate reason-
ing and modeling vagueness. It is noteworthy that
BousiProlog, thanks to its operational machanism,
employs very few extensions to the Prolog syntax,
obtaining a natural codification for vague problems
that can be understood easily by a Prolog programmer.
This is to remark that, the main difference between
the BPL system and a standard Prolog system is in the
inside, not in the surface.
REFERENCES
Buckles, B. and Petry, F. (1985). A fuzzy model for rela-
tional databases. Fuzzy Sets and Systems, 7:213–226.
Arcelli, F. and Formato, F. (2002). A similarity-based reso-
lution rule. Int. J. Intell. Syst., 17(9):853–872.
Gruber, T. R. (1995). Toward principles for the design of
ontologies used for knowledge sharing. International
Journal Human-Computer Studies, 43(5-6):907–928.
Liu, H. and Singh, P. (2004). Conceptnet – a practical com-
monsense reasoning tool-kit. BT Technology Journal,
22(4):211–226.
Juli´an, P. and Rubio, C. (2009). A Declarative Semantics
for BousiProlog. In: Proc. of 11th Intl. Symposium
on PPDP’09. ACM SIGPLAN.
Juli´an, P. and Rubio, C. and Gallardo, J. (2009).
BousiProlog: a Prolog extension language for flex-
ible query answering. In: ENTCS, vol 248, pp. 131-
147. Elsevier.
Juli´an, P. and Rubio, C. (2009). A similarity-based WAM
for BousiProlog. In: LNCS, vol 5517, pp. 245–252.
Springer.
Kowalski, R. A. (1979). Algorithm = Logic + Control.
Communications of the ACM, 22(7):424–436.
Lee, R. C. T. (1972). Fuzzy Logic and the Resolution Prin-
ciple. Journal of the ACM, 19(1):119–129.
Li, D. and Liu, D. (1990). A fuzzy Prolog database system.
John Wiley & Sons, Inc.
Motro, A. (1988). VAGUE: A user interface to relational
databases that permits vague queries. ACM Transac-
tions on Office Information Systems, 6(3):187–214.
Prade, H. and Testemale, C. (1984). Generalizing
database relational algebra for the treatment of incom-
plete/uncertain information and vague queries. Infor-
mation Science, 34:115–143.
Romero, F. P. and Juli´an, F. P. and Ferreira, M. and Gal-
lardo, J. (2010). Una Aproximaci´on Declarativa a la
Clasificaci´on de Documentos. In: Proc. of ESTYLF
2010, p.p: 211-216.
Sessa, M. I. 2002. Approximate reasoning by similarity-
based sld resolution. Theoretical Computer Science,
275(1-2):389–426.
Shalfield, R. (2005). LPA-PROLOG: Flint reference. Tech-
nical report, Logic Programming Associates ltd.
Shenoi, S. and Melton, A. (1999). Proximity relations in
the fuzzy relational database model. Fuzzy Sets and
Systems, 100:51–62.
Virtanen, H. E. (1998). Linguistic Logic Programming.
Logic Programming and Soft Computing, p.p: 91–
128.
Vojt´s, P. (2001). Fuzzy Logic Programming. Fuzzy Sets
and Systems, 124(1):361–370.
Zadeh, L. A. (1975). The Concept of a Linguistic Variable
and its Applications to Approximate Reasoning I, II
and III. J. of Information Sciences 8 and 9, Elsevier.
Zadeh, L. A. (1975). Fuzzy Logic and Approximate Rea-
soning. Synthese, 30(3–4):407–428, Springer.
ICFC 2010 - International Conference on Fuzzy Computation
98