ROIS
The flavour of NPL
A simple module Example is presented to show the flavour of the language. The task openModel opens a model in the file $file for access and returns an identifier for this model.
The task symptomsOfDisease receives a node class representing a disease from the client application, the symptoms are selected from @model and copied to `symptoms. Then the network containing the symptoms is returned to the requesting client application.
MODULE Example;
CLIENT TASK openModel $file :@model;
BEGIN
OPEN $file AS @model;
END openModel;
CLIENT TASK symptomsOfDisease @model %disease :`symptoms;
BEGIN
FROM @model TO `symptoms
SELECT NODES %disease.hasSymptom.possible.?symptom;
END symptomsOfDisease;
END Example