Logo 

C H A I M S: Compiling High-level Access Interfaces for Multi-site Software

Towards the Science of Component Engineering 
Logo 

CHAIMS Semantics, version 2.0

 
This document describes the CHAIMS language's semantics, version 2.0 which consists in: New features of CHAIMS language, version 2.0 are under implementation.
To have a look at the CHAIMS syntax, version 2.0, click here.

updated by ns, 5/27/99, updates to EXAMINE, removed date type


The CHAIMS basic elements

Data types The first five types are simple CHAIMS types, the last one (opaque)  is a complex type.
Elements of type opaque are exclusively used as user data (i.e. megamodule data) and are not modifiable. They are transferred between megamodules but not processed in the megaprogram.

Literals

Literals can only be assigned for the simple types.  Examples are given in parenthesis.

Megaprogram's elements
  • programname

  • Programname refers to the megaprogram's name. It is a string literal.
     
  • megamodulename

  • Megamodulename refers to the name of the megamodule the megaprogram is willing to interact with. It is string literal.
     
  • methodname

  • Methodname refers to the name of the method the megaprogram is willing to invoke within the megamodule. It is a string literal.
     
  • parametername

  • Parametername refers to the name of a parameter given as an input when calling a method in a megamodule megamodulename. It can be any of the CHAIMS data types (simple as well as complex).
    The parameternames that appear in the INVOKE, EXTRACT, GETPARAM, EXAMINE, and SETPARAM primitives are the parameternames as listed in the repository. Valid parameternames for GETPARAM and SETPARAM are all parameternames listed in all methods of the specific megamodule or any global variable of the megamodule; valid parameternames for INVOKE and EXTRACT are all parameternames listed in the specific method of the megamodule. The parameternames for ESTIMATE are predefined and are: time of type datetime, and fee of type integer (in US$).
     
  • dataname

  • Dataname refers to data obtained from a megamodule, and can represent data of any CHAIMS data types. A dataname that stands for a boolean expression must of course be of type boolean, otherwise a semantic error occurs. The CHAIMS language is not explicitly typed, i.e. there is no type declaration for datanames in the megaprogram. Yet we specify the type of the parameters in the repository, so the user (and the compiler in case of semantic checks) can make sure that they do not use the wrong types for general helper modules.

    Operations in CHAIMS

    Comparison operators work for simple types only.

    Mathematical operators are not included in CHAIMS language but are invoked whenever necessary using "helper" megamodules. Types operations are then dependent on functionality provided by these megamodules.


    The CHAIMS primitives

    There are 8 CHAIMS primitives: SETUP, SETPARAM, GETPARAM, ESTIMATE, INVOKE, EXAMINE, EXTRACT, and TERMINATE. Also, two shortcut primitives have been defined.
      In addition to these primitives, the CHAIMS language offers two shortcut primitives :  INVEX  (for IVOKE-EXTRACT) and EXWDONE (for EXTRACT when DONE).

            INVEX

     EXWDONE


    Notes and examples:

    1- Hierarchical setting of parameters:

    When a method is started with INVOKE, the order of precedence for the value of its parameters is as follows: for any parameter,

    a) if INVOKE contains the parametername in its in_name_value_list, then the value specified in the list is taken; if it does not
    b) the client-specific value set by SETPARAM is taken; if there is none
    c) the default value hard-coded in the megamodule is taken (we currently assume there is such a default value for all parameters).
    2- Case of Invocation-specific, Client-specific, and Client-and-Method-specific primitives:

    The primitives INVOKE. ESTIMATE and EXTRACT are invocation specific. The parameters they set or the results they return are for/from one specific invocation, specified by the invocation handle (i.e. the values set by INVOKE or returned by EXTRACT do not overwrite default values previously set by SETPARAM or hard-coded in the megamodule, even though these new values have precedence over previous ones). Also TERMINATE  for invocation handles is invocation specific; it just kills the specified invocation.

    The primitives SETPARAM and GETPARAM are client specific (we could also call it megaprogram specific). The parameters they set or return are those set for this specific client/megaprogram (one megamodule may have several clients using it at the same time). These parameters will be used for all subsequent method invocations for which no invocation specific values are given with the INVOKE primitive. The parameternames may be used by just one method, or by several different methods with different methodnames. Also TERMINATE for megamodule handles is client specific; it kills all invocations of this client.

    The primitive ESTIMATE is client and method specific, but not invocation specific. The estimates it returns are for the specified methodname, and  for the parameter settings for the client asking for the estimates.

    3- A megaprogram example:

    To have an idea of how a megaprogram' structure looks like, please click here. This link points to the version 2.0 of the transportation megaprogram which is not implemented yet (a demo of version 1.1 is available).
     



    Back to the top of the page
     

    Logo Back to the CHAIMS homepage

    db 6/16/98