Schooner C Stub Compiler (schc)
The C stub compiler of Schooner translates specification files
written using the
procedure specification language of
Universal Type System (UTS)
into stub files that are compilable using a C compiler.
The specification file must contain a specification for each
procedure that a user wishes made
available to other parts of the application (export) or intends to
make a remote procedure call to (import).
Import and export specifications have the following format:
import name prog ([types]) [returns (type)]
export name prog ([types]) [returns (type)]
UTS also provides the
external data representation
used in inter-procedure
communication in Schooner. The mapping between the UTS data types
and the C data types are shown in the three tables below. The
first table contains the mapping in which the two agree, so that
each has a direct counterpart in the other. The second
contains mappings for C types that do not fall into the
first category and the last contains mappings for
UTS types that have no exact C equivalent. Note that
some of the entries in the third section are marked as merely
representations. This indicates that the C type listed is used
only to store the data and that the UTS data should not be thought of as
obeying the semantics of the C type. The dashes
indicate UTS types that cannot be mapped directly into C;
such types must be represented using the UTS libraries.
Two-Way Mappings
C Type UTS Type
long integer
float float
double double
char byte
char * string[n]
struct record
X name[n] array[n] of x
Y name(X) prog(x) returns (y)
void name(X) prog(x)