\n \n
<?xml version="1.0" encoding="UTF-8"?><fuzzySystemname="newSystem"ip="127.0.0.1"><KnowledgeBase><FuzzyVariablename="food"domainleft="0.0"domainright="10.0"scale=""type="input"><FuzzyTermname="delicious"complement="false"><LeftLinearShapeParam1="5.5"Param2="10.0"/></FuzzyTerm><FuzzyTermname="rancid"complement="false"><TriangularShapeParam1="0.0"Param2="2.0"Param3="5.5"/></FuzzyTerm></FuzzyVariable>........... <FuzzyVariablename="tip"domainleft="0.0"domainright="20.0"scale="Euro"defaultValue="0.0"defuzzifier="COG"accumulation="MAX"type="output"><FuzzyTermname="average"complement="false"><TriangularShapeParam1="5.0"Param2="10.0"Param3="15.0"/></FuzzyTerm><FuzzyTermname="cheap"complement="false"><TriangularShapeParam1="0.0"Param2="5.0"Param3="10.0"/></FuzzyTerm><FuzzyTermname="generous"complement="false"><TriangularShapeParam1="10.0"Param2="15.0"Param3="20.0"/></FuzzyTerm></FuzzyVariable></KnowledgeBase>............ </fuzzySystem>
A special tag that can furthermore be used to define a fuzzy shape is <UserShape>
. This tag is used to customize fuzzy shape (custom shape). The custom shape modeling is performed via a set of <Point>
tags that lists the extreme points of geometric area defining the custom fuzzy shape. Obviously, the attributes used in <Point>
tag are x and y coordinates. As for rule base component, FML allows to define a set of rule bases, each one of them describes a different behavior of system. The root of each rule base is modeled by <RuleBase>
tag which defines a fuzzy rule set. The <RuleBase>
tag uses five attributes: name, type, activationMethod, andMethod and orMethod. Obviously, the name attribute uniquely identifies the rule base. The type attribute permits to specify the kind of fuzzy controller (Mamdani or TSK) respect to the rule base at issue. The activationMethod attribute defines the method used to implication process; the andMethod and orMethod attribute define, respectively, the and and or algorithm to use by default. In order to define the single rule the <Rule>
tag is used. The attributes used by the <Rule>
tag are: name, connector, operator and weight. The name attribute permits to identify the rule; connector is used to define the logical operator used to connect the different clauses in antecedent part (and/or); operator defines the algorithm to use for chosen connector; weight defines the importance of rule during inference engine step. The definition of antecedent and consequent rule part is obtained by using <Antecedent>
and <Consequent>
tags. <Clause>
tag is used to model the fuzzy clauses in antecedent and consequent part. This tag use the attribute modifier to describe a modification to term used in the clause. The possible values for this attribute are: above, below, extremely, intensify, more or less, norm, not, plus, slightly, somewhat, very, none. To complete the definition of fuzzy clause the nested <Variable>
and <Term>
tags have to be used. A sequence of <Rule>
tags realizes a fuzzy rule base.
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 antecedent part is formed by two clauses: (food is rancid) and (service is poor). The first antecedent clause uses food as variable and rancid as fuzzy term, whereas, the second antecedent clause uses service as a variable, poor as fuzzy term and very as modifier; the consequent clause uses tip as a fuzzy variable and cheap as a fuzzy term. The complete rule is:
IF(food is rancid)OR(service is very poor)THEN(tip is cheap).
Let us see how FML defines a rule base with this rule.
<RuleBasename="Rulebase1"activationMethod="MIN"andMethod="MIN"orMethod="MAX"type="mamdani"><Rulename="reg1"connector="or"operator="MAX"weight="1.0"><Antecedent><Clause><Variable>food</Variable><Term>rancid</Term></Clause><Clausemodifier="very"><Variable>service</Variable><Term>poor</Term></Clause></Antecedent><Consequent><Clause><Variable>tip</Variable><Term>cheap</Term></Clause></Consequent></Rule>............ </RuleBase>
Now, let us see a Takagi-Sugeno-Kang system that regulates the same issue. The most important difference with Mamdani system is the definition of a different output variable tip. The <TSKVariable>
tag is used to define an output variable that can be used in a rule of a Tsk system. This tag has the same attributes of a Mamdani output variable except for the domainleft and domainright attribute because a variable of this kind (called tsk-variable) hasn't a universe of discourse. The nested <TSKTerm>
tag represents a linear function and so it is completely different from <FuzzyTerm>
. The <TSKValue>
tag is used to define the coefficients of linear function. The following crunch of FML code shows the definition of output variable tip in a Tsk system.
<?xml version="1.0" encoding="UTF-8"?><fuzzySystemname="newSystem"ip="127.0.0.1"><KnowledgeBase>....... <TSKVariablename="tip"scale="null"accumulation="MAX"defuzzifier="WA"type="output"><TSKTermname="average"order="0"><TSKValue>1.6</TSKValue></TSKTerm><TSKTermname="cheap"order="1"><TSKValue>1.9</TSKValue><TSKValue>5.6</TSKValue><TSKValue>6.0</TSKValue></TSKTerm><TSKTermname="generous"order="1"><TSKValue>0.6</TSKValue><TSKValue>1.3</TSKValue><TSKValue>1.0</TSKValue></TSKTerm></TSKVariable><KnowledgeBase>.......... </fuzzySystem >
The FML definition of rule base component in a Tsk system doesn't change a lot. The only different thing is that the <Clause>
tag doesn't have the modifier attribute.
As example, consider a tsk rule composed by (food is rancid) OR (service is very poor) as antecedent and, as consequent, tip=1.9+5.6*food+6.0*service that can be written as tip is cheap in an implicitly way. So the rule can be written in this way:
IF(food is rancid)OR(service is very poor)THEN(tip is cheap).
Let us see how FML defines a rule base with this rule.
<RuleBasename="Rulebase1"activationMethod="MIN"andMethod="MIN"orMethod="MAX"type="tsk"><Rulename="reg1"connector="or"operator="MAX"weight="1.0"><Antecedent><Clause><Variable>food</Variable><Term>rancid</Term></Clause><Clause><Variable>service</Variable><Term>poor</Term></Clause></Antecedent><Consequent><Clause><Variable>tip</Variable><Term>cheap</Term></Clause></Consequent></Rule>............ </RuleBase>
The FML tags used to build a fuzzy controller represent the set of lexemes used to create fuzzy expressions. However, in order to realize a well-formed XML-based language, an FML context-free grammar is necessary and described in the following. The FML context-free grammar is modeled by XML file in the form of a XML Schema Document (XSD) which expresses the set of rules to which a document must conform in order to be considered a valid FML document. Based on the previous definition, a portion of the FML XSD regarding the knowledge base definition is given below.
<?xml version="1.0" encoding="UTF-8"?><xs:schemaxmlns:xs="http://www.w3.org/2001/XMLSchema">........ <xs:complexTypename="KnowledgeBaseType"><xs:sequence><xs:choiceminOccurs="0"maxOccurs="unbounded"><xs:elementname="FuzzyVariable"type="FuzzyVariableType"/><xs:elementname="TSKVariable"type="TSKVariableType"/></xs:choice></xs:sequence></xs:complexType><xs:complexTypename="FuzzyVariableType"><xs:sequence><xs:elementname="FuzzyTerm"type="FuzzyTermType"maxOccurs="unbounded"/></xs:sequence><xs:attributename="name"type="xs:string"use="required"/><xs:attributename="defuzzifier"default="COG"><xs:simpleType><xs:restrictionbase="xs:string"><xs:patternvalue="MM|COG|COA|WA|Custom"/></xs:restriction></xs:simpleType></xs:attribute><xs:attributename="accumulation"default="MAX"><xs:simpleType><xs:restrictionbase="xs:string"><xs:patternvalue="MAX|SUM"/></xs:restriction></xs:simpleType></xs:attribute><xs:attributename="scale"type="xs:string"/><xs:attributename="domainleft"type="xs:float"use="required"/><xs:attributename="domainright"type="xs:float"use="required"/><xs:attributename="defaultValue"type="xs:float"default="0"/><xs:attributename="type"default="input"><xs:simpleType><xs:restrictionbase="xs:string"><xs:patternvalue="input|output"/></xs:restriction></xs:simpleType></xs:attribute></xs:complexType><xs:complexTypename="FuzzyTermType"><xs:choice><xs:elementname="RightLinearShape"type="TwoParamType"/><xs:elementname="LeftLinearShape"type="TwoParamType"/><xs:elementname="PIShape"type="TwoParamType"/><xs:elementname="TriangularShape"type="ThreeParamType"/><xs:elementname="GaussianShape"type="TwoParamType"/><xs:elementname="RightGaussianShape"type="TwoParamType"/><xs:elementname="LeftGaussianShape"type="TwoParamType"/><xs:elementname="TrapezoidShape"type="FourParamType"/><xs:elementname="SingletonShape"type="OneParamType"/><xs:elementname="RectangularShape"type="TwoParamType"/><xs:elementname="ZShape"type="TwoParamType"/><xs:elementname="SShape"type="TwoParamType"/><xs:elementname="UserShape"type="UserShapeType"/></xs:choice><xs:complexTypename="TwoParamType"><xs:attributename="Param1"type="xs:float"use="required"/><xs:attributename="Param2"type="xs:float"use="required"/></xs:complexType><xs:complexTypename="ThreeParamType"><xs:attributename="Param1"type="xs:float"use="required"/><xs:attributename="Param2"type="xs:float"use="required"/><xs:attributename="Param3"type="xs:float"use="required"/></xs:complexType><xs:complexTypename="FourParamType"><xs:attributename="Param1"type="xs:float"use="required"/><xs:attributename="Param2"type="xs:float"use="required"/><xs:attributename="Param3"type="xs:float"use="required"/><xs:attributename="Param4"type="xs:float"use="required"/></xs:complexType><xs:complexTypename="UserShapeType"><xs:sequence><xs:elementname="Point"type="PointType"minOccurs="2"maxOccurs="unbounded"/></xs:sequence></xs:complexType><xs:complexTypename="PointType"><xs:attributename="x"type="xs:float"use="required"/><xs:attributename="y"type="xs:float"use="required"/></xs:complexType><xs:complexTypename="RuleBaseType"><xs:attributename="name"type="xs:string"use="required"/><xs:attributename="activationMethod"default="MIN"><xs:simpleType><xs:restrictionbase="xs:string"><xs:patternvalue="PROD|MIN"/></xs:restriction></xs:simpleType></xs:attribute><xs:attributename="andMethod"default="MIN"><xs:simpleType><xs:restrictionbase="xs:string"><xs:patternvalue="PROD|MIN"/></xs:restriction></xs:simpleType></xs:attribute><xs:attributename="orMethod"default="MAX"><xs:simpleType><xs:restrictionbase="xs:string"><xs:patternvalue="PROBOR|MAX"/></xs:restriction></xs:simpleType></xs:attribute><xs:attributename="type"use="required"><xs:simpleType><xs:restrictionbase="xs:string"><xs:patternvalue="TSK|Tsk|tsk|Mamdani|mamdani"/></xs:restriction></xs:simpleType></xs:attribute></xs:complexType><xs:complexTypename="MamdaniRuleBaseType"><xs:complexContent><xs:extensionbase="RuleBaseType"><xs:sequence><xs:elementname="Rule"type="MamdaniFuzzyRuleType"minOccurs="0"maxOccurs="unbounded"/></xs:sequence></xs:extension></xs:complexContent></xs:complexType><xs:complexTypename="AntecedentType"><xs:sequence><xs:elementname="Clause"type="ClauseType"maxOccurs="unbounded"/></xs:sequence></xs:complexType><xs:complexTypename="MamdaniConsequentType"><xs:sequence><xs:elementname="Clause"type="ClauseType"maxOccurs="unbounded"/></xs:sequence></xs:complexType><xs:complexTypename="ClauseType"><xs:sequence><xs:elementname="Variable"><xs:simpleType><xs:restrictionbase="xs:string"><xs:whiteSpacevalue="collapse"/><xs:patternvalue="(([A-Z])|([a-z]))+([A-Z]|[a-z]|[0-9])*"/></xs:restriction></xs:simpleType></xs:element><xs:elementname="Term"type="xs:string"></xs:element></xs:sequence><xs:attributename="modifier"use="optional"><xs:simpleType><xs:restrictionbase="xs:string"><xs:patternvalue="above|below|extremely|intensify|more_or_less|norm|not|plus|slightly|somewhat|very"/></xs:restriction></xs:simpleType></xs:attribute></xs:complexType>.......... </xs:schema>
Since an FML program realizes only a static view of a fuzzy system, the so-called eXtensible Stylesheet Language Translator (XSLT) is provided to change this static view to a computable version. In particular, the XSLT technology is used convert a fuzzy controller description into a general-purpose computer language to be computed on several hardware platforms. Currently, a XSLT converting FML program in runnable Java code has been implemented. In this way, thanks to the transparency capabilities provided by Java virtual machines, it is possible to obtain a fuzzy controller modeled in high level way by means of FML and runnable on a plethora of hardware architectures through Java technologies. However, XSLT can be also used for converting FML programs in legacy languages related to a particular hardware or in other general purpose languages.
The HyperText Markup Language or HTML is the standard markup language for documents designed to be displayed in a web browser. It defines the meaning and structure of web content. It is often assisted by technologies such as Cascading Style Sheets (CSS) and scripting languages such as JavaScript.
The Standard Generalized Markup Language is a standard for defining generalized markup languages for documents. ISO 8879 Annex A.1 states that generalized markup is "based on two postulates":
Extensible Markup Language (XML) is a markup language and file format for storing, transmitting, and reconstructing arbitrary data. It defines a set of rules for encoding documents in a format that is both human-readable and machine-readable. The World Wide Web Consortium's XML 1.0 Specification of 1998 and several other related specifications—all of them free open standards—define XML.
Fuzzy logic is a form of many-valued logic in which the truth value of variables may be any real number between 0 and 1. It is employed to handle the concept of partial truth, where the truth value may range between completely true and completely false. By contrast, in Boolean logic, the truth values of variables may only be the integer values 0 or 1.
SAX is an event-driven online algorithm for lexing and parsing XML documents, with an API developed by the XML-DEV mailing list. SAX provides a mechanism for reading data from an XML document that is an alternative to that provided by the Document Object Model (DOM). Where the DOM operates on the document as a whole—building the full abstract syntax tree of an XML document for convenience of the user—SAX parsers operate on each piece of the XML document sequentially, issuing parsing events while making a single pass through the input stream.
XSD, a recommendation of the World Wide Web Consortium (W3C), specifies how to formally describe the elements in an Extensible Markup Language (XML) document. It can be used by programmers to verify each piece of item content in a document, to assure it adheres to the description of the element it is placed in.
An HTML element is a type of HTML document component, one of several types of HTML nodes. The first used version of HTML was written by Tim Berners-Lee in 1993 and there have since been many versions of HTML. The most commonly used version is HTML 4.01, which became official standard in December 1999. An HTML document is composed of a tree of simple HTML nodes, such as text nodes, and HTML elements, which add semantics and formatting to parts of document. Each element can have HTML attributes specified. Elements can also have content, including other elements and text.
An XML schema is a description of a type of XML document, typically expressed in terms of constraints on the structure and content of documents of that type, above and beyond the basic syntactical constraints imposed by XML itself. These constraints are generally expressed using some combination of grammatical rules governing the order of elements, Boolean predicates that the content must satisfy, data types governing the content of elements and attributes, and more specialized rules such as uniqueness and referential integrity constraints.
In the field of artificial intelligence, the designation neuro-fuzzy refers to combinations of artificial neural networks and fuzzy logic.
XMLBeans is a Java-to-XML binding framework which is part of the Apache Software Foundation XML project.
XML documents have a hierarchical structure and can conceptually be interpreted as a tree structure, called an XML tree.
In computer programming, an enumerated type is a data type consisting of a set of named values called elements, members, enumeral, or enumerators of the type. The enumerator names are usually identifiers that behave as constants in the language. An enumerated type can be seen as a degenerate tagged union of unit type. A variable that has been declared as having an enumerated type can be assigned any of the enumerators as a value. In other words, an enumerated type has values that are different from each other, and that can be compared and assigned, but are not specified by the programmer as having any particular concrete representation in the computer's memory; compilers and interpreters can represent them arbitrarily.
In computing, an attribute is a specification that defines a property of an object, element, or file. It may also refer to or set the specific value for a given instance of such. For clarity, attributes should more correctly be considered metadata. An attribute is frequently and generally a property of a property. However, in actual usage, the term attribute can and is often treated as equivalent to a property depending on the technology being discussed. An attribute of an object usually consists of a name and a value. For an element these can be a type and class name, while for a file these can be a name and an extension, respectively.
The Web Application Description Language (WADL) is a machine-readable XML description of HTTP-based web services. WADL models the resources provided by a service and the relationships between them. WADL is intended to simplify the reuse of web services that are based on the existing HTTP architecture of the Web. It is platform and language independent and aims to promote reuse of applications beyond the basic use in a web browser. WADL was submitted to the World Wide Web Consortium by Sun Microsystems on 31 August 2009, but the consortium has no current plans to standardize it. WADL is the REST equivalent of SOAP's Web Services Description Language (WSDL), which can also be used to describe REST web services.
The W3C's XML Schema Recommendation defines a formal mechanism for describing XML documents. The standard has become popular and is used by the majority of standards bodies when describing their data.
The Office Open XML file formats are a set of file formats that can be used to represent electronic office documents. There are formats for word processing documents, spreadsheets and presentations as well as specific formats for material such as mathematical formulae, graphics, bibliographies etc.
HTML attributes are special words used inside the opening tag to control the element's behaviour. HTML attributes are a modifier of a HTML element type. An attribute either modifies the default functionality of an element type or provides functionality to certain element types unable to function correctly without them. In HTML syntax, an attribute is added to a HTML start tag.
Data Format Description Language, published as an Open Grid Forum Recommendation in February 2021, is a modeling language for describing general text and binary data in a standard way. A DFDL model or schema allows any text or binary data to be read from its native format and to be presented as an instance of an information set.. The same DFDL schema also allows data to be taken from an instance of an information set and written out to its native format.
The RESTful Service Description Language (RSDL) is a machine- and human-readable XML description of HTTP-based web applications.
IEEE STANDARD 1855-2016, IEEE Standard for Fuzzy Markup language (FML), is a technical standard developed by the IEEE Standards Association. FML allows modelling a fuzzy logic system in a human-readable and hardware independent way. FML is based on eXtensible Markup Language (XML). The designers of fuzzy systems with FML have a unified and high-level methodology for describing interoperable fuzzy systems. IEEE STANDARD 1855-2016 uses the W3C XML Schema definition language to define the syntax and semantics of the FML programs.