XFL3: The Xfuzzy 3 specification language

Rule bases

A rule base in XFL3 is an object containing the rules that define the logic relationships among the linguistic variables. Its definition format is as follows:

rulebase identifier (input_list : output_list) using operatorset {
    [factor] if (antecedent) -> consecuent_list;
    [factor] if (antecedent) -> consecuent_list;
    ............. }
  

The definition format of the input and output variables is "type identifier", where type refers to one of the linguistic variable types previously defined. The operator set selection is optional, so that when it is not explicitly defined, the default operators are employed. Confidence weights or factors (with default values of 1) can be applied to the rules.

A rule antecedent describes the relationships among the input variables. XFL3 allows to express complex antecedents by combining basic propositions with connectives or linguistic hedges. On the other side, each rule consequent describes the assignation of a linguistic variable to an output variable as "variable = label".

A basic proposition relates an input variable with one of its linguistic labels. XFL3 admits several relationships, such as equality, inequality and several linguistic hedges. The following table shows the different relationships offered by XFL3.

Basic propositions

Description

Representation

variable == label equal to
variable >= label equal or greater than
variable <= label equal or smaller than
variable > label greater than
variable < label smaller than
variable != label not equal to
variable %= label slightly equal to
variable ~= label moreorless equal to
variable += label strongly equal to

In general, a rule antecedent is formed by a complex proposition. Complex propositions are composed of basic propositions, connected by fuzzy connectives and linguistic hedges. The following table shows how to generate complex propositions in XFL3.

Complex propositions Description
proposition & proposition and operator
proposition | proposition or operator
!proposition not operator
%proposition slightly operator
~proposition moreorless operator
+proposition strongly operator

This is an example of a rule base composed of some rules which include complex propositions.

 rulebase base1(input1 x, input2 y : output z) using systemop {
    if( x == medium & y == medium) -> z = tall;
    [0.8] if( x <=short | y != very_tall ) -> z = short;
    if( +(x > tall) & (y ~= medium) ) -> z = tall;
    ............. } 

For comments, patches, bug reports, etc contact us at:   xfuzzy-team@imse-cnm.csic.es

©IMSE-CNM 2018