.\" @(#)introduction	1.6	12/12/92
.H1 "Introduction
.pp
One of the key objectives of the \*(PT design environment
is to support the coexistence and interaction of diverse
computational models, called \fIdomains\fR.
.IE domains
For instance, a dataflow domain can exist within a discrete-event
domain, so that for example
a signal processing subsystem can be cleanly incorporated
within a communication network simulation.
This mixing of domains is one of the primary research objectives
of the \*(PT project.  We do not consider all problems solved,
and some details of the domain construction and inter-domain interface
may change in the future.
.pp
In the \f6Ptolemaic\fP cosmology, elementary functional blocks are called 
.c Star s,
higher level blocks are called 
.c Galaxy s,
and an entire
application is called a 
.c Universe .
The domain of a star
is specified in the star's definition and determines its class
ancestry.  For example, all stars
in the SDF domain are derived from the
.c SDFStar
class.
.IE "SDFStar class"
The domain of a galaxy or universe must be
explicitly specified by setting its domain property.
The command in the \*(PT graphical interface
for doing this is ``edit-domain''
and in the interpreter is ``domain \fIname\fP''.
If not otherwise specified, the domain of a galaxy is the
same as that of the galaxy or universe it sits within.
If the domain is specified to be different than that of
the galaxy or universe it sits within,
then the galaxy is realized as an object called a
.c Wormhole .
.IE Wormhole
Once a
.c Wormhole
is created, it behaves externally like a
.c Star .
In other words, to the external domain, it looks like
a monolithic object with no internal structure of interest.
Internally, however, it encapsulates an entire foreign
domain invisible from the outside domain.
By this mechanism,
the internal computational model can be totally different
from the external model, in that the specification language,
operational semantics, and scheduling paradigm can be different.
Wormholes, therefore, are the primary mechanism in \*(PT for
supporting heterogeneity.
.pp
When the scheduler
of the outer domain fires the wormhole ,
the inner scheduler is invoked for the inner
galaxy until some specified stopping condition is met.
At that time, control returns to the scheduler
of the outer domain.
Of course, a wormhole may contain other wormholes.
This document explains the mechanism of the domain interface,
.IE "domain interface"
and documents how to create new domains in \*(PT.
Of necessity, the explanation is somewhat sketchy.
To write a new domain, using the source code of an existing domain
as a model is a good idea.
