Hierarchical Timing Language


The main goal of the project is to implement full semantics of the Hierarchical Timing Language using Exotask framework. The Exotask HTL framework consists of two parts: (1) the Eclipse plug-in which can be used during development of a real-time application, and (2) the runtime which contains all classes needed to run an Exotask HTL real-time application.


All the source code on this page is under: The MIT License

Download and Installation

You can download source code here.
You can download Exotask HTL plug-in binary distribution here.
You can download Exotask HTL runtime binary distribution here.

Before you install Exotask HTL project you have to make sure that you have already installed the Exotask framework (for details on how to install Exotask framework click here). After you have successfully installed Exotask frame you just have to unzip the plug-in binary distribution of the Exotask HTL Editor into Eclipse "plugins" directory.

Short description on how the graphical editor works.

After the Exotask HTL plug-in was installed a new timing grammar is added to the Exotask editor palette, the new timing is called HTL Timing. An HTL Timing grammar has the following properties:

  • Program List – specifies the list of program in the HTL program
  • Module List – specifies the list of modules in the HTL program, each module has to belong to one and only one program
  • Mode List – specifies the list of modes in the HTL program, each mode belongs to one and only one module and can be refined by a program
Defining the HTL program structure (e.g., define programs, modules and modes) has to be done prior to added any other element to the graph. All the elements that can be added to an exotask graph have to types of properties: (a) properties common to all grammars, and (b) properties specific to each grammar, here I will discuss only those properties that are specific to HTL Timing grammar.

Communicator - a communicator has a period (the period specifies how often communicator can be accessed, e.g. read or written), and belongs to one and only one program.

Exotask - an exotask can be abstract or not, can have a parent task, and has to specify a list of modes in which the task can be invoked. An abstract exotask is just a place holder for a task that is invoked in one of the modes in the refining programs; it will not be invoked at runtime. Any task invoked in a refining program has to specify a parent task. Two tasks can not be invoked in two different modes that can be run in parallel.

Predicate - has to specify a list of modes in which it will be invoked, and one destination mode. Two predicates can not be invoked in two different modes that can be run in parallel

Connection - has to specify the list of modes in which the connection is invoked, if the connection reads or writes a communicator then it has to specify an instance greater then -1, otherwise the instance has to be equal to -1 (the instance represents the instance of the communicator being accessed relative to the period of the mode in which the connection is invoked), if a connection writes to a communicator then the “Write Communicator” property has to be set to true. Two connections can not be invoked in two different modes that can be run in parallel.

Case study

The case study consists of a simple program that adds a value to a counter until a threshold (we call this addition threshold) is reach, after the addition threshold was reached the value is subtracted until the subtraction threshold is reached, when we switch back to addition. The value of the addition step gets higher as the value of the counter gets closer to the addition threshold. The value of the subtraction step gets lower as the value of the counter gets closer to the subtraction threshold. In parallel with the addition or subtraction operations another counter is multiplied or divided with a certain factor, again the factor that the counter is multiplied (divided) increases (decreases) as the counter value gets closer to the multiplication (division) threshold.

The HTL Exotask program consists of a root program with three modules: one module for the addition and subtraction, one module for multiplication and division, and another module that writes the values of the counters. The root program also contains two communicators one for each of the two counters. The addition and subtraction module contains one mode that is refined by a program which contains one module with two modes (one for addition and the other one for subtraction), the two modes can switch from one another, the two modes are farther refined by two programs each of them contains one module and three modes, so that we have there different addition (subtraction) steps. The structure of the multiplication (division) module is similar to that of the addition (subtraction) module that was previously presented.

You can download case study source code here.