Home Contact

about us
white paper

KET Application Interface

KET API is used to call modules and specific functions inside those modules. In the text below we explain what categories of API software exist in the KET tool kit. We also cover some specifics features of each category and degree of flexibility that API allows.

Categories of API

KET interfaces can be subdivided into five types:


Calls of functions in a conventional procedural style. In this case, the initiator of the call (a developer) has to have understanding of necessary parameter types and the order of parameters.


Knowledge Extraction Language (KEL) as a convenient alternative. KEL has a 4GL style syntax The call requires to pass a string that contains only semantic information.


Servers, which are executables capable to perform operations by reacting to messages from other applications.


Self-referencing FORTH (SELFF) - a Forth-like language, which has a mechanism for modification of its own programs that makes many sophisticated algorithms compact.


Customized interfaces, which can be created for a customer if it is architecturally desirable to have an interface with additional features motivated by the host application.

These categories are explained in more details below.

Conventional Procedural Calls

Conceptually, it is a simple category, because it has a form traditional for the most API libraries. We only point out here, that some of the KET modules are available in different forms: as Windows DLLs, Sun runtime libraries, C++ object code, Delphi units, etc. Therefore, developers can make a decision about an appropriate version of the module.

Call conventions will depend on the version. For example, in C++ object code we could use a call prototype like this:

void essential_variables(vector<vector<string> > matr,  int response, float info_threshold, vector<int> &target_list);

so that, the call would be something like

essential_variables(matr, 15, 0.01, target_list);

where matr has type vector<vector<string> > and target_list has type vector<string>.

On the other hand, the prototype above would not be appropriate for DLLs working in a more universal environment.


This is a 4GL calling convention, which requires less special knowledge about the process to initiate. To give a simple example, let's consider the called mentioned in the previous section. The same process could be inviked in KEL as follows:

KET(find essential variables target_file in matr_file with response 15 and threshold 0.01);

Of course, in this case too some syntactic conventions should be observed, but the required knowledge about parameters is rather semantic than low-level syntactic: all parameters are strings and only their semantics is essential, also the syntax itself prompts the order of parameters. 

KEL can be used in different ways. Particularly, multiple requests can be passed in one call (with the semicolon delimiter). In addition to that a file name with a script can be passed instead of the explicit request.


As an alternative approach, program units responding to a KET process request can be stand-alone executables, which may have their own GUI and can be used just as autonomic applications. This type of interface is especially useful when the architecture of the whole system is designed as a distributed system and/or servers have to respond both to requests from outside and from their own GUI interface. . 

KET servers are compatible with KEL, because KEL engine transforms KEL requests into appropriate server calls.


Interpreter of KET requests more sophisticated than KEL is SELFF engine (the abbreviation stands for "Self-referencing Forth").

Nowadays not many people remember that Forth language was one of first 4GLs. The SELFF language is not really Forth, it just borrows several important concepts from Forth and goes much beyond. Particularly, it incorporates a mechanism that can switch between interpretation of a memory unit as data and program command in a very compact and efficient way. So, the program that modifies its own code has a quite concise representation and this becomes easy and worth wile to do.

The approach adopted in SELFF may lead to striking differences from conventional programming styles. For example, an algorithm of any complexity and structure can be represented without loops (as the reader can guess, due to recursive calls), recursive approach is not associated with overhead and restrictions usual for other languages and it is used much more intensively than in other programming styles.

Customized Interfaces

Sometimes the host application architecture makes it desirable to incorporate special interfacing requirements into the interface itself instead of writing conversion-type fragments external to KET. A typical motivation is developer's intention to streamline inter-module interaction in favor of higher performance. KET, LLC provides this type of services.



Knowledge Extraction Tools, LLC. 12236 Shady Hollow Lane. Northridge, CA 91326.






  New feature !!

A new KET module was introduced recently to support interaction with "Mathematica 8" system.


  News !!

KET, LLC joined BioMed Content Group, Inc. in initiative of using AI agents to facilitate work of physicians and educators.

Copyright 2002-2006, Knowledge Extraction Tools, LLC. All rights reserved