Spis treści

View page as slide show

Hekate Markup Language

Introduction

Introduction

Introduction

<hml>
  <!-- attml starts here -->
  <types>
    ...
  </types>
 
  <attributes>
    ...
  </attributes>
  <!-- attml ends here -->
</hml>

Introduction

<hml>
  <!-- ardml starts here -->
  <properties>
    ...
  </properties>
 
  <tph>
    ...
  </tph>
 
  <ard>
    ...
  </ard>
  <!-- ardml ends here -->
</hml>

Introduction

<hml>
  <!-- xttml starts here -->
  <xtt>
    ...
  </xtt>
  <!-- xttml ends here -->
 
  <!-- extra system state specification -->
  <states>
  </states>
</hml>

HeKatE markup history

HML syntax

HML syntax

HML syntax

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 see here.

  <types>
    <type id="tpe_1" name="Temperature" base="numeric" length="5" scale="0">
      <desc>represents a temperature</desc>
      <domain>
        <value from="1" to="5"/>
        <value is="7" />
        <value from="20" to="22"/>
        <value is="26" />
        <value is="27" />
      </domain>
    </type>
    <type id="tpe_2" name="Integer" base="numeric" length="5" scale="0">
      <desc>represents an integer number</desc>
      <domain>
        <value from="-10000" to="10000"/>
      </domain>
    </type>
  </types>
 
  <attributes>
    <attr id="att_1" type="tpe_1" name="temp" abbrev="t1" class="simple" comm="in">
      <desc>input temperature from sensor number 1</desc>
    </attr>
    <attr id="att_2" type="tpe_1" name="temp-aux" abbrev="t1a" class="general" comm="in">
      <desc>input temperature from sensor number 1, aux reading, including historic data</desc>
    </attr>
 
    <agroup id="grp_1" name="sensors" abbrev="sns">
      <desc>temperatures from sensors</desc>
      <attref ref="att_1"/>
      <attref ref="att_2"/>
    </agroup>
 
  </attributes>

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 ardplus and gjn2008flairs-ardformal gjn2008flairs-ardprolog

<hml>
  <types>
    ...
  </types>
 
  <attributes>
    <attr name="Thermostat" id="att_0"/>
    <attr name="Time" ... />
  </attributes>
 
  <properties>
    <property id="prp_1">
      <attref ref="att_0"/>
    </property>
    <property id="prp_2">
      <attref ref="att_0"/>
      <attref ref="att_1"/>
    </property>
    <property id="prp_3">
      <attref ref="att_0"/>
    </property>
    <property id="prp_4">
      <attref ref="att_1"/>
    </property>
    <property id="prp_5">
      <attref ref="att_0"/>
    </property>
  </properties>
 
  <tph>
    <hist id="hst_01" src="prp_1" dst="prp_2"/>
    <hist id="hst_02" src="prp_2" dst="prp_3"/>
    <hist id="hst_03" src="prp_2" dst="prp_4"/>
    <hist id="hst_04" src="prp_4" dst="prp_5"/>
  </tph>
 
  <ard>
    <dep id="dep_01" independent="prp_1" dependent="prp_2"/>
    <dep id="dep_02" independent="prp_2" dependent="prp_3"/>
    <dep id="dep_03" independent="prp_3" dependent="prp_4"/>
    <dep id="dep_04" independent="prp_2" dependent="prp_4"/>
  </ard>
 
  ...
  ...
</hml>

ARDML - Defining ARD+ Properties

<properties>
          <property id="prp_1">
               <attref ref="att_0"/>
               ...
               <attref ref="att_ad003"/>
          </property>
		...
          <property id="prp_2">
               <attref ref="att_44"/>
               ...
               <attref ref="att_2"/>
          </property>
</properties>

ARDML - Defining ARD+ Properties

ARDML - Defining TPH Diagram

     <tph>
          <hist src="prp_1" dst="prp_2"/>
          <hist src="prp_2" dst="prp_3"/>
          <hist src="prp_2" dst="prp_4"/>
		...
          <hist src="prp_n" dst="prp_m"/>
     </tph>

ARDML - Defining Dependencies

<ard>
     <dep independent="prp_1" dependent="prp_2"/>
     <dep independent="prp_2" dependent="prp_3"/>
     ...
     <dep independent="prp_x" dependent="prp_y"/>
     ...
     <dep independent="prp_x" dependent="prp_z"/>
</ard>

XTTML

For information on the XTT itself see here.

  <xtt>
    <table id="tab_1" name="first">
      <schm>
       <precondition>
         <attref ref="att_1"/>
       </precondition>
       <conclusion>
         <attref ref="att_0"/>
       </conclusion>
      </schm>
      <rule id="rul_1">
       <condition>
         <relation name="in">
           <attref ref="att_0"/>
           <set>
             <value from="1" to="5"/>
             <value is="8"/>
           </set>
         </relation>
       </condition>
       <decision>
          <trans>
           <attref ref="att_1"/>
            <expr name="add">
             <attref ref="att_1"/>
            <value is="1"/>
           </expr>
          </trans>
          <trans>
           <attref ref="att_1"/>
            <expr name="add">
              <value is="5"/>
              <expr name="sin">
                <attref ref="att_0"/>
             </expr>
           </expr>
          </trans>
       </decision>
       <link>
         <tabref ref="tab_1"/>
       </link>
      </rule>
    </table>
  </xtt>

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

XTTML - Rule

State specification

<states>
  <state id="sta_1" name="start">
    <attref ref="att_0"/>
    <set>
      <value from="1" to="5"/>
      <value is="8"/>
    </set>
    <attref ref="att_1"/>
    <set>
      <value from="1" to="5"/>
    </set>
  </state>
</states>

HML implementation and support