In Ptolemy, domains can be mixed and even nested. Thus, a system-level description can contain multiple subsystems that are designed or specified using different styles. The kernel support for this is shown in figure 1-7
XXXdomain is derived from
XXXStar, so that from the outside it looks just like a primitive in the
XXXdomain. Thus, the schedulers and targets of the
XXXdomain can handle it just as they would any other primitive block. However, inside, hidden from the
XXXdomain, is another complete subsystem defined in another domain, say
YYY. That domain gets invoked through the
XXXWormhole. Thus, in a broad sense, the wormhole is polymorphic. The wormhole mechanism allows domains to be nested many levels deep, e.g. one could have a DE domain within an SDF domain within a BDF domain. The FSM domain is designed to always be used in combination with other domains.