Concept expressions:

C,C1, C2 --> *top* (top concept)
*bottom* (bottom concept)
A (atomic concept)
(and C1 C2) (concept conjunction)
(or C1 C2) (concept disjunction)
(not C) (concept negation)
(some R C) (existential role restriction)
(all R C) (universal role restriction)
(b-some R a) (individual value restriction, R role, a individual)
(CM C) (modifier name CM applied to a concept), modifiers are defined below
CFC (concept name CFC defined with explicit fuzzy membership function), see below
(w-sum (n1 C1) ... (nk Ck)) (weighted-sum concept, ni in [0,1], Ci concept, n1+ ..+nk=1, see below)
(l-and C1 C2) (concept conjunction according to Lukasiewicz T-norm)
(l-or C1 C2) (concept disjunction according to Lukasiewicz T-conorm)
(g-and C1 C2) (concept conjunction according to Gödel T-norm)
(g-or C1 C2) (concept disjunction according to Gödel T-conorm)
DR (datatype restriction), see below
(implies C1 C2) (concept implication), this is the concept "if C1 then C2"
(kd-implies C1 C2) (concept implication), this is the concept "if C1 then C2", where implication is Kleene-Dienes implication
(l-implies C1 C2) (concept implication), this is the concept "if C1 then C2", where implication is Lukasiewicz implication
(g-implies C1 C2) (concept implication), this is the concept "if C1 then C2", where implication is Gödel implication
(n C) (weighted concept, n in [0,1], C concept, see below)
([>= d] C) (threshold concept, d in [0,1] or variable, C concept, see below)
([<= d] C) (threshold concept, d in [0,1] or variable, C concept, see below)
(self R) (self concept, i.e, set of instances x such that R(x,x))
(ua RN C) (upper approximation of concept C according to indiscernibility relation RN)
(la RN C) (lower approximation of concept C according to indiscernibility relation RN)
(some R fn) (existential role restriction with a fuzzy number)
(all R fn) (universal role restriction with a fuzzy number)
(tua RN C) tight upper approximation of concept C according to indiscernibility relation RN
(lua RN C) loose upper approximation of concept C according to indiscernibility relation RN
(tla RN C) tight lower approximation of concept C according to indiscernibility relation RN
(lla RN C) loose lower approximation of concept C according to indiscernibility relation RN
(FN) Fuzzy Number, to appear only in existential, universal and datatype restrictions
(owa (w1 ... wn) (C1 ... Cn)) OWA aggregation of concepts Ci
(q-owa q C1 ... Cn) Quantifier-guided OWA aggregation of concepts Ci, q is a quantifier defined as right-shoulder or linear function over [0,1]
(choquet (w1 ... wn) (C1 ... Cn)) Choquet integral aggregation of concepts Ci
(sugeno (w1 ... wn) (C1 ... Cn)) Sugeno integral aggregation of concepets Ci
(q-sugeno (w1 ... wn) (C1 ... Cn)) Quasi-Sugeno integral aggregation of concepts Ci
(w-max (v1 C1) . . . (vk Ck)) Weighted maximum
(w-min (v1 C1) . . . (vk Ck)) Weighted minimum
(w-sum-zero (n1 C1) ... (nk Ck)) (Weighted-sum concept that is 0 if one argument is 0, ni in [0,1], Ci concept, n1+ ..+nk=1)

Note: conjunction and disjunction are n-ary, n>1

Logic selection:

Definition of the fuzzy logic is not done in the Config file, but in the KB with the statement:

 (define-fuzzy-logic [lukasiewicz | zadeh | classical])

Indiscernibility Relation Declarations:

Definitions a role R as an indescirnibility relation

(define-fuzzy-similarity R)

R is a reflexive and symmetric

(define-fuzzy-equivalence R)

R is a reflexive, symmetric, and transitive

Truth constants:

(define-truth-constant constant n)

Defines a name for a truth constant n, where n is a rational in [0,1].

Example:

(define-truth-constant totally 1.0)
(define-truth-constant very 0.8)
(define-truth-constant quite 0.7)
(define-truth-constant moderately 0.6)
(define-truth-constant enough 0.4)
(define-truth-constant little 0.2)

We then may use them in the expressions as, e.g.

(instance jim Tall totally)
(instance maria Tall little)

Concept modifier:

(define-modifier CM linear-modifier(b))

Defines a name for a modifier as a linear hedge. b>0. E.g. (define-modifier very linear-modifier(3))

(define-modifier CM triangular-modifier(a,b,c))

Defines a name for a triangular modifier, where at 0 the value is a, at b the value is 1, while at 1 the value is c. E.g. (define-modifier more-or-less triangular-modifier(0,0.8,0.7))

Concrete Fuzzy Concepts:

Defines a name for a fuzzy set with explicit fuzzy membership function.

(define-fuzzy-concept CFC crisp(k1,k2,a,b))

(define-fuzzy-concept CFC left-shoulder(k1,k2,a,b)) with a < b

(define-fuzzy-concept CFC right-shoulder(k1,k2,a,b)) with a < b

(define-fuzzy-concept CFC triangular(k1,k2,a,b,c)) with a < b < c

(define-fuzzy-concept CFC trapezoidal(k1,k2,a,b,c,d)) with a < b < c < d

(define-fuzzy-concept CFC linear(k1,k2,a,b))

(define-fuzzy-concept CFC modified(mod,F))

E.g. (define-fuzzy-concept Young left-shoulder(0,100,10,30))

Fuzzy Numbers:

Fuzzy numbers, such as "about 3", "about 4.5", can be represented as concrete fuzzy concepts having triangular membership function. A fuzzy number can be defined using the syntax

(define-fuzzy-number-range k1 k2)

which defines the range of all fuzzy numbers used. Then any individual fuzzy number is defined by means of

(define-fuzzy-number name FN)

where FN is a fuzzy number expression and defines the fuzzy number name as defined by the expression FN. A fuzzy number correponds to a triangular fuzzy membership function, with range k1, k2, i.e, triangular(k1, k2, a, b, c).

No recursive definition is allowed.

Any rational number n is a fuzzy number with triangular membership function, where a=b=c.

On fuzzy numbers, we may perform arithmetic operations, such as addition, substraction, multiplication and division. Let n be rational number , n+ be a non zero rational and

(define-fuzzy-number fn1 a1, b1, c1)

(define-fuzzy-number fn2 a2, b2, c2)

The following are fuzzy number expressions with parameters as shown in the last column

FN --> name fuzzy number name
n real number (n, n, n)
(a, b, c) triangular fuzzy number
(f+ fn1 fn2) (addition) (a1 + a2, b1 + b2, c1 + c2)
(f- fn1 fn2) (substraction) (a1 - c2, b1 - b2, c1 - a2)
(f* fn1 fn2) (multiplication) (a1 * a2, b1 * b2, c1 * c2)
(f/ fn1 f2) (division) (a1/c2, b1/b2, c1/a2)

Note:

Example: Three exams of a student have been evaluated qualitatively using the degree scale VeryPoor, Poor, Fair, Good, VeryGood, defined as fuzzy numbers below

(define-fuzzy-number-range -100 100)

(define-fuzzy-number VeryPoor 0, 0, 2)

(define-fuzzy-number Poor 1, 2.5, 4)

(define-fuzzy-number Fair 3, 5, 7)

(define-fuzzy-number Good 6, 7.5, 9)

(define-fuzzy-number VeryGood 8, 10, 10)

The overall evaluation can be defined as:

(define-concept Exam1 (some hasScore VeryPoor))

(define-concept Exam2 (some hasScore Fair))

(define-concept Exam3 (some hasScore Good))

(define-concept StudentScore (w-sum (0.3 Exam1) (0.2 Exam2) (0.5 Exam3)) )

where the weights reflects the importance of the exams.

Datatype Restrictions:

Defines a name for a functional datatype attribute (also called concrete feature) that then can be used to form concepts according to the syntax below. Concrete features are defined using two instructions, functionality and range:

 (functional featureName)

 (range featureName *integer* k1 k2) | (range F *real* k1 k2) | (range F *string*) | (range F *boolean*)

Boolean values are: true, false

E.g.,

(functional hasAge)

(range hasAge *integer* 0 150),

defines the attribute hasAge as integer valued. The values should be between 0 and 150.

Datatype restrictions are concepts having the following syntax:

DR --> (>= featureName value) (at least restriction)
(<= featureName value) (at most restriction)
(= featureName value) (equal restriction)
value --> string if feature type is *string*
integer if feature type is *integer*
rational if feature type is *real*
FN fuzzy number expression, if feature type is *real*
AE arithmetic expression
true | false if feature type is boolean. >= and <= operations are not allowed
AE --> n a number, e.g., 10.81. Negative numbers are prefixed with "-", e.g, -10.82
t a concrete feature
n *t product among a number and a feature
AE1 + AE2 + ... + AEk sum of k arithmetic expressions
t1 - t2 difference

For instance, given the definition

(functional hasAge)

(range hasAge *integer* 0 150)

the concept

(and Person (>= hasAge 18))

denotes the set of people whose age is at least 18.

Another example si the following:

%----

(functional totalPrice)

(range totalPrice *real* 0 1000)

(functional netPrice)

(range netPrice *real* 0 1000)

(instance a (= netPrice 50.21))

(instance a (= totalPrice (netPrice + (0.2*netPrice) + -20) ) )

(show-concrete-fillers-for a netPrice totalPrice)

(min-instance? a (>= totalPrice 30))

%-----

General Concept Inclusions Axioms:

(equivalent-concepts C D) --> concept C is defined as equivalent to concept D
(define-concept CN C) --> concept name CN is defined as concept C
(define-primitive-concept CN C) --> concept name CN is a sub-concept of concept C
(implies C1 C2 [d]) --> concept C1 is a sub-class of concept C2 with degree d
(l-implies C1 C2 [d]) --> concept C1 is a sub-class of concept C2 with degree d using Lukasiewicz implication
(g-implies C1 C2 [d]) --> concept C1 is a sub-class of concept C2 with degree d using Gödel implication
(kd-implies C1 C2 [d]) --> concept C1 is a sub-class of concept C2 with degree d using Kleene-Dienes implication
(disjoint CN1 .... CNm) --> This declares concepts names CN1 ... CNm to be disjoint: for all i < j, (implies (and CNi CNj) *bottom* )
(range RN C) --> Role name RN has range concept C. Same as (implies *top* (all RN C))
(domain RN C) --> Role name RN has domain concept C. Same as (implies (some RN *top*) C)
(z-implies C1 C2 [d]) --> concept C1 is a sub-class of concept C2 with degree d using Zadeh implication
(disjoint-union CN1 .... CNm) --> (disjoint CN2 ... CNm) and C1= (or CN2 ... CNm)

The degree d may be either a rational number in [0,1] or a variable (string). Variables may be used when some special constraints on the values are requested, by using Inequetions (see below)

Role Axioms:

(functional RN) --> role RN is considered functional
(transitive RN) --> role RN is transitive. RN cannot be functional
(implies-role RN1 RN2 [d]) --> role RN2 subsumes role RN1 to degree d
(inverse RN1 RN2) --> role RN1 is defined as the inverse of role RN2
(reflexive RN) --> role RN is defined as reflexive
(symmetric RN) --> role RN is defined as symmetric
(define-fuzzy-similarity RN) --> role RN is defined as an indiscernibility relation, i.e., reflexive, symmetric and transitive role
(inverse-functional RN) --> role RN is considered inverse functional

NOTE: (define-fuzzy-similarity RN) is used together "upper" and "lower approximations concepts in Fuzzy Rough Set reasoning. For instance,

(define-fuzzy-similarity S)

(instance a (ua S C) 0.8)

(instance a (la S D) 0.7)

(related a b S 0.9)

(min-instance? b D)

#(min-instance? a (some S (and C D)))

Weighted Concept:

(w-sum (n1 C1) ... (nk Ck))

Represents a concept, which is the weighted sum of the concepts Ci, i.e. n1*C1 + ... + nk*Ck. We assume, ni in [0,1] and n1+ ..+nk=1.

Example of usage:

(define-concept Dinner (and Person (w-sum (0.2 Bottle) (0.3 Plate) (0.2 Fork) (0.2 Spoon) (0.1 Knife))))

"A dinner is something in which there is a Person and possibly, a bottle, a plate, a fork, a spoon, a knife".

(w-sum-zero (n1 C1) ... (nk Ck))

Represents a concept that is as the weighted sum, except that if an argument is 0, the expression is 0.

Example of usage:

(define-concept Dinner (and Person (w-sum-zero (0.2 Bottle) (0.3 Plate) (0.2 Fork) (0.2 Spoon) (0.1 Knife))))

"A dinner is something in which there is a Person and possibly, a bottle, a plate, a fork, a spoon, a knife. If one of the arguments is 0, i.e missing, then we have no dinner".

(n C)

For n in [0,1], this represents a concept such that for any individual d, the degree of being individual d an instance of (n C), i.e., (n C)(d), is given by n times the degree of being d an instance of C, i.e., n * C(d). As a note, (w-sum (n1 C1) ... (nk Ck)) is the same as (l-or (n1 C1) ... (nk Ck)).

Other aggregation methods are via OWA, quantifier-based OWA or Fuzzy Integrals.

Threshold Concept:

([>= d] C)

([<= d] C)

Represents a concept, where d in [0,1] or d is a variable and C is a concept. E.g., the degree of being individual a an instance of ([>= d] C), i.e., ([>= n] C)(a), is 0 if a is an instance of C to degree less than d, otherwise the degree is C(a). Similarly, the degree of being individual a an instance of ( [<= d] C), i.e., ([<= d] C)(a), is 0 if a is an instance of C to degree greather than d, otherwise the degree is C(a).

Example of usage:

(implies ([>= 0.8] Dinner) GoodDinner))

"A a dinner with degree greater or equal than 0.8 is a good dinner"

As such ([>= 0.8] Dinner) acts as thresholded concept with threshold 0.8.

Assertions:

(instance a C [d]) --> individual a is instance of concept C at least with degree d. If degree omitted, 1 is assumed
(related a b RN [d]) --> individual a is related to b by means of role RN, at least with degree d. If degree omitted, 1 is assumed

The degree d may be either a rational number in [0,1] or a variable (string). Variables may be used when some special constraints on the values are requested, by using Inequetions (see below)

Linear Inequation Axioms:

Allow to specify constraints on the truth values.

constraints --> (constraints <constraint>+)
constraint --> (binary var)
(free var)
(a1*var1 + ... + aN*varN OP number)

where

(binary var) --> The variable "var" is declared to be binary, i.e. takes value 0 or 1
(free var) --> The variable "var" is declared to be free, i.e. takes any value
(a1*var1 + ... + aN*varN OP number) --> An in-equation is a linear combination of constants*variable, bounded by a rational number
OP --> "<=" | ">=" | "="

Example 1.

(instance a C x1)

(instance a D x2)

(constraints (x1 + x2 = 0.5))

Example 2.

Tom is taller than Tim.

(instance tim (not Tall) x1)

(instance tom Tall x)

(constraints (x1 + x = 1))

Crisp Declarations:

Declares concepts Ai and roles Rj as crisp.

(crisp-concept A1 ... An)

(crisp-role R1 ... Rn)

Query Expressions:

Multiple queries can be added to the file.

(min-instance? a C) --> determines the minimal degree to which individual a is an instance of concept C
(max-instance? a C) --> determines the maximal degree to which individual a is an instance of concept C
(min-subs? C1 C2) --> determines the minimal degree to which concept C1 subsumes concept C2
(max-subs? C1 C2) --> determines the maximal degree to which concept C1 subsumes concept C2
(min-l-subs? C1 C2) --> determines the minimal degree to which concept C1 subsumes concept C2, using Lukasiewicz implication
(max-l-subs? C1 C2) --> determines the maximal degree to which concept C1 subsumes concept C2, using Lukasiewicz implication
(min-g-subs? C1 C2) --> determines the minimal degree to which concept C1 subsumes concept C2, using Gödel implication
(max-g-subs? C1 C2) --> determines the maximal degree to which concept C1 subsumes concept C2, using Gödel implication
(min-kd-subs? C1 C2) -> determines the minimal degree to which concept C1 subsumes concept C2, using Kleene-Dienes implication
(max-kd-subs? C1 C2) -> determines the maximal degree to which concept C1 subsumes concept C2, using Kleene-Dienes implication
(min-sat? C [a]) -> determines the minimal degree to which concept C is satisfiable. Optionally we may specify an individual a. In that case the minimal degree to which the individual a is an instance of C is computed
(max-sat? C [a]) -> determines the maximal degree to which concept C is satisfiable. Optionally we may specify an individual a. In that case the maximal degree to which the individual a is an instance of C is computed
(min-var? var) -> determines the minimal value for variable var in [0,1], taking into account the constraints in the KB
(max-var? var) -> determines the maximal value for variable var in [0,1], taking into account the constraints in the KB
(min-related? a b RN) -> determines the minimal degree to which individual pair (a,b) is an instance of role name RN
(max-related? a b RN) -> determines the maximal degree to which individual pair (a,b) is an instance of role name RN
(defuzzify-lom? C a F) -> Defuzzify the value of feature F using largest of the maxima method. a is an individual (see example)
(defuzzify-som? C a F) -> Defuzzify the value of feature F using smallest of the maxima method. a is an individual (see example)
(defuzzify-mom? C a F) -> Defuzzify the value of feature F using middle of the maxima method. a is an individual (see example)
(bnp? fn) -> Defuzzify fuzzy number fn. It computes the Best Non-Fuzzy Performance (BNP) of fuzzy number fn as (a + b + c)/3
(all-instances? C) -> Same as (min-instance? a C) for every individual in the KB
(sat?) -> Test if a KB is satisfiable

A simple example of maximization problem is the following:

(instance a Beta xBeta)

(instance a Alpha xAlpha)

(constraints (xBeta<=0.5) (xAlpha + -0.3*y<=0) (BND y BV) (0.5*xBeta + 0.5*xAlpha + -1*x=0))

(min-var? x)

Show Expressions:

Statements have been added to show values in an optimal solution.

(show-concrete-fillers f1 ... fn) --> show all fillers of concrete feature f1 ... fn in an optimal solution to a query
(show-concrete-fillers-for a f1 ... fn) --> for individual a, show all fillers of concrete feature f1 ... fn in an optimal solution to a query
(show-variables x1 ... xn) --> show the value of the variables x1 ... xn in an optimal solution to a query
(show-instances A1 ... An) --> show all instances of atomic concepts A1 ... An and their degree in an optimal solution to a query
(show-concepts a1 ... an) --> show all atoms to which ai is instance and their degree in an optimal solution to a query
(show-language) --> show the description logic language of the KB, from ALC to SHIF
(show-abstract-fillers R A1 ... An) --> show the membership to atomic concepts A1, ..., An of the fillers of R
(show-abstract-fillers-for a R A1 ... An --> show the membership to atomic concepts A1, ..., An of the fillers of R for individual a
(show-concrete--instance-for a f A1 ... An) --> show degrees of being the f filler of a an instance of concept Ai
(show-abstract-fillers R1 ... Rn) --> showfillers of R1 ... Rn and membership to any concept
(show-abstract-fillers-for a R1 ... Rn) --> show fillers of R1 ... Rn for a and membership to any concept

Example:

(functional hasPrice)

(define-fuzzy-concept AudiTTPrice right-shoulder(0,50000,30500,31500))

(define-concept AudiTT (and SportsCar (some hasPrice AudiTTPrice)))

(define-fuzzy-concept BuyerPrice left-shoulder(0,50000,30000,32000))

(define-concept BuyerQuery (and SportsCar (some hasPrice BuyerPrice)))

(max-sat? (and BuyerQuery AudiTT))

(show-concrete-fillers hasPrice)

"Ask about the maximal agreement among buyer and sold item AUdiTT and show the price of this agreement"