C H A I M S: Compiling High-level Access Interfaces for Multi-site SoftwareTowards the Science of Component Engineering |
The CHAIMS Data types Control flow and Boolean expressions The CHAIMS primitives
The While loop is a control mechanism used before making invocations
which depend on termination of previous event(s).
WHILE ( Boolean Expression) Statement_list
The If statement is a control mechanism used before making invocations which depend on the value of previous result(s).
IF (Boolean Expression) THEN Statement_list
[Else Statement_list ]
The SETUP call establishes communication with a designated megamodule.
moduleID = SETUP (<megamodulename>)
Output:
moduleID is a megamodule_handle.
It is an identifier for the connection. Future invocations to the megamodule
designated by megamodulename are specified using moduleID
(see other CHAIMS calls below). As any megamodule_handle, it is automatically
set by CHAIMS.
The SETATTRIBUTES call is used to establish any global parameters that
are not invocation specific.
moduleID.SETATTRIBUTES (<parameter1_name>
= <parameter1_value>,
<parameter2_name> = <parameter2_value>,
.....
<parameter_n_name> = <parameter_n_value>)
moduleID is the connection identifier established by a previous
call to SETUP.
parameter_i_names are global attributes of the megamodule identified
by moduleID.
There is no order required in the parameter list for the SETATTRIBUTE
call.
Output:
None.
The GETATTRIBUTES call returns the values of the global attributes of
the megamodule.
objectAttributes = moduleID. GETATTRIBUTES
()
moduleID is the identifier for the connection established
by a call to SETUP.
Output:
objectAttributes is a <attribute_value_list> which is identical
to the <parameter_value_list> set in the SETATTRIBUTE primitive.
The ESTIMATE call returns an estimation of the would-be cost of a specific
method invocation.
value = moduleID.ESTIMATE (<methodname>)
moduleID is the module identifier created by the SETUP call.
Output:
value is an integer.
It gives the cost in time (seconds) that would generate the invocation
of <methodname>.
The INVOKE call starts the execution of a specified method.
invokeID = moduleID.INVOKE (<methodname>, <parameter_value_list> )
moduleID is the module identifier created by the SETUP call.
<parameter_value_list> is defined in the exact same manner as the parameters to SETATTRIBUTES shown above. There can be as many arguments declared as the megamodule wrapper or native CHAIMS megamodules will support. As with the SETATTRIBUTES call, order of the input arguments is irrelevant as long as they follow methodname.
Output:
invokeID is an invocation_handle.
It is an identifier for the invocation. Future calls to EXAMINE and
TERMINATE will refer to this identifier so that the correct process is
identified. As any handle, it is automatically set by CHAIMS.
The EXAMINE call is used to determine the state of the invocation referred
to by invokeID.
status = invokeID.EXAMINE ()
invokeID is the invocation identifier assigned in the INVOKE
call above.
Output:
status is of type Invocation_Status.
It is an object that holds the result of the examine call. This can
be any of {DONE, NOT_DONE}.
The EXTRACT call collects the results of an invocation within an object.
It is presumed this will generally be an ASN.1 object (datablob).
extract_output = invokeID .EXTRACT ()
invokeID is the invocation identifier assigned in the INVOKE call above.
Output:
extract_output is a datablob.
It is the object that holds the result of the invocation.
The TERMINATE call kills either a running invocation or a connection
to the megamodule.
Killing a connection to a megamodule kills all the running invocations
within this megamodule as well.
moduleID.TERMINATE () ~OR~
invokeID.TERMINATE ()
moduleID is the identifier for the connection established by
a call to SETUP.
invokeID is the identifier for an invocation established by
a call to INVOKE.
Output:
None.
Get the data structure of a certain parameter.
param_data = moduleID.GETPARAM (<methodname>,
<parametername>)
<parametername> is a string.
It specifies the name of the parameter for which we need a default
datablob (see below).
Output:
param_data is a datablob.
It is a default datablob containing the names, types and default values
of all the attributes of the parameter whose name is <parametername>.
db 6/16/98