Suppose we wish to define a new domain, called
XXX
. We would define a set of C++ classes derived from kernel base classes to support this domain. These classes might be called XXXStar
, XXXUniverse
, etc., as shown in figure
1-4.The semantics of a domain are defined by classes that manage the execution of a specification. These classes could invoke a simulator, or could generate code, or could invoke a sophisticated compiler. The base class mechanisms to support this are shown in figure 1-5
Target
is the top-level manager of the execution. Similar to a Block
, it has methods called setup
, run
, and wrapup
. To define a simulation domain called XXX
, for example, one would define at least one object derived from Target that runs the simulation. As suggested by figure
1-5, a Target can be quite sophisticated. It can, for example, partition a simulation for parallel execution, handing off the partitions to other Targets compatible with the domain.A Target will typically perform its function via a Scheduler. The Scheduler defines the operational semantics of a domain by controlling the order of execution of functional modules. Sometimes, schedulers can be specialized. For instance, a subset of the dataflow model of computation called synchronous dataflow (SDF) allows all scheduling to be done at compile time. The Ptolemy kernel supports such specialization by allowing nested domains, as shown in figure 1-6