Fork me on GitHub

Module Specification

Each Artificial Intelligence Module is specified with a so-called Interface Description Language (IDL) file. A standard compiler (omniORB) is used to check if this file is written according to the IDL specs. The IDL specifications restrict for example the support for data types, so that it becomes easier to do cross-language development.

The modules in the AIM framework have the following properties:

Specification details

An IDL file describes the module with only that much detail that is necessary for building and deployment within the AIM framework.

#pragma author               Developer
#pragma copyright            Organisation
#pragma date                 Jan 21, 2014
#pragma license              GNU General Lesser Public Licence

// Recommended namespace "rur"
module rur {

// A nice name to our class
interface MovingAverageModule {

  // Input, a series of values
  void Input(in long input);
  
  // Output, the moving average
  // @backend zeromq
  void Average(out long output);

};
}

Pragmas

There are several pragmas supported that will be used at several places later on in the build or deployment process.

Module

The keyword module indicates the binary unit. It will be cast in the C++ world to a namespace.

Interface

The interface has a single requirement, it has to end with Module.

Methods

The methods have normal signatures as in for example C++ or Java, but with a twist. There is an additional keyword: in or out. The methods in the AIM framework are also called ports that make this directional property clear. A method declaration is transformed into a standard C++ method:

inline int *readInput(bool blocking=true) {
  ...
}

And:

bool writeAverage(int *output) {
  ...
}

Several remarks:

See also

The IDL module specification is also used for the deployment specification. This means you can write your proprietary code and deploy it on the Dodedodo architecture if provided with the proper deployment specification.

Site last rendered 30 May 2014