~~SLIDESHOW~~
====== Hekate Markup Language ======
===== Introduction =====
* The //Hekate Markup Language (HML)// is provided for the machine readable XML serialization of the HeKatE rule base described in a human-readable [[HMR]] format.
* The rules are formalized with the use of the [[hekate:ALSVFD]] logic and [[hekate:XTT2]] rules prototyped with the [[hekate:ARDplus]] method.
* There are the following subsets of the HeKatE Markup Language defined:
* ''attml'' -- Attribute Markup Language for describing rule [[hekate:attributes]]
* ''ardml'' -- Attribute Relationship Markup Language for the [[hekate:ARDplus]] prototype
* ''xttml'' -- XTT2 Rule Markup Language for the [[hekate:XTT2]] structured rule representation
===== Introduction =====
* The sublanguages can be used according to the following scenarios:
- ''attml'' -- only attribute definition, the minimalistic case
- ''attml'' + ''ardml'' -- attributes and ARD dependencies
- ''attml'' + ''ardml'' + ''xttml'' -- attributes, dependencies and XTT2 rules
- ''attml'' + ''xttml'' -- attributes and rules, (without the ARD prototype)
===== Introduction =====
* An example of HML application using some sublanguages:
...
...
===== Introduction =====
* An example of HML application using some sublanguages:
...
...
...
===== Introduction =====
* An example of HML application using some sublanguages:
...
===== HeKatE markup history =====
* 2004 - first markup for XTT in GJN PhD -> XTTML0
* 2007 - first markup for ARD+ in VARDA
* 2007 - second version of markup for XTT in early versions of HQEd -> XTTML
* 2007 - third version of markup for XTT in HQEd M5_* -> XTTML2
* 2008 - first version markup proposal for HeKatE, ARD+, XTT+ -> [[HML1]]: ATTML1, ARDML1, XTTML3 (proposal for XTT+, partially supported by design tools)
* 2009 - second version of HML, ARD+ XTT2 -> HML2: ATTML2, ARDML2, XTTML4 (supported by HQEd M6_* from 05.2009)
===== HML syntax =====
* HeKatE markup language DTD: {{hekate:hml.dtd}} (for HML2).
* For syntax test purposes there is example XML file: {{hekate:hml-test.xml}}
* A minimalistic file is: {{hekate:hml-test-min.xml}}
* //(Note: the above files are versioned in the HaDEs CVS repo in the [[hekate:HatHoR]] module.)//
===== HML syntax =====
* Important elements are indexed with an attribute ''id''.
* ''id'' value has to be unique (enforced by DTD) and should start with (depending on particular element):
* types: ''id="tpe_..."''
* attributes: ''id="att_..."''
* properties: ''id="prp_..."''
* type groups: ''id="tgr_..."''
* attribute groups: ''id="agr_..."''
* dependencies: ''id="dep_..."''
* ARD history (TPH): ''id="hst_..."''
* //All id numbers start with 1//
===== HML syntax =====
* An additional attribute (''id'') is introduced to guarantee that types, attributes, properties and groups can be uniquely referenced.
* It can be forced, using DTD, that an attribute has a unique value within an XML document, it becomes a unique identifier.
* Similarly, it can be forced that an attribute references an element by its unique identifier.
* Making attribute names unique identifiers prevents naming a group, or type, with the same name as the attribute, since unique identifiers are unique within entire document regardless of the element they regard to.
===== HML syntax =====
It is possible to validate a HML file using a validator i.e. ''xmlstarlet'':
xmlstarlet val -e -d hml.dtd hml-test.xml
===== ATTML =====
For information on attributes [[hekate:attributes|see here]].
represents a temperature
represents an integer number
input temperature from sensor number 1
input temperature from sensor number 1, aux reading, including historic data
temperatures from sensors
Both in the case of //types// and //attributes// groups can be specified.
Example: types day, hour, month can form a type group //date//.
The same could apply to specific attributes.
In the example above there is set of attributes describing sensor readings formed out of values of temp and corresponding temp-aux.
Attributes in groups and types are //ordered//.
===== ARDML =====
For ARD see [[hekate:ardplus]]
and
[[hekate:bib:hekate_bibliography#gjn2008flairs-ardformal]]
[[hekate:bib:hekate_bibliography#gjn2008flairs-ardprolog]]
...
...
...
===== ARDML - Defining ARD+ Properties =====
* Basic syntax:
...
...
...
===== ARDML - Defining ARD+ Properties =====
* Properties are defined in ''...'' section. This section must contain all properties which are being used in an ARD diagram.
* Single property is defined by '''' tag
* Single property contains any number of attributes. A list of attributes is defined by ''''
===== ARDML - Defining TPH Diagram =====
* Basic syntax:
...
* TPH diagram is definied in ''...'' section. TPH diagram contains relationships called transformations.
* A transformation is defined with the '''' tags and it describes the development between a source (''src'') and destination (''dst'') properties.
===== ARDML - Defining Dependencies =====
* Basic syntax:
...
...
* ARD dependencies begin with the '''' tag. The tag does not have attributes. Each dependence is defined with a a pair of properties: an ''independent'' and a ''dependent'' one.
===== XTTML =====
For information on the XTT itself [[hekate:xtt2|see here]].
An XTT diagram (''xtt'' element) consists of some number of XTT tables (the ''table'' element).
The above example can be read as:
xtt_1:
rule_1: if att_0 in <1,5>u{8} then att_1 = att_0 + 1 and att_1 = 5 + sin(att_0)
===== XTTML - Schema =====
* Element ''schem'' describes precondition and conclusion attributes that are allowed to be used in a particular XTT table.
* The schema is generated by the ARD->XTT transition algorithm directly from ARD.
===== XTTML - Rule =====
* A rule (''rule'') consists of a condition (''condition'') part and a decision part (''decision'').
* The condition is composed of the [[hekate:ALSVFD]] formulas, that specify certain''relation''s between attribute values and given set of values.
* The decision part is decomposed into two parts:
* state ''trans''istion that can specify new state (attribute values), and
* external ''action'' to be executed; it is assumed it does //not// infulences the state in any way.
* Each rule can explicitly transef the inference to a next table (possibly also a rule).
===== State specification =====
* Number of named system states can also be specified. A single state is a vector of attribute values.
===== HML implementation and support =====
* HML is used to serialize the knowledge in the HeKatE project in a machne redable format.
* It is used to interchange knowledge between the tools forming the [[hekate:HaDEs]] framework.
* HML syntax has been designed to:
* correspond to the logical system formulation with [[hekate:XTT2]] based on the [[hekate:ALSVfd]] logics, and
* match the syntax of //HMR// (the HeKatE Meta Representation) as supported by //[[hekate:HeART]]// - the HeKatE runTime environment.