XFL3: The Xfuzzy 3 specification language

Types of linguistic variables

An XFL3 type is an object that describes a type of linguistic variable. This means to define its universe of discourse, to name the linguistic labels covering that universe, and to specify the membership function associated to each label. The definition format of a type is as follows:

type identifier [min, max; card] {
    family_id [] membership_function_family(parameter_list);
    .............
    label membership_function(parameter_list);
    .............
    label family_id [ index ];
    ............. }
  

where min and max are the limits of the universe of discourse and card (cardinality) is the number of its discrete elements. If cardinality is not specified, its default value (currently, 256) is assumed. When limits are not explicitly defined, the universe of discourse is taken from 0 to 1.

Linguistic labels can be defined in two ways: free membership functions or members of a family of membership functions. In the last case, the family of membership functions must be previously defined. A free membership function uses its own set of parameters while the members of a family share the list of parameters of that family. This is useful to reduce the number of parameters and to represent constraints between the linguistic labels (such as the order or a fixed overlapping degree).

The format of the membership_function and the membership_function_family identifiers is similar to the operator identifier, that is, "package.function". On the other hand, a member of a family of membership functions is identified by its index (being 0 the first one).

XFL3 supports inheritance mechanisms in the type definitions (like its precursor, XFL). To express inheritance, the heading of the definition is as follows:

type identifier extends identifier {

The types so defined inherit automatically the universe of discourse and the labels of their parents. The labels defined in the body of the type are either added to the parent labels or overwrite them if they have the same name.

 type Tinput1 [-90,90] {
    NM xfl.trapezoid(-100,-90,-40,-30);
    NP xfl.trapezoid(-40,-30,-10,0);
    CE xfl.triangle(-10,0,10);
    PP xfl.trapezoid(0,10,30,40);
    PM xfl.trapezoid(30,40,90,100);
   } 
 type Tinput2 extends Tinput1 {
    NG xfl.trapezoid(-100,-90,-70,-60);
    NM xfl.trapezoid(-70,-60,-40,-30);
    PM xfl.trapezoid(30,40,60,70);
    PG xfl.trapezoid(60,70,90,100);
   } 
 type Tinput3 [-90,90] {
    fam[] xfl.triangular(-60,-30,0,30,60);
    NG fam[0];
    NM fam[1];
    NP fam[2];
    CE fam[3];
    PP fam[4];
    PM fam[5];
    PG fam[6];
   } 

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

©IMSE-CNM 2018