EDL

Each entity in KasperskyOS must be described in the Entity Definition Language (EDL), in a separate file named <entity name>.edl. We continually work to lower the barrier to entry into the technology. Therefore, the EDL language has an extremely simple syntax.

An EDL file contains the following sections—the order is important:

  1. Name of the entity. Required section beginning with the reserved word entity, which is followed by the entity name.
  2. Security interface used by the entity. This section is optional. It must be added only if the entity uses a security interface. It is declared by the reserved word security. We will look at security interfaces later.
  3. List of instances of components included in the entity. This section is optional. It should be added if the entity provides functionality to other entities. Each component instance is specified with a separate string in the following format:

    <component instance name>:<component name>

    For each specified component, a separate file named <component name>.cdl needs to be created, containing a description of the component in the CDL language. Multiple instances of the same component can be added to an entity, and each instance can have a separate state (see the example of uart_driver entity below).

Strictly speaking, in the EDL file of the entity, the entity class name (EIID) is specified instead of the entity name. However, the KasperskyOS Education Kit has a limitation on starting entities: you can start no more than one entity of each class. Therefore, in practice, the name of each entity simply corresponds to its EIID.

EDL supports single-line comments and multi-line C++-style comments:

/* This is a comment

And this, too */

// Another comment

Examples of EDL files

At its simplest, the entity does not use a security interface and does not provide functionality to other entities, like the hello entity from the hello example. An EDL description for such an entity contains only the reserved word entity and the entity name.

hello.edl

// Entity name: hello

entity hello

In the following example, the uart_driver entity contains two instances of the uart_comp component: one for each UART device.

The uart_driver entity does not use a security interface.

uart_driver.edl

// Entity name: uart_driver

entity uart_driver

// uart0 and uart1 are the names of instances of the uart_comp component

// that are responsible for two different devices

uart0: uart_comp

uart1: uart_comp

Page top