FML was designed and developed by Giovanni Acampora during his Ph.D. course in Computer Science, at University of Salerno, Italy, in 2004.
The original idea inspired Giovanni Acampora to create FML was the necessity of creating a cooperative fuzzy-based framework aimed at automatically controlling a living environment characterized by a plethora of heterogeneous devices whose interactions were devoted to maximize the human comfort under energy saving constraints.
Beyond this pioneering application, the major advantage of using XML to describe a fuzzy system is hardware/software interoperability.
Also, with technologies like XSLT, it is possible to compile the FML into the programming language of your choice, ready for embedding into whatever application you please.
As stated by Mike Watts on his popular Computational Intelligence blog:[1] "Although Acampora's motivation for developing FML seems to be to develop embedded fuzzy controllers for ambient intelligence applications, FML could be a real boon for developers of fuzzy rule extraction algorithms: from my own experience during my PhD, I know that having to design a file format and implement the appropriate parsers for rule extraction and fuzzy inference engines can be a real pain, taking as much time as implementing the rule extraction algorithm itself.
"A complete overview of FML and related applications can be found in the book titled On the power of Fuzzy Markup Language[2] edited by Giovanni Acampora, Chang-Shing Lee, Vincenzo Loia and Mei-Hui Wang, and published by Springer in the series Studies on Fuzziness and Soft Computing.
Indeed, XSLTs modules are able to convert the FML-based fuzzy controller in a general purpose computer language using an XSL file containing the translation description.
The name attribute defines the name of fuzzy concept, for instance, temperature; scale is used to define the scale used to measure the fuzzy concept, for instance, Celsius degree; domainLeft and domainRight are used to model the universe of discourse of fuzzy concept, that is, the set of real values related to fuzzy concept, for instance [0°,40°] in the case of Celsius degree; the position of fuzzy concept into rule (consequent part or antecedent part) is defined by type attribute (input/output); accumulation attribute defines the method of accumulation that is a method that permits the combination of results of a variable of each rule in a final result; defuzzifier attribute defines the method used to execute the conversion from a fuzzy set, obtained after aggregation process, into a numerical value to give it in output to system; defaultValue attribute defines a real value used only when no rule has fired for the variable at issue.
In order to make an example, consider the Tipper Inference System described in Mathworks Matlab Fuzzy Logic Toolbox Tutorial.
FML code for modeling part of knowledge base of this fuzzy system containing variables food and tip is shown below.
The type attribute permits to specify the kind of fuzzy controller (Mamdani or TSK) respect to the rule base at issue.
As example, consider a Mamdani rule composed by (food is rancid) OR (service is very poor) as antecedent and tip is cheap as consequent.
The following crunch of FML code shows the definition of output variable tip in a Tsk system.
The FML definition of rule base component in a Tsk system doesn't change a lot.
However, in order to realize a well-formed XML-based language, an FML context-free grammar is necessary and described in the following.