Fuzzy Linguistic Logic Programming and its Applications

Reading time: 65 minute
...

📝 Original Info

  • Title: Fuzzy Linguistic Logic Programming and its Applications
  • ArXiv ID: 0904.0589
  • Date: 2009-04-06
  • Authors: Researchers mentioned in the ArXiv original paper

📝 Abstract

The paper introduces fuzzy linguistic logic programming, which is a combination of fuzzy logic programming, introduced by P. Vojtas, and hedge algebras in order to facilitate the representation and reasoning on human knowledge expressed in natural languages. In fuzzy linguistic logic programming, truth values are linguistic ones, e.g., VeryTrue, VeryProbablyTrue, and LittleFalse, taken from a hedge algebra of a linguistic truth variable, and linguistic hedges (modifiers) can be used as unary connectives in formulae. This is motivated by the fact that humans reason mostly in terms of linguistic terms rather than in terms of numbers, and linguistic hedges are often used in natural languages to express different levels of emphasis. The paper presents: (i) the language of fuzzy linguistic logic programming; (ii) a declarative semantics in terms of Herbrand interpretations and models; (iii) a procedural semantics which directly manipulates linguistic terms to compute a lower bound to the truth value of a query, and proves its soundness; (iv) a fixpoint semantics of logic programs, and based on it, proves the completeness of the procedural semantics; (v) several applications of fuzzy linguistic logic programming; and (vi) an idea of implementing a system to execute fuzzy linguistic logic programs.

💡 Deep Analysis

This research explores the key findings and methodology presented in the paper: Fuzzy Linguistic Logic Programming and its Applications.

The paper introduces fuzzy linguistic logic programming, which is a combination of fuzzy logic programming, introduced by P. Vojtas, and hedge algebras in order to facilitate the representation and reasoning on human knowledge expressed in natural languages. In fuzzy linguistic logic programming, truth values are linguistic ones, e.g., VeryTrue, VeryProbablyTrue, and LittleFalse, taken from a hedge algebra of a linguistic truth variable, and linguistic hedges (modifiers) can be used as unary connectives in formulae. This is motivated by the fact that humans reason mostly in terms of linguistic terms rather than in terms of numbers, and linguistic hedges are often used in natural languages to express different levels of emphasis. The paper presents: (i) the language of fuzzy linguistic logic programming; (ii) a declarative semantics in terms of Herbrand interpretations and models; (iii) a procedural semantics which directly manipulates linguistic terms to compute a lower bound to the tr

📄 Full Content

People usually use words (in natural languages), which are inherently imprecise, vague and qualitative in nature, to describe real world information, to analyse, to reason, and to make decisions. Moreover, in natural languages, linguistic hedges are very often used to state different levels of emphasis. Therefore, it is necessary to investigate logical systems that can directly work with words, and make use of linguistic hedges since such systems will make it easier to represent and reason on knowledge expressed in natural languages.

Fuzzy logic, which is derived from fuzzy set theory, introduced by L. Zadeh, deals with reasoning that is approximate rather than exact, as in classical predicate logic. In fuzzy logic, the truth value domain is not the classical set {False, True} or {0, 1}, but a set of linguistic truth values (Zadeh 1975b) or the whole unit interval [0,1]. Moreover, in fuzzy logic, linguistic hedges play an essential role in the generation of the values of a linguistic variable and in the modification of fuzzy predicates (Zadeh 1989). Fuzzy logic provides us with a very powerful tool for handling imprecision and uncertainty, which are very often encountered in real world information, and a capacity for representing and reasoning on knowledge expressed in linguistic forms.

Fuzzy logic programming, introduced in Vojtáš (2001), is a formal model of an extension of logic programming without negation working with a truth functional fuzzy logic in narrow sense. In fuzzy logic programming, atoms and rules, which are many-valued implications, are graded to a certain degree in the interval [0,1]. Fuzzy logic programming allows a wide variety of many-valued connectives in order to cover a great variety of applications. A sound and complete procedural semantics is provided to compute a lower bound to the truth value of a query. Nevertheless, no proofs of extended versions of Mgu and Lifting lemmas are given. Fuzzy logic programming has applications such as threshold computation, a data model for flexible querying (Pokorný and Vojtáš 2001), and fuzzy control (Gerla 2005).

The theory of hedge algebras, introduced in Nguyen and Wechler (1990;1992), forms an algebraic approach to a natural qualitative semantics of linguistic terms in a term domain. The hedge-algebra-based semantics of linguistic terms is qualitative, relative, and dependent on the order-based structure of the term domain. Hedge algebras have been shown to have a rich algebraic structure to represent linguistic domains (Nguyen et al. 1999), and the theory can be effectively applied to problems such as linguistic reasoning (Nguyen et al. 1999) and fuzzy control (Nguyen et al. 2008). The notion of an inverse mapping of a hedge is defined in Dinh-Khac et al. (2006) for monotonic hedge algebras, a subclass of linear hedge algebras.

In this work, we integrate fuzzy logic programming and hedge algebras to build a logical system that facilitates the representation and reasoning on knowledge expressed in natural languages. In our logical system, the set of truth values is that of linguistic ones taken from a hedge algebra of a linguistic truth variable. Furthermore, we consider only finitely many truth values. On the one hand, this is due to the fact that normally, people use finitely many degrees of quality or quantity to describe real world applications which are granulated (Zadeh 1997). On the other hand, it is reasonable to provide a logical system suitable for computer implementation. In fact, the finiteness of the truth domain allows us to obtain the Least Herbrand model for a finite logic program after a finite number of iterations of an immediate consequences operator. Moreover, we allow the use of linguistic hedges as unary connectives in formulae to express different levels of accentuation on fuzzy predicates. The procedural semantics in Vojtáš (2001) is extended to deduce a lower bound to the truth value of a query by directly computing with linguistic terms.

The paper is organised as follows: the next section gives a motivating example for the development of fuzzy linguistic logic programming; Section 3 presents linguistic truth domains taken from hedge algebras of a truth variable, inverse mappings of hedges, many-valued modus ponens w.r.t. such domains; Section 4 presents the theory of fuzzy linguistic logic programming, defining the language, declarative semantics, procedural semantics, and fixpoint semantics, and proving the soundness and completeness of the procedural semantics; Section 5 and Section 6 respectively discuss several applications and an idea for implementing a system where such logic programs can be executed; the last section summarises the paper.

Our motivating example is adapted from the hotel reservation system described in Naito et al. (1995). Here, we use logic programming notation. A rule to find a convenient hotel for a business trip can be defined as follows:

convenient hotel (Business location, Time, Hotel ) ← ∧(near to(Business location, Hotel ), reasonable cost (Hotel , Time), fine building(Hotel )) • with truth value=VeryTrue That is, a hotel is regarded to be convenient for a business trip if it is near the business location, has a reasonable cost at the considered time, and is a fine building.

Here, fine building(Hotel) is an atomic formula (atom), which is a fuzzy predicate symbol with a list of arguments, having a truth value. There is an option that the truth value of fine building of a hotel is a number in [0,1] and is calculated by a function of its age as in Naito et al. (1995). However, in fact, the age of a hotel may not be enough to reflect its fineness since the fineness also depends on the construction quality and the surroundings. Similarly, the truth value of reasonable cost can be computed as a function of the hotel rate at the time. Nevertheless, since the rate varies from season to season, the function should be modified accordingly to reflect the reasonableness for a particular time. Thus, a more realistic and appropriate way is to assess the fineness and the reasonableness of the cost of a hotel using linguistic truth values, e.g., ProbablyTrue, after considering all possible factors.

Note that there can be more than one way to define the convenience of a hotel, and the above rule is only one of them. Furthermore, since any of such rules may not be absolutely true for everybody, each rule should have a degree of truth (truth value). For example, VeryTrue is the truth value of the above rule.

In addition, since linguistic hedges are usually used to state different levels of emphasis, we desire to use them to express different degrees of requirements on the criteria. For example, if we want to emphasise closeness, we can use the formula Very near to(Business location,Hotel) instead of near to(Business location,Hotel) in the rule, and if we do not care much about the cost, we can relax the criterion by using the hedge Probably for the atom reasonable cost(Hotel,Time). Thus, the rule becomes: convenient hotel (Business location, Time, Hotel ) ← ∧(Very near to(Business location, Hotel ), Probably reasonable cost (Hotel , Time), fine building(Hotel )) • with truth value=VeryTrue In our opinion, in order to model knowledge expressed in natural languages, a formalism should address the twofold usage of linguistic hedges, i.e., in generating linguistic values and in modifying predicates. To the best of our knowledge, no existing frameworks of logic programming have addressed the problem of using linguistic truth values as well as allowing linguistic hedges to modify fuzzy predicates.

3 Hedge algebras and linguistic truth domains

Since the mathematical structures of a given set of truth values play an important role in studying the corresponding logics, we present here an appropriate mathematical structure of a linguistic domain of a linguistic variable Truth in particular, and that of any linguistic variable in general.

In an algebraic approach, values of the linguistic variable Truth such as True, VeryTrue, ProbablyFalse, VeryProbablyFalse, and so on can be considered to be generated from a set of generators (primary terms) G = {False, True} using hedges from a set H = {Very, More, Probably, • • •} as unary operations. There exists a natural ordering among these values, with a ≤ b meaning that a indicates a degree of truth less than or equal to b. For example, True < VeryTrue and False < LittleFalse, where a < b iff a ≤ b and a = b. The relation ≤ is called the semantically ordering relation (SOR) on the term domain, denoted by X .

There are natural semantic properties of linguistic terms and hedges that can be formulated in terms of the SOR as follows. Let V, M, L, P, and A stand for the hedges Very, More, Little, Probably, and Approximately, respectively.

(i) Hedges either increase or decrease the meaning of terms they modify, so they can be regarded as ordering operations, i.e., ∀h ∈ H , ∀x ∈ X , either hx ≥ x or hx ≤ x . The fact that a hedge h modifies terms more than or equal to another hedge k , i.e., ∀x ∈ X , hx ≤ kx ≤ x or x ≤ kx ≤ hx , is denoted by h ≥ k . Note that since the sets H and X are disjoint, we can use the same notation ≤ for different ordering relations on H and on X without any confusion. For example, we have

(ii) A hedge has a semantic effect on others, i.e., it either strengthens or weakens the degree of modification of other hedges. If h strengthens the degree of modification of k , i.e., ∀x ∈ X , hkx ≤ kx ≤ x or x ≤ kx ≤ hkx , then it is said that h is positive w.r.t. k ; if h weakens the degree of modification of k , i.e., ∀x ∈ X , kx ≤ hkx ≤ x or x ≤ hkx ≤ kx , then it is said that h is negative w.r.t. k . For instance, V is positive w.r.t. M since, e.g., VMTrue > MTrue > True; V is negative w.r.t. P since, e.g., PTrue < VPTrue < True.

(iii) An important semantic property of hedges, called semantic heredity, is that hedges change the meaning of a term a little, but somewhat preserve the original meaning. Thus, if there are two terms hx and kx , where x ∈ X , such that hx ≤ kx , then all terms generated from hx using hedges are less than or equal to all terms generated from kx . This property is formulated by: (a) Definition 1 (Hedge algebra) (Nguyen and Wechler 1990) An abstract algebra X = (X , G, H , ≤), where X is a term domain, G is a set of primary terms, H is a set of linguistic hedges, and ≤ is an SOR on X , is called a hedge algebra (HA) if it satisfies the following:

(A1) Each hedge is either positive or negative w.r.t. the others, including itself; (A2) If terms u and v are independent, then, for all x ∈ H (u), we have x / ∈ H (v ). In addition, if u and v are incomparable, i.e., u < v and v < u, then so are x and y, for every x ∈ H (u) and y ∈ H (v );

(A3) If x = hx , then x / ∈ H (hx ), and if h = k and hx ≤ kx , then h ′ hx ≤ k ′ kx , for all h, k , h ′ , k ′ ∈ H and x ∈ X . Moreover, if hx = kx , then hx and kx are independent;

(A4

Axioms (A2)-(A4) are a weak formulation of the semantic heredity of hedges. Given a term u in X , the expression

The following proposition shows how to compare any two terms in X . The notation x u|j denotes the suffix of length j of a representation of x w.r.t. u, i.e., for

∈ H be an artificial hedge called the identity on X defined by the rule ∀x ∈ X , Ix = x .

Proposition 1 (Nguyen and Wechler 1992)

be two canonical representations of x and y w.r.t. u, respectively. Then, there exists the largest j ≤ min(m, n) + 1 (here, as a convention it should be understood that if j = min(m, n) + 1, then h j = I , for j = n + 1, and k j = I , for j = m + 1) such that ∀i < j , h i = k i , and (i) x = y iff n = m and h j x u|j = k j x u|j ;

(ii) x < y iff h j x u|j < k j x u|j ;

(iii) x and y are incomparable iff h j x u|j and k j x u|j are incomparable.

Since we allow hedges to be unary connectives in formulae, there is a need to be able to compute the truth value of a hedge-modified formula from that of the original.

To this end, the notion of an inverse mapping of a hedge is utilised. In order to define this notion, we restrict ourselves to linear HAs. The set of primary terms G usually consists of two comparable ones, denoted by c -< c + . For the variable Truth, we have c -= False < c + = True. Such HAs are called symmetric ones. For symmetric HAs, the set of hedges H can be divided into two disjoint subsets H + and H -defined as H + = {h|hc + > c + } and H -= {h|hc + < c + }. Two hedges h and k are said to be converse if ∀x ∈ X , hx ≤ x iff kx ≥ x , i.e., they are in different subsets; h and k are said to be compatible if ∀x ∈ X , hx ≤ x iff kx ≤ x , i.e., they are in the same subset.

Two hedges in each of sets H + and H -may be comparable, e.g., L and P , or incomparable, e.g., A and P . Thus, H + and H -become posets.

Definition 2 (Linear symmetric hedge algebra) A symmetric HA X = (X , G = {c -, c + }, H , ≤) is said to be a linear symmetric HA (lin-HA, for short) if the set of hedges H is divided into H + = {h|hc + > c + } and H -= {h|hc + < c + }, and H + and H -are linearly ordered.

Consider an HA X = (X , G = {c -, c + }, H = {V , M , P , L}, ≤). X is a lin-HA as follows. V and M are positive w.r.t. V , M , and L, and negative w.r.t. P ; P is positive w.r.t. P , and negative w.r.t. V , M , and L; L is positive w.r.t. P , and negative w.r.t. V , M , and L. H is decomposed into H + = {V , M } and H -= {P , L}. Moreover, in H + , we have M < V , and in H -, we have P < L. Definition 3 (Sign function) (Nguyen and Wechler 1990) A function Sign : X → {-1, 0, +1} is a mapping defined recursively as follows, where h, h ′ ∈ H and c ∈ {c -, c + }:

Based on the function Sign, we have a criterion to compare hx and x as follows:

Proposition 2 (Nguyen and Wechler 1990) For any h and x , if Sign(hx ) = +1, then hx > x , and if Sign(hx ) = -1, then hx < x .

In Nguyen and Wechler (1992), HAs are extended by augmenting two artificial hedges Φ and Σ defined as Φ(x ) = infimum(H (x )) and Σ(x ) = supremum(H (x )), for all x ∈ X . An HA is said to be free if ∀x ∈ X and ∀h ∈ H , hx = x . It is shown that, for a free lin-HA of the variable Truth with H = ∅, Φ(c + ) = Σ(c -), Σ(c + ) = 1 (AbsolutelyTrue), and Φ(c -) = 0 (AbsolutelyFalse). Let us put W = Φ(c + ) = Σ(c -) (called the middle truth value); we have 0 < c -< W < c + < 1.

Definition 4 (Linguistic truth domain)

A linguistic truth domain X taken from a lin-HA X = (X , {c -, c + }, H , ≤) is defined as X = X ∪{0, W , 1}, where 0, W , and 1 are the least, the neutral, and the greatest elements of X , respectively.

Proposition 3 (Nguyen and Wechler 1992) For any lin-HA X = (X , G, H , ≤), the linguistic truth domain X is linearly ordered.

The usual operations are defined on X as follows: (i) negation: given x = σc, where σ ∈ H * and c ∈ {c + , c -}, y is called the negation of x , denoted by y = -x , if y = σc ′ and {c, c ′ } = {c + , c -}. For example, hc + is the negation of hc -. In particular, -1 = 0, -0 = 1, and

Proposition 4 (Nguyen and Wechler 1992) For any lin-HA X = (X , G, H , ≤), the following hold: It is straightforward to show the following:

Proposition 5 For all h, k ∈ H ∪ {I }, if h < e k , then hc + < kc + .

In fuzzy logic, knowledge is usually represented in terms of pairs consisting of a vague sentence and its degree of truth, which is also expressed in linguistic terms.

A vague sentence can be represented by an expression u(x ), where x is a variable or a constant, and u is a fuzzy predicate. For example, the assertion “It is quite true that John is studying hard” can be represented by a pair (study hard (john), QuiteTrue).

According to Zadeh (1979;1975a), the following assessments can be considered to be approximately semantically equivalent: “It is very true that Lucia is young” and “It is true that Lucia is very young”. That means if we have (young(lucia), VeryTrue), we also have (Very young(lucia), True). Thus, the hedge “Very” can be moved from the truth value to the fuzzy predicate. This is generalised to the following rule: (R1) (u(x ), hTrue) ⇒ (hu(x ), True) However, the rule is not complete, i.e., in some cases we cannot use it to deduce the truth value of a hedge-modified fuzzy predicate from that of the original. For instance, given (young(lucia), VeryTrue), we cannot compute the truth value of Probably young(lucia) using the above rule. The notion of an inverse mapping of a hedge, which is an extension of Rule (R1), provides a solution to this problem.

The idea behind this notion is that the truth value of a hedge-modified fuzzy predicate can be a function of that of the original. In other words, if we modify a fuzzy predicate by a hedge, its truth value will be changed by the inverse mapping of that hedge. Now, we will work out the conditions that an inverse mapping of a hedge should satisfy. We denote the inverse mapping of a hedge h by h -. First, since h -is an extension of Rule (R1), we should have h -(hTrue) = True. Second, intuitively, the more true a fuzzy predicate is, the more true is its hedge-modified one, so h -should be monotone, i.e., if x ≥ y, then h

Third, it seems to be natural that by modifying a fuzzy predicate using a hedge in H + such as Very or More, we accentuate the fuzzy predicate, so the truth value should decrease. For example, the truth value of Very young(lucia) should be less than that of young(lucia). Similarly, by applying a hedge in H -such as Probably or Little, we deaccentuate the fuzzy predicate; thus, the truth value should increase. For example, the truth value of Probably high income(tom) should be greater than that of high income(tom). This is also in accordance with the fuzzyset-based interpretation of hedges (Zadeh 1972), in which hedges such as Very are called accentuators and can be defined as Very x = x 1+α , where x is a fuzzy predicate expressed by a fuzzy set and α > 0, and hedges such as Probably are called deaccentuators and can be defined as Probably x = x 1-α (note that the degree of membership of each element in x is in [0,1]). In summary, this can be formulated as: for all h, k ∈ H ∪ {I } such that h ≤ e k and for all x , we should have

As a convention, we always assume that for all x , I -(x ) = x . Definition 6 (An inverse mapping of a hedge) Given a lin-HA X = (X , {c + , c -}, H , ≤) and a hedge h ∈ H , a mapping h -: X → X is called an inverse mapping of h iff it satisfies the following conditions:

where k -is an inverse mapping of another hedge k ∈ H ∪ {I }.

Since 0, W, and 1 are fixed points, i.e., ∀x ∈ {0, W , 1} and ∀h ∈ H , hx = x (Nguyen and Wechler 1992), it is reasonable to assume that ∀h ∈ H , h

We show why we have to use lin-HAs in order to define the notion of an inverse mapping of a hedge. Consider an HA containing two incomparable hedges P (Probably), A (Approximately) ∈ H -. We can see that since Ac + and Pc + are incomparable, P -(Ac + ) and P -(Pc + ) = c + should be either incomparable or equal. The two values cannot be incomparable since every truth value is comparable to c + and c -, and it might not be very meaningful to keep both P and A in the set of hedges if we have

Inverse mappings of hedges always exist; in the following, we give an example of inverse mappings of hedges for a general lin-HA.

First, we build inverse mappings of hedges h - r (x ), for all x ∈ H (c + ), as follows:

(ii) x = σh s c + , where σ ∈ H * and h s = I , i.e., s = 0. If r = s, we put

For a certain hedge k , Sign(h p kc + ) can be either -1 or +1 . If Sign(h p kc + ) = +1, by Proposition 2, we have kc + < h p kc + . Thus, it follows that h

In summary, the ordering of the elements in the set {h t kc + : -q ≤ t ≤ p} can have one of the two above reverse directions. Therefore, for a pair (s, sr ), there are two cases:

(a) The orderings of the elements in the sets {h t h s c + : -q ≤ t ≤ p} and {h t h s-r c + : -q ≤ t ≤ p} have the same direction, i.e., we have h

It can be seen that what we have done here is to make inverse mappings of hedges monotone.

In particular, if r = 0, then s = sr . Thus, (b) is not the case, and by (a), we have h - 0 (σh s c + ) = σh s c + ; this complies with the assumption I -(x ) = x , for all x . Second, for x ∈ H (c -), we define h - r (x ) based on the above case as follows. Note that from x ∈ H (c -), we have

It has been shown in the above example that the inverse mappings satisfy Condition (1). In the following, we prove that they also satisfy Conditions ( 2) and (3).

The mappings defined above satisfy Condition (3), i.e., h

First, we prove the case x ∈ H (c + ). The case x = c + has been shown to satisfy Condition (3) in Example 3. Consider the case x = σh s c + , where s = 0. From r 1 < r 2 we have sr 1 > sr 2 . The case sr 2 < -q, i.e., h - r2 (σh

Second, consider the case x ∈ H (c -). Since -x ∈ H (c + ), from the above case, we have, for all t , h -

The mappings defined above satisfy Condition (2

y), for some r . First, we prove the case x , y ∈ H (c + ). There are three possible cases:

(1) x = c + and y = σh t c + , where

(2) y = c + and x = σh t c + , where t > 0. The proof is similar to that of (1).

(3) x = σh t c + and y = δh s c + , where

There are two cases:

where if m = 0, then σ 1 is empty, and if n = 0, then δ 1 is empty. There are two cases:

(

We prove the case m > n, and the case m < n can be proved similarly. Since m > n and h m h s-r c + < h n h s-r c + , we can see that the values h z h s-r c + , where z = p, p -1, • • •, -q, are increasing while the index z is decreasing. Thus, for all z ,

we have m = n = 0 (as a convention, all hedges appearing before h 0 = I in a representation of a value have no effect). There are two cases: either h m h s c + > h s c + or h m h s c + < h s c + . We prove the case h m h s c + > h s c + , and the other can be proved similarly. Since h m h s c + > h s c + , by Proposition 2, Sign(h m h s c + ) = +1. There are two cases:

(3.2.2.1)

In the present work, we only deal with finite linguistic truth domains. The rationale for this is as follows.

First, in daily life, humans only use linguistic terms with a limited length. This is due to the fact that it is difficult to distinguish the different meaning of terms with many hedges such as Very Little Probably True and More Little Probably True. Hence, we can assume that applying any hedge to truth values that have a certain number l of hedges will not change their meaning. In other words, canonical representations of all terms w.r.t. primary terms have a length of at most l + 1.

Second, according to Zadeh (1975b), in most applications to approximate reasoning, a small finite set of fuzzy truth values would, in general, be sufficient since each fuzzy truth value represents a fuzzy set rather than a single element of [0,1].

Third, more importantly, it is reasonable for us to consider only finitely many truth values in order to provide a logical system that can be implemented for computers. In fact, we later show that with a finite truth domain, we can obtain the Least Herbrand model for a finite program after a finite number of iterations of an immediate consequences operator.

Definition 7 (l-limited HA) An l-limited HA, where l is a positive integer, is a lin-HA in which canonical representations of all terms w.r.t. primary terms have a length of at most l + 1.

For an l-limited HA X = (X , G, H , ≤), since the set of hedges H is finite, so is the linguistic truth domain X .

In the following, we give a particular example of inverse mappings of hedges for a 2-limited HA.

Consider a 2-limited HA X = (X , {c + , c -}, {V , M , P , L}, ≤) with L < e P < e I < e M < e V . We have a linguistic truth domain

Based on the inverse mappings defined in Example 3, we can build the inverse mappings for this 2-limited HA with some modifications. Since we are working with the 2-limited HA, if h

the minimum value of H (c -). Changes are also made to the inverse mappings of hedges with a value in {c -, c + }. This means that inverse mappings of hedges are not unique. This is acceptable since reasoning based on fuzzy Table 1. Inverse mappings of hedges

a k is any of the hedges, including the identity I .

logic is approximate, and inverse mappings of hedges should be built according to applications.

Inverse mappings of hedges for the 2-limited HA are shown in Table 1, in which the value of an inverse mapping of a hedge h -, appearing in the first row, of a value x , appearing in the first column, is in the corresponding cell. For example, M -(PPc + ) = MLc + . Note that the values of x appear in an ascending order.

Our logic is truth-functional, i.e., the truth value of a compound formula, built from its components using a logical connective, is a function, which is called the truth function of the connective, of the truth values of the components.

Our procedural semantics is developed based on many-valued modus ponens. In order to guarantee the soundness of many-valued modus ponens, the truth function of an implication, called an implicator, must be residual to the t-norm, a commutative and associative binary operation on the truth domain, evaluating many-valued modus ponens (Hájek 1998). The many-valued modus ponens syntactically looks like:

Its soundness semantically states that whenever f is an interpretation such that f (B ) ≥ b, i.e., f is a model of (B , b), and

, where ← • is an implicator, and C is a t-norm. This means the truth value of A under any model of (B , b) and (A ← B , r ) is at least C(b, r ). More precisely, let r be a lower bound to the truth value of the implication h ← b, let C be a t-norm, and let ← • be its residual implicator; we have:

According to Hájek (1998), from (4), we have:

Note that t-norms are not necessary to be a truth function of any conjunction in our language.

Recall that in many-valued logics, there are several prominent sets of connectives called Lukasiewicz, Gödel, and product logic ones. Each of the sets has a pair of residual t-norm and implicator. Since our truth values are linguistic, we cannot use the product logic connectives.

Given a linguistic truth domain X , since all the values in X are linearly ordered, we assume that they are v 0 ≤ v 1 ≤ • • • ≤ v n , where v 0 = 0 and v n = 1. The Lukasiewicz t-norm and implicator can be defined on X as follows:

and those of Gödel can be:

Clearly, each of the implicators is the residuum of the corresponding t-norm. It can also be seen that t-norms are monotone in all arguments, and implicators are non-decreasing in the first argument and non-increasing in the second.

4 Fuzzy linguistic logic programming

Like Vojtáš (2001), our language is a many sorted (typed) predicate language. Let A denote the set of all attributes. For each sort of variables A ∈ A, there is a set C A of constant symbols, which are names of elements of the domain of A. In order to achieve the Least Herbrand model after a finite number of iterations of an immediate consequences operator, we do not allow any function symbols. This is not a severe restriction since in many database applications, there are no function symbols involved.

Connectives can be: conjunctions ∧ (also called Gödel) and ∧ L ( Lukasiewicz); the disjunction ∨; implications ← L ( Lukasiewicz) and ← G (Gödel); and linguistic hedges as unary connectives. For any connective c different from hedges, its truth function is denoted by c • , and for a hedge connective h, its truth function is its inverse mapping h -. The only quantifier allowed is the universal quantifier ∀.

A term is either a constant or a variable. An atom or atomic formula is of the form p(t 1 , • • •, t n ), where p is an n-ary predicate symbol, and

A body formula is defined inductively as follows: (i) An atom is a body formula. (ii) If B 1 and B 2 are body formulae, then so are ∧(B 1 , B 2 ), ∨(B 1 , B 2 ), and hB 1 , where h is a hedge. Here, we use the prefix notation for connectives in body formulae.

A rule is a graded implication (A ← B •r ), where A is an atom called rule head, B is a body formula called rule body, and r is a truth value different from 0. (A ← B ) is called the logical part of the rule.

A fact is a graded atom (A • b), where A is an atom called the logical part of the fact, and b is a truth value different from 0.

Definition 8 (Fuzzy linguistic logic program) A fuzzy linguistic logic program (program, for short) is a finite set of rules and facts, where truth values are from the linguistic truth domain of an l -limited HA, hedges used in body formulae (if any) belong to the set of hedges of the HA, and there are no two rules (facts) having the same logical part, but different truth values.

We follow Prolog conventions where predicate symbols and constants begin with a lower-case letter, and variables begin with a capital letter.

Example 5 Assume we use the truth domain from the 2-limited HA in Example 4, that is, X = (X , {False, True}, {V , M , P , L}, ≤), and we have the following knowledge base:

(i) The sentence “If a student studies very hard, and his/her university is probably high-ranking, then he/she will be a good employee” is Very More True.

(ii) The sentence “The university where Ann is studying is high-ranking” is Very True.

(iii) The sentence “Ann is studying hard” is More True.

Let gd em, st hd, hira un, and T stand for “good employee”, “study hard”, “high-ranking university”, and “True”, respectively. Then, the knowledge base can be represented by the following program:

Note that the predicates st hd (X ) and hira un(X ) in the only rule are modified by the hedges V and P , respectively.

We assume as usual that the underlying language of a program P is defined by constants (if no such constant exists, we add some constant such as a to form ground terms) and predicate symbols appearing in P . With this understanding, we can now refer to the Herbrand universe of sort A, which consists of all ground terms of A, by U A P , and to the Herbrand base of P , which consists of all ground atoms, by B P (Lloyd 1987).

A program P can be represented as a partial mapping:

where the domain of P , denoted by dom(P ), is finite and consists only of logical parts of rules and facts, and X is a linguistic truth domain. The truth value of a rule (A ← B • r ) is r = P (A ← B ), and that of a fact (A • b) is b = P (A). Since in our logical system we only want to obtain the computed answers for queries, we do not look for 1-tautologies to extend the capabilities of the system although we can have some due to the fact that our connectives are classical manyvalued ones (see Hájek (1998)).

Since we are working with logic programs without negation, it is reasonable to consider only fuzzy Herbrand interpretations and models. Given a program P , let X be the linguistic truth domain; a fuzzy linguistic Herbrand interpretation (interpretation, for short) f is a mapping f : B P → X . The ordering ≤ in X can be extended to the set of interpretations as follows. We say

for all ground atoms A. Clearly, the set of all interpretations of a program is a complete lattice under ⊑. The least interpretation called the bottom interpretation, denoted by ⊥, maps every ground atom to 0.

An interpretation f can be extended to all ground formulae, denoted by f , using the unique homomorphic extension as follows:

, where B 1 , B 2 are ground formulae, and c is a binary connective; (iii) f (hB ) = h -(f (B )), where B is a ground body formula, and h is a hedge.

For non-ground formulae, since all the formulae in the language are considered universally quantified, the interpretation f is defined as

where ∀ϕ means universal quantification of all variables with free occurrence in ϕ.

An interpretation f is a model of a program P if for all formulae ϕ ∈ dom(P ), we have f (ϕ) ≥ P (ϕ). Therefore, P (ϕ) is understood as a lower bound to the truth value of ϕ.

A query is an atom used as a question ?A prompting the system.

Definition 9 (Correct answer ) Given a program P , let X be the linguistic truth domain. A pair (x ; θ), where x ∈ X , and θ is a substitution, is called a correct answer for P and a query ?A if for any model f of P , we have f (Aθ) ≥ x .

Given a program P and a query ?A, we want to compute a lower bound for the truth value of A under any model of P . Recall that in the theory of many-valued modus ponens (Hájek 1998)

As in Vojtáš (2001), our procedural semantics utilises admissible rules.

Admissible rules act on tuples of words in the alphabet, denoted by L e P , which is the disjoint union of the alphabet of the language of dom(P ) augmented by the truth functions of the connectives (except ← i and ← • i ) and symbols C i , and the linguistic truth domain.

Definition 10 (Admissible rules) Admissible rules are defined as follows: Rule 1. From ((XA m Y ); ϑ) infer ((X C(B , r )Y )θ; ϑθ) if 1. A m is an atom (called the selected atom) 2. θ is an mgu of A m and A 3. (A ← B • r ) is a rule in the program.

Rule 2. From (XA m Y ) infer (X 0Y ). This rule is usually used for situations where A m does not unify with any rule head or logical part of facts in the program. Rule 3. From (XhBY ) infer (Xh -(B )Y ) if B is a non-empty body formula, and h is a hedge. Rule 4. From ((XA m Y ); ϑ) infer ((XrY )θ; ϑθ) if 1. A m is an atom (also called the selected atom) 2. θ is an mgu of A m and A 3. (A • r ) is a fact in the program.

Rule 5. If there are no more predicate symbols in the word, replace all connectives ∧’s, and ∨’s with ∧ • , and ∨ • , respectively. Then, since this word contains only some additional C’s, h -’s, and truth values, evaluate it. The substitution remains unchanged.

Note that our rules except Rule 3 are the same as those in Vojtáš (2001).

Definition 11 (Computed answer ) Let P be a program and ?A a query. A pair (r ; θ), where r is a truth value, and θ is a substitution, is said to be a computed answer for P and ?A if there is a sequence G 0 , • • •, G n such that 1. every G i is a pair consisting of a word in L e P and a substitution 2. G 0 = (A; id ) 3. every G i+1 is inferred from G i by one of the admissible rules (here we also utilise the usual Prolog renaming of variables along derivation) 4. G n = (r ; θ ′ ) and θ = θ ′ restricted to variables of A, and we say that the computation has a length of n.

We take the program in Example 5, that is:

Given a query ?gd em(ann), we can have the following computation (since the query is ground, the substitution in the computed answer is the identity):

?gd em(ann) C G (∧(V st hd (ann), P hira un(ann)), VMT ) C G (∧(V -(st hd (ann)), P hira un(ann)), VMT )

Using the inverse mappings of hedges in Table 1

Hence, the sentence “Ann will be a good employee” is at least Probably True. This result is reasonable as follows: one of the conditions constituting the result is the one saying that “The student studies very hard”; since “Ann is studying hard” is MT (More True), the truth value of “Ann is studying very hard” is V -(MT ); and since MT < VT , we have V -(MT ) < V -(VT ) = T , and V -(MT ) = PT is acceptable.

If we use the Lukasiewicz implication instead of the Gödel implication in the rule, then in the computation, the Gödel t-norm will be replaced by the Lukasiewicz tnorm, and, finally, we have an answer (gd em(ann) • MLT ).

From the definition of the procedural semantics, we can see that in order to increase the chances of finding a good computed answer which has a better truth value along a computation, we should do the following:

(i) If there is more than one rule or fact whose rule heads or logical parts can be unifiable with the selected atom, and of such rules or facts there is only one to which the highest truth value is assigned, then we choose it for the next step.

(ii) If there is one fact among such rules or facts which are associated with the highest truth value, then we choose the fact for the next step since the t-norm evaluating such a rule always yields a lower truth value than that of the fact.

(iii) If there is more than one such a rule, but no facts, which have the highest truth value, then we choose the one with the Gödel implication for the next step since in this case, the Gödel t-norm usually, but not always (since it also depends on the bodies of the rules), yields a better truth value than the Lukasiewicz t-norm. In Example 6, it has been shown that with the same body formula, the rule with the Gödel implication yields a better result (PT ) than the rule with the Lukasiewicz implication (MLT ).

Theorem 1 Every computed answer for a program P and a query ?A is a correct answer for P and ?A.

Assume that a pair (r ; θ) is a computed answer for P and ?A. Let f be any model of P ; we will prove that f (Aθ) ≥ r .

The proof is by induction on length n of computations. First, suppose that n = 1. Hence, either Rule 2 or Rule 4 has been applied. The case of Rule 2 is obvious since r = 0. The case of Rule 4 implies that P has a fact

Next, suppose that the result holds for computed answers coming from computations of length ≤ k -1, where k > 1. We prove that it also holds for a computation of length k .

Assume that the sequence of the substitutions in the computation is θ 1 , • • •, θ k (some of them are the identity), where θ = θ 1 • • • θ k restricted to variables of A. Since the length of the computation k > 1, the first admissible rule to be applied is Rule 1. This means there exists a rule (C ← i B • c) in P such that Aθ 1 = C θ 1 . For each atom D in the rule body B θ 1 , there exists a computation of length ≤ k -1 for it. Suppose d is the computed truth value for D in that computation; by the induction hypothesis, we have d ≤ f (D θ 2 • • • θ k ). Furthermore, since the truth functions of the conjunctions, the disjunction, and inverse mappings of hedges are non-decreasing in all their arguments, if b is the computed truth value for the whole rule body B θ 1 , which is calculated from all the d for each atom D using the truth functions of the connectives, then b ≤ f (B θ 1 θ 2 • • • θ k ). Therefore, we have:

, where (*) holds since f is a model of P , and (**) follows from (5).

Similar to Krajči et al. (2004), the immediate consequences operator, introduced by van Emden and Kowalski, can be generalised to the case of fuzzy linguistic logic programming as follows.

Definition 12 (Immediate consequences operator ) Let P be a program. The operator T P mapping from interpretations to interpretations is defined as follows. For every interpretation f and every ground atom

Since P is function-free, each Herbrand universe U A P of a sort A is finite, and so is its Herbrand base B P . Hence, for each A ∈ B P , there are a finite number of ground instances of rule heads and logical parts of facts which match A. Therefore, the suprema in the definition of T P are in fact maxima.

Similar to Medina et al. (2004), we have the following results.

The operator T P is monotone.

Let f 1 and f 2 be two interpretations such that f 1 ⊑ f 2 ; we prove that T P (f 1 ) ⊑ T P (f 2 ). First, let us prove f 1 (B ) ≤ f 2 (B ) for all ground body formulae B by induction on the structure of the formulae. In the base case where B is a ground atom, we have

. For the inductive case, consider a ground body formula B . By case analysis and the induction hypothesis, we have

Now, let A be any ground atom. If A does not unify with any rule head or logical part of facts in P , then T P (f 1 )(A) = T P (f 2 )(A) = 0. Otherwise, since the value of the second sup in Definition 12 does not depend on the interpretations, what we need to consider now is the first sup. For any ground instance (A ← i B • r ) of a rule in P , since B is ground, we have C i (f 1 (B ), r ) ≤ C i (f 2 (B ), r ). By taking suprema for all ground instances (A ← i B • r ) on both sides, we have sup{C i (f 1 (B ), r )} ≤ sup{C i (f 2 (B ), r )}. Therefore, T P (f 1 )(A) ≤ T P (f 2 )(A) for all ground atoms A.

The operator T P is continuous.

Recall that a mapping f : L → L, where L is a complete lattice, is said to be continuous if for every directed subset X of L, f (sup(X )) = sup{f (x )|x ∈ X }.

Let us prove that for each directed set X of interpretations, T P (sup(X )) = sup{T P (f )|f ∈ X }.

Since T P is monotone, we have sup{T P (f )|f ∈ X } ⊑ T P (sup(X )). On the other hand, since the Herbrand base B P and the truth domain are finite, the set of all Herbrand interpretations of P is finite. Therefore, for each finite directed set X of interpretations, we have an upper bound of X in X . This, together with the monotonicity of T P , leads to T P (sup(X ))

First, assume that f is a model of P ; we prove that T P (f ) ⊑ f .

Let A be any ground atom. Consider the following cases: (i) If A is neither a ground instance of a logical part of facts nor a ground instance of a rule head in P , then (iii) For each ground instance (A ← i B • r ) of a rule, say (C • r ), in P , we have:

, where (*) holds since (A ← i B ) is a ground instance of C , and (**) follows from (5). Therefore,

Thus, by definition, T P (f )(A) ≤ f (A) for all A ∈ B P . Finally, let us show that if T P (f ) ⊑ f , then f is a model of P . Let C be any formula in dom(P ). There are two cases:

where c is a truth value, is a fact in P . For each ground instance A of C , by hypothesis and definition, we have

, where (*) holds since ← • i is non-decreasing in the first argument, and (**) follows from (6). Consequently,

Since the given immediate consequences operator T P satisfies Theorem 3 and Theorem 4, and the set of Herbrand interpretations of the program P is a complete lattice under the relation ⊑, due to Knaster and Tarski (Tarski 1955), the Least Herbrand model of the program P is exactly the least fixpoint of T P and can be obtained by iterating T P from the bottom interpretation ⊥ after ω iterations, where ω is the smallest limit ordinal (apart from 0). Furthermore, since the truth domain X and the Herbrand base B P are finite, the least model of P can be obtained after at most O(|P ||X |) steps, where |A| denotes the cardinality of the set A. This is an important tool for dealing with recursive programs, for which computations can be infinite.

The following theorem shows that T n P (⊥) in fact builds computed answers for ground atoms.

Let P be a program and A a ground atom. For all n, there exists a computation for P and the query ?A such that the computed answer is (T n P (⊥)(A); id ).

Note that since A is ground, the substitutions in all computed answers are always the identity. We prove the result by induction on n. Suppose first that n = 0. Since T 0 P (⊥)(A) = 0, there is a computation for P and ?A in which only Rule 2 is applied with the computed answer (0; id ). Now suppose that the result holds for n -1, where n ≥ 1; we prove that it also holds for n. There are two cases:

(i) A does not unify with any rule head or logical part of facts in P . Then, T n P (⊥)(A) = 0, and the computation is the same as the case n = 0. (ii) Otherwise, since the suprema in the definition of T P are in fact maxima, there exists either a ground instance (A • b) of a fact in P such that

For the former case, there is a computation for P and ?A in which only Rule 1 is applied, and the computed answer is (b; id ). For the latter, by the induction hypothesis, for each ground atom B j in B , there exists a computation such that T n-1 P (⊥)(B j ) is the computed truth value for B j . Therefore, the computed truth value of the whole body B is T n-1 P (⊥)(B ), calculated from all T n-1 P (⊥)(B j ) along the complexity of B using the truth functions of the connectives. Clearly, there is a computation for P and ?A in which the first rule to be applied is Rule 1 carried out on the rule in P which has (A ← i B • r ) as its ground instance, and the rest is a combination of the computations of each B j in B . It is clear that the computed truth value for ?A in this computation is T n P (⊥)(A).

The completeness result for the case of ground queries is shown as follows.

For every correct answer (x ; id ) of a program P and a ground query ?A, there exists a computed answer (r ; id ) for P and ?A such that r ≥ x .

Since (x ; id ) is a correct answer of P and ?A, for every model f of P , we have f (A) ≥ x . In particular, let M P be the Least Herbrand model of P ; M P (A) =

Since w is a finite number, the sup operator is in fact a maximum. Hence, there exists n < w such that T n P (⊥)(A) = T w P (⊥)(A). By Theorem 5, there exists a computation for P and ?A such that the computed answer is (T n P (⊥)(A); id ); thus, the theorem is proved.

The completeness for the case of non-ground queries can be obtained by employing some extended versions of Mgu lemma and Lifting lemma (Lloyd 1987) as follows.

We define several more notions. Consider a computation of length n for a program P and a query ?A; we call each G i , i = 0 • • • (n -1), in the sequence of the computation an intermediate query, and the part of the computation from G to G n an intermediate computation of length ni. Thus, a computation is a special intermediate computation with i = 0. Similar to Lloyd (1987), we define an unrestricted computation (an unrestricted intermediate computation) as a computation (an intermediate computation) in which the substitutions θ i in each step are not necessary to be most general unifiers (mgu), but only required to be unifiers.

In the following proofs, since it is clear for which program a computed answer is, we may omit the program and state that the computed answer is for the (intermediate) query, or the query has the computed answer. The same convention is applied to (unrestricted) (intermediate) computations and correct answers.

Lemma 1 (Mgu Lemma) Let P be a program and G i an intermediate query. Suppose that there is an unrestricted intermediate computation for P and G i . Then, there exists an intermediate computation for P and G i with the same computed truth value and length such that, if θ i+1 , •••, θ n are the unifiers from the unrestricted intermediate computation, and θ ′ i+1 , • • •, θ ′ n are the mgu’s from the intermediate computation, then there exits a substitution γ such that

The proof is by induction on the length of the unrestricted intermediate computation. Suppose first that the length is 1, i.e., n = i + 1. Since if either Rule 2 or Rule 5 is applied, the unifier is the identity (an mgu), and Rule 1 and Rule 3 cannot be the last rule to be applied in an unrestricted intermediate computation, the rule to be applied here is Rule 4. Since Rule 4 is the last rule to be applied in the unrestricted intermediate computation, it can be shown that the unrestricted intermediate computation is also an unrestricted computation of length 1. This means i = 0. Suppose that G 0 = (A m ; id ), where A m is an atom. Then, there exists a fact (A • b) in P such that θ 1 is a unifier of A m and A, and b is the computed truth value. Assume that θ ′ 1 is an mgu of A m and A. Then, θ 1 = θ ′ 1 γ for some γ. Clearly, there is a computation for P and ?A m carried out on the same fact (A • b) with length 1, the computed truth value b, and the mgu θ ′ 1 . Now suppose that the result holds for length ≤ k -1, where k ≥ 2; we prove that it also holds for length k . Assume that there is an unrestricted intermediate computation for P and G i of length k with the sequence of unifiers θ i+1 , • • •, θ n , where n = i + k . Consider the transition from G i to G i+1 . Since k ≥ 2, it cannot be an application of Rule 5 and thus is one of the following cases:

(i) Either Rule 2 or Rule 3 is applied. Then, θ i+1 = id . By the induction hypothesis, there exists an intermediate computation for P and

for some γ. Thus, there is an intermediate computation for P and

Either Rule 1 or Rule 4 is applied. Hence, θ i+1 is a unifier for the selected atom A in G i and an atom A ′ , which is either a rule head (if Rule 1 is applied) or a logical part of a fact (if Rule 4 is applied) in P . There exists an mgu θ ′ i+1 for A and A ′ such that θ i+1 = θ ′ i+1 ϑ for some ϑ. Therefore, if we use θ ′ i+1 instead of θ i+1 in the transition, we will obtain an intermediate query

i+1 are all obtained from G i by replacing A with the same expression, then applying θ i+1 or θ ′ i+1 , respectively. Now consider the transitions from G i+1 to G n-1 . Since they cannot be an application of Rule 5, there are two possible cases:

(a) All the transitions use only Rule 2 or Rule 3. Thus, all the unifiers are the identity. If we apply the same rule on the corresponding atom (for the case of Rule 2) or on the corresponding body formula (for the case of Rule 3) for each transition from the intermediate query G ′ i+1 , we will obtain a sequence

, and it can be shown that for all i + 1 ≤ l ≤ n -1, G l = G ′ l ϑ. Since the last transition from G n-1 to G n uses Rule 5, G n-1 does not have any predicate symbols, and neither does G ′ n-1 . Thus, they are identical. As a result, such that for all i + 1 ≤ l ≤ m, G l = G ′ l ϑ. Now we will prove the result for the case that Rule 1 is applied in the transition from G m to G m+1 , and the case for Rule 4 can be proved similarly. The application of Rule 1 in the transition implies that there exists a rule (A ′′ ← j B • r ) in P such that θ m+1 is a unifier of the selected atom A m in G m and A ′′ . Since we utilise the usual Prolog renaming of variables along derivation, we can assume that ϑ does not act on any variables of A ′′ or B . Suppose that A ′ m is the corresponding selected atom in G ′ m , we have A m = A ′ m ϑ. Therefore, ϑθ m+1 is a unifier for A ′ m and A ′′ since A ′ m ϑθ m+1 = A m θ m+1 = A ′′ θ m+1 = A ′′ ϑθ m+1 . Now applying Rule 1 to G ′ m on the selected atom A ′ m and the rule (A ′′ ← j B • r ) with the unifier ϑθ m+1 , we obtain an intermediate query

is a correct answer for P and ?A, by Lemma 3, there exists a computation for P and the query ?Aθ with a computed answer (r ; id ) such that r ≥ x . Suppose the sequence of mgu’s in the computation is

By the lifting lemma, there exists a computation for P and ?A with the same computed truth value r and mgu’s

n restricted to the variables in A. Then θ = σγ, where γ is an appropriate restriction of γ ′ .

Clearly, the proofs of Mgu and Lifting lemmas here can be similarly applied to fuzzy logic programming and the frameworks of logic programming developed based on it such as multi-adjoint logic programming (see, e.g., Medina et al. (2004)).

Example 7 Assume that we use the truth domain from the 2-limited HA in Example 4, that is, X = (X , {False, True}, {V , M , P , L}, ≤), and have the following knowledge base:

(i) The sentence “A hotel is convenient for a business trip if it is very near to the business location, has a reasonable cost at the time, and is a fine building” is Very True.

(ii) The sentence “A hotel has a reasonable cost if either its dinner cost or its hotel rate at the time is reasonable” is Very True.

(iii) The sentence “Causeway hotel is near Midtown Plaza” is Little More True.

(iv ) The sentence “Causeway hotel is a fine building” is Probably More True.

(v ) The sentence “Causeway hotel has a reasonable dinner cost in November” is Very More True.

(vi) The sentence “Causeway hotel has a reasonable hotel rate in November” is Little Probably True.

Let cn ht, ne to, re co, fn bd, re di, re rt, Bu lo, mt, cw and T stand for “convenient hotel”, “near to”, “reasonable cost”, “fine building”, “reasonable dinner cost”, “reasonable hotel rate”, “business location”, “Midtown Plaza”, “Causeway hotel”, and “True”, respectively. Then, the knowledge base can be represented by the following program: Note that although the conjunctions and disjunction are binary connectives, they can be easily extended to have any arity greater than 2.

Given a query ?cn ht (mt , nov , cw ), we can have the following computation (the substitution in the computed answer is the identity):

?cn ht (mt , nov , cw ) C G (∧(V ne to(mt , cw ), re co(cw , nov ), fn bd (cw )), VT )

Using the inverse mappings of hedges in Table 1

Thus, the computed answer is (LPT ; id ), and the sentence “Causeway hotel is convenient for a business trip to Midtown Plaza in November” is at least Little Probably True.

Now, if we want to relax the first condition in the sentence (i), we can replace the phrase “very near to” by a phrase “probably near to”. Then, similarly, we can have a similar program and the following computation: ?cn ht (mt , nov , cw ) C G (∧(P ne to(mt , cw ), re co(cw , nov ), fn bd (cw )), VT )

Using the inverse mappings in Table 1, we have a computed answer (PMT ; id ).

Similarly, if we remove the hedge for the first condition in the sentence (i), we can have a similar program and the following computation:

Thus, we have a computed answer (LMT ; id ).

It can be seen that with the same hotel (Causeway), the time (November), and the business location (Midtown Plaza), by similar computations, if we put a higher requirement for the condition “near to”, we obtain a lower truth value. More precisely, with the conditions “very near to”, “near to”, and “probably near to”, we obtain the truth values LPT , LMT , and PMT , respectively, and LPT < LMT < PMT . This is reasonable and in accordance with common sense.

Information stored in databases is not always precise. Basically, two important issues in research in this field are representation of uncertain information in a database and provision of more flexibility in the information retrieval process, notably via inclusion of linguistic terms in queries. Also, the relationship between deductive databases and logic programming has been well established. Therefore, fuzzy linguistic logic programming (FLLP) can provide a tool for constructing fuzzy linguistic databases equipped with flexible querying.

The model is an extension of Datalog (Ullman 1988) without negation and possibly with recursion, which is similar to that in Pokorný and Vojtáš (2001), called fuzzy linguistic Datalog (FLDL). It allows one to find answers to queries over a fuzzy linguistic database (FLDB) using a fuzzy linguistic knowledge base (FLKB). An FLDB is a (crisp) relational database in which an additional attribute is added to every relation to store a linguistic truth value for each tuple, and an FLKB is a fuzzy linguistic Datalog program (FLDL program). Here, we also work on safe rules, i.e., every variable appearing in the rule head of a rule also appears in the rule body. An FLDL program consists of finite safe rules and facts. Moreover, in an FLDL program, a fuzzy predicate is either an extensional database (EDB) predicate, the logical part of a fact, whose relation is stored in the database, or an intensional database (IDB) predicate which is defined by rules, but not both.

We can extend the monotone subset, consisting of selection, Cartesian product, equijoin, projection, and union, of relational algebra (Ullman 1988) for the case of our relations and create a new one called hedge modification. We call this collection of operations fuzzy linguistic relational algebra (FLRA).

Based on the operations, we can convert rules with the same IDB predicate in their heads to an expression of FLRA; the expression yields a relation for the predicate. Furthermore, it can be observed that the way the expression calculates the truth value of a tuple in the relation for the IDB predicate is the same as the way the immediate consequences operator T P does for the corresponding ground atom (Pokorný and Vojtáš 2001). Thus, similar to the classical case, the FLRA augmented by the immediate consequences operator is sufficient to evaluate recursive FLDL programs, and every query over an FLKB represented by an FLDL program can be exactly evaluated by finitely iterating the operations of FLRA from a set of relations for the EDB predicates.

This is the case when one is interested in looking for a computed answer to a query with a truth value not less than some threshold t .

Assume that at a certain point in a computation we need to find an answer to the selected atom A m with a threshold t m . Since C c (x , y) ≤ min(x , y), for c ∈ {L, G}, the selected rule or fact which will be used in the next step must have a truth value not less than t m . If there is no such rule or fact, we can cut the computation branch.

For the case that A m will be unified with the rule head of such a rule, the truth value of the whole body of the rule must not be less than t m+1 = inf {b|C(b, r ) ≥ t m }, where r is the truth value of the rule and r ≥ t m . If the implication used in the rule is the Gödel implication, then t m+1 = t m ; if it is the Lukasiewicz implication, then t m+1 = v n+k -j , where r = v j , t m = v k are two values in the truth domain X , and v n = 1. Since n ≥ j ≥ k , we have t m+1 ≥ t m , and if r < 1, we have t m+1 > t m .

Recall that a rule body can be built from its components using the conjunctions, the disjunction, and hedge connectives. Therefore, we have: (i) For the case of Gödel conjunction, t m+1 is the next threshold for each of its components, and if t m+1 > t m , for all m (this will happen if all the implications are Lukasiewicz, and all the truth values of rules are less than 1), we can estimate the depth of the search tree according to the threshold t and the highest truth value of rules. (ii) For the case of Lukasiewicz conjunction, if all the truth values of the facts in the program are less than 1 (thus the computed truth value of any component in any body formula is less than 1), the next threshold for each of the components is greater than t m+1 . Hence, similar to the above case, we can also work out the depth of the search tree. (iii) For the case of disjunction, one of the components of the rule body must have a computed truth value at least t m+1 . (iv ) Finally, the problem of finding a computed truth value for a hedge-modified formula hB with a threshold u can be reduced to that of B with a new threshold u ′ = inf {v |h -(v ) ≥ u}.

Control theory is aimed at determining a function f : X → Y whose intended meaning is that given an input value x , f (x ) is the correct value of control signal. A fuzzy approach to control employs an approximation of such a (ideal) function by a system of fuzzy IF-THEN rules of the form “IF x is A THEN y is B “, where A and B are labels of fuzzy subsets.

In the literature, there are several attempts to reduce fuzzy control to fuzzy logic in narrow sense. Gerla (2005;2001) proposed an interesting reduction in which a fuzzy IF-THEN rule “IF x is A THEN y is B " is translated into a fuzzy logic programming rule (good (x , y) ← A(x )∧B (y)•λ), where A and B are now considered as fuzzy predicates. The truth value λ is understood as the degree of confidence of the experts in such a rule, and by default, λ = 1. The intended meaning of the new predicate good (x , y) is that given an input value x , y is a good value for the control variable. Therefore, the information carried by a system of fuzzy IF-THEN rules can be represented by a fuzzy logic program.

More precisely, a system of fuzzy IF-THEN rules:

can be associated with the following program P :

where r Ai is the degree of truth to which an input value r satisfies a predicate A i , and t Bj is the degree of truth to which an output value t satisfies a predicate B j . Each element r ∈ X or t ∈ Y is considered as a constant. Thus, the language of P is a two-sorted predicate one, and we have two Herbrand universes U X P = X and U Y P = Y . Since the truth values of the rules are all equal to 1, Lukasiewicz and Gödel t-norms yield the same results in computations; therefore, without loss of generality we can use the same notation for the implications.

By iterating the T P operator from the bottom interpretation ⊥, we obtain the Least Herbrand model M P of P . In fact, it can be shown that M P = T 2 P (⊥). Let us put G(r , t ) = M P (good (r , t )). Indeed, G(r , t ) can be interpreted as the degree of preference on the output value t ∈ Y , given the input value r ∈ X . Therefore, the purpose of the program P is not to compute the ideal function f : X → Y , but to define a fuzzy predicate good expressing a graded opinion on a possible control value t w.r.t. a given input value r . Clearly, given an input value r , it should be better to take a value t that maximises G(r , t ). Note that the value G(r , t ) is not a true value, but a lower bound to the truth value of good (r , t ). In other words, we can say that given r , t can be proved to be good at least at the level G(r , t ).

It is worth noticing that in fuzzy control, it is quite often that the labels of fuzzy subsets in a system of fuzzy IF-THEN rules, i.e., A i and B i in the system (7), are hedge-modified ones, e.g., Verylarge and Veryfast. Thus, our language can be used to represent the associated program in a very natural way since we allow using linguistic hedges to modify fuzzy predicates. Clearly, in such a program, all the facts (A i (r ) • r Ai ) and (B j (t ) • t Bj ) we need are only for primary predicates (predicates without hedge modification) such as large or fast, but not for all predicates as in the case of fuzzy logic programming.

In the literature, there has been research on multi-adjoint logic programming (MALP) (see, e.g., Medina et al. (2004)), which is an extension of fuzzy logic programming in which truth values can be elements of any complete bounded lattice instead of the unit interval. Also, there have been several attempts to implement systems where multi-adjoint logic programs can be executed. Due to the similarity between MALP and FLLP, the implementation of a system for executing fuzzy linguistic logic programs can be carried out based on the systems built for multi-adjoint ones. In the sequel, we sketch an idea for implementing such a system, which is inspired by the FLOPER (Fuzzy LOgic Programming Environment for Research) system described in Morcillo and Moreno (2008).

The main objective is to translate fuzzy linguistic logic programs into Prolog ones which can be safely executed inside any standard Prolog interpreter in a completely transparent way. We take the following program as an illustrative example:

(gd em(X ) ← G ∧ L (V st hd (X ), P hira un(X )) • VMT ) (hira un(ann) • VT ) (st hd (ann) • MT ) For simplicity, instead of computing with the truth values, we can compute with their indexes in the truth domain. Thus, the program can be coded as: During the parsing process, the system produces Prolog code as follows:

(i) Each atom appearing in a fuzzy rule is translated into a Prolog atom extended by an additional argument, a truth variable of the form TV i , which is intended to store the truth value obtained in the subsequent evaluation of the atom.

(ii) The truth functions of the binary connectives and the t-norms can be easily defined by standard Prolog clauses as follows: where n is the index of the truth value 1 in the truth domain (in Example 4, n = 44). Note that and godel is the t-norm C G as well as the truth function of the conjunction ∧ (∧ G ) while and luka is the t-norm C L and also the truth function of the conjunction ∧ L , and or godel is the truth function of the disjunction ∨.

Inverse mappings of hedges can be defined by listing all cases in the form of ground Prolog facts (except inverse mappings of 0, W , and 1). More precisely, the inverse mappings in Table 1 can be defined as follows: (iii) Each fuzzy rule is translated into a Prolog clause in which the calls to the atoms appearing in its body must be in an appropriate order. More precisely, the call to the atom corresponding to an operation must be after the calls to the atoms corresponding to its arguments in order for the truth variables to be correctly instantiated, and the last call must be to the atom corresponding to the t-norm evaluating the rule. For example, the rule in the previous program can be translated into the following Prolog clause: gd em(X , TV 0) :st hd (X , TV 1), inv map(v , TV 1, TV 2), hira un(X , TV 3), inv map(p, TV 3, TV 4), and luka( TV 2, TV 4, TV 5), and godel ( TV 5, 38, TV 0)• (iv ) Each fuzzy fact is translated into a Prolog fact in which the additional argument is just its truth value instead of a truth variable. For the above program, the two fuzzy facts are translated into two Prolog facts hira un(ann, 41) and st hd (ann, 36).

(v ) A query is translated into a Prolog goal that is an atom with an additional argument, a truth variable to store the computed truth value. For instance, the query ?gd em(X ) is translated into the Prolog goal: ?gd em(X , Truth value). Given the above program and the above query, a Prolog interpreter will return a computed answer [X = ann, Truth value = 29], i.e., we have (gd em(ann) • PPT ).

We have presented fuzzy linguistic logic programming as a result of integrating fuzzy logic programming and hedge algebras. The main aim of this work is to facilitate the representation and reasoning on knowledge expressed in natural languages, where vague sentences are often assessed by a degree of truth expressed in linguistic terms rather than in numbers, and linguistic hedges are usually used to indicate different levels of emphasis. It is well known that in order for a formalism to model such knowledge, it should address the twofold usage of linguistic hedges, i.e., in generating linguistic values and in modifying predicates. Hence, in this work we use linguistic truth values and allow linguistic hedges as predicate modifiers. More precisely, in a fuzzy linguistic logic program, each fact or rule is graded to a certain degree specified by a value in a linguistic truth domain taken from a hedge algebra of a truth variable, and hedges can be used as unary connectives in body formulae.

Besides the declarative semantics, a sound and complete procedural semantics which directly manipulates linguistic terms is provided to compute a lower bound to the truth value of a query. Thus, it can be regarded as a method of computing with words. A fixpoint semantics of logic programs is defined and provides an important tool to handle recursive programs, for which computations can be infinite.

It has been shown that knowledge bases expressed in natural languages can be represented by our language, and the theory has several applications such as a data model for fuzzy linguistic databases with flexible querying, threshold computation, and fuzzy control.

Finding more applications for the theory and implementing a system where fuzzy linguistic logic programs can be executed are directions for our future work.

Two terms u and v are said to be independent if u / ∈ H (v ) and v / ∈ H (u). For example, VTrue and PMTrue are independent, but VTrue and LVTrue are not since LVTrue ∈ H (VTrue).

📸 Image Gallery

cover.png

Reference

This content is AI-processed based on open access ArXiv data.

Start searching

Enter keywords to search articles

↑↓
ESC
⌘K Shortcut