Logo

Compiling High-level Access Interfaces for Multi-site Software (CHAIMS)

Logo

CHAIMS Language Development



So far we decided the following points for the CHAIMS language:

1) Types
CHAIMS is an untyped language, similar to Perl in this regard.

2) The SETUP - Function:
The setup call will establish a variable that can be thought of as as handle to the megamodule. All calls to invoke are done via this handle. In order to free the megaprogrammer from this handler we thought of an implicit declaration. The handler has then the same name as the megamodule in the CHAIMS repository.

The syntax is as follows: In order to setup a Megamodule use: setup ("My_Megamodule"); The handler is then called My_Megamodule.

If any default values need to be set in the setup call (ie, values that will remain constant throughout all calls to the megamodule), this can be done in the setup call.
The syntax is as follows, where we want to set x equal to 4 for all calls to the megamodule:
setup ("My_Megamodule", x = 4);

3) The Estimate Function

Invoking function for a particular Megamodule Function gives back the cost for the Megamodule Function. We have not defined cost yet. It can be time, money, reliability, etc. or a combination of all.

4) The Examine Function

Invoking this function on a particular Megamodule Function gives back the status for the Megamodule Function. That is, done, still computing or error.

5) The Import Function

This function is not required. We think that it could be neat to have it in order to force the Megaprogrammer to define all the Megamodules he is going to use in his program.

6) The Terminate Function

This function terminates the connection to a Megamodule. We think it is not required, because it could be done implictly.

5) "Process" Handler

In order to distinguish between multiple invocations of the same function in the megamodules, we introduce the idea of a variable which is the return value of any invoke calls on a megamodule. This will enable the megamodule to preserve state since each variable will essentially work with a copy of the attributes of the megamodule.

The syntax is as follows, where we are calling a function "func1" in My_Megamodule.

My_Megamodule_Function_Handle = My_Megamodule.invoke ("func1", input_param, output_param);

There can be multiple input and output parameters. These are essentially untyped messages that are used to carry data between megamodules. The megaprogrammer does not need to worry much about the type of these input and output parameters. (IS THEIR ORDER SET IN THE REPOSITORY???) It is also possible that a call to invoke would not need either input or output parameters.

The name in quotes is the name of the megamodule function being called via the invoke statement. If a megamodule has single functionality then it is not necessary to specify the name, i.e.:

My_Megamodule_Function_Handle = My_Megamodule_Handle.invoke (input_param, output_param);

3/27/97 Meikel Poess