eggbird
software development and
knowledge engineering

Mail

ROIS

Implementation

When the analysis document is finished, you can start the implementation document which is a copy of the analysis document complemented with ROIS specific information. Remember, the analysis document is not dependent on any system, so in the future it could be used as a basis for another implementation of the application, thus keep it in a safe place!

The implementation document translates the classes and relationships from the ontology into ROIS node and link classes. In most cases, this translation is straightforward, but sometimes a class from the ontology is better represented by a combination of node and link classes. You may also want to add extra (abstract) node classes or link classes which group the other node and link classes.

An important consideration is whether and how you will use the ROIS sanctioning mechanism. Proper use of the sanctioning mechanism prevents the creation of links that are not valid according to the ontology. For this you will need to define ROIS qualifiers and their properties.

Finally, you are ready to start the implementation. Idefix is the integrated ROIS NPL editor and compiler. When you create a new NPL module Idefix will automatically add the required frame work for a ROIS NPL module. The first thing you will need is a task to create a ROIS model with your ontology. It is recommended that you use the following name and parameters for this task:

TASK createModel $file :@model

This task should create a ROIS model with the file name specified by the parameter $file and then add your ontology to the ROIS model.

For example (the indentation is just there to promote readability):

// this task creates an ontology concerning
// birds and their features.
TASK createModel $file :@model;
BEGIN
  CREATE $file AS @model;

  UPDATE @model
    ADD NODECLASS 'Bird'
          PARENTS topNodeClass;
    ADD NODECLASS 'Feature'
          PARENTS topNodeClass;

    ADD LINKCLASS 'hasFeature'
          INVERSE 'isFeatureOf'
          PARENTS irreflexiveLinkClass antiSymmetricalLinkClass
      CARDINALITY manyMany;

    ADD LINKCLASS 'canFly'
          PARENTS hasFeature
      CARDINALITY manyOne;

    ADD QUALIFIER 'allowed'
    SANCTIONED BY systemSanction
       PROPERTIES sanctioning
      INHERITANCE normal;

    ADD QUALIFIER 'normalInherited'
    SANCTIONED BY allowed
       PROPERTIES irreflexive antisymmetrical inverse
      INHERITANCE normal;

    ADD QUALIFIER 'defaultInherited'
      NCTIONED BY allowed
       PROPERTIES irreflexive antisymmetrical inverse
      INHERITANCE default;

    ADD LINK Bird.hasFeature.allowed.Feature;
    ADD LINK Bird.hasFeature.allowed.topBoolean;
END createModel;

You will also need tasks: