"A semantic domain in Ptolemy II, often just called a domain , defines the "laws of physics" for the interaction between components in a design. It provides the rules that govern concurrent execution of the components and the communication between components [...]. A collection of such rules is called a modelof computation (MoC). We will use the terms "model of computation" and "domain" (nearly) interchangeably, though technically we think of a domain as being an implementation of a MoC. The MoC is an abstract model, whereas the domain is its concrete implementation in software."
"The rules that constitute a model of computation fall into three categories. The first set of rules specifies what constitutes a component. In this book, a component is generally an actor [...]. The second set of rules specifies the execution and concurrency mechanisms. Are actors invoked in order? Simultaneously? Nondeterministically? The third specifies the communication mechanisms. How do actors exchange data?"
Below is the list of Ptolemy II domains in alphabetical order.
The Algebraic model of computation includes a director that solves algebraic loops.
As of August, 2014, this model of computation is under active development and should be seen as a work in progress.
The Cellular Automata (CA) model of computation uses the number of neighbors of a cell to determine if the cell lives or dies at the next iteration.
The CA domain was created by Zach Ezzell.
Cellular Automata Demonstrations
The component interaction (CI) domain models systems that blend data-driven and demand-driven styles of computation. As an example, the interaction between a web server and a browser is mostly demand-driven. When the user clicks on a link in the browser, it pulls the corresponding page from the web server. A stock-quote service can use a data-driven style of computation. The server generates events when stock prices change. The data drive the clients to update their displayed information. Such push/pull interaction between a data producer and consumer is common in distributed systems, and has been included in middleware services, most notably in the CORBA event service. These services motivated the design of this domain to study the interaction models in distributed systems, such as stock-quote services, traffic or weather information systems. Other applications include database systems, file systems, and the Click modular router.
An actor in a CI model can be active, which means it possesses its own thread of execution. For example, an interrupt source of an embedded system can be modeled as an active source actor. Such a source generates events asynchronously with respect to the software execution on the embedded processor. CI models can be used to simulate and study how the embedded software handles the asynchronous events, such as external interrupts and asynchronous I/O.
Component Interaction Demonstrations
The Continuous Time Model of Computation defines a semantics used for continuous-time simulations. Continuous Time models consist of Actors that have continuous time signals as their inputs and outputs, and may have a state that changes over time advancement. These actors are connected by relations denoting particular signals. At a sequence of time increments, the values of all signals are determined using a continuous time solving algorithm. If a given precision cannot be accomplished, finer time increments are used adaptively.
The domain models systems with continuous dynamics, including for example analog circuits and mechanical systems, but also cleanly supports discrete events, modal behaviors, and signals that mix continuous-time behaviors with discrete events. Models for continuous dynamics are equivalent to linear or nonlinear integral equations. A sophisticated numerical solver for these equations is integrated with the director. The clean semantics of the Continuous domain enables its integration in hierarchical heterogeneous models that use the Synchronous/Reactive (SR) and Discrete Event (DE) domains. Arbitrary hierarchical mixtures of these domains are supported, although if SR is at the top level, then the period parameter of the director must be used so that time advances. Domain interactions are documented in Lee and Zheng, 2007.
The clean semantics of the Continuous domain enables its integration in hierarchical heterogeneous models that use the Synchronous/Reactive (SR) and Discrete Event (DE) domains. Arbitrary hierarchical mixtures of these domains are supported, although if SR is at the top level, then the period parameter of the director must be used so that time advances. Domain interactions are documented in Goderis et al.
$PTII/doc/books/systems/PtolemyII_DigitalV1_02.pdf
)
The Communicating Sequential Processes (CSP) domain in Ptolemy II models a system as a network of processes communicating with messages through unidirectional channels. If a process is ready to send a message, it blocks until the receiving process is ready to accept it. Similarly if a process is ready to accept a message, it blocks until the sending process is ready to send it. Thus the communication between processes is rendezvous based as both the reading and writing processes block until the other side is ready to communicate. This model of computation is non-deterministic as a process can be blocked waiting to send or receive on any number of channels. It is also highly concurrent due to the nature of the model.
The model of computation used in the CSP domain is based on the CSP model first proposed by Hoare[2] in 1978. In this model, a system is modeled as a network of processes communicating via messages along unidirectional channels. This is the only way processes can communicate as there is no shared state. The transfer of message between processes is via rendezvous, which means both the sending and receiving of a messages from a channel are blocking: i.e. the sending or receiving process stalls until the message is transferred. Some of the notation used here is borrowed from Andrews' book on concurrent programming [1], which refers to rendezvous-based message passing as synchronous message passing.
Applications for the CSP domain include resource management and high level system modeling early in the design cycle. Resource management is often required when modeling embedded systems, and to further support this, a notion of time has been added to the model of computation used in the domain. This differentiates our CSP model from those more commonly encountered, which do not typically have any notion of time, although several versions of timed CSP have been proposed[3]. It might thus be more accurate to refer to the domain using our model of computation as the "Timed CSP" domain, but since the domain can be used with and without time, it is simply referred to as the CSP domain.
Communicating Sequential Processes Demonstrations
The DDE domain's use of time serves as the point of divergence in the respective designs of DDE and PN. Time progress is communicated between actors by passing tokens that have time stamps associated with them. In a network of DDE actors each actor has a local notion of time. To facilitate this local notion of time, actors in a DDE model adhere to the following constraints.
We are approaching the DDE model of computation as the intersection between dataflow and discrete event semantics. This allows us to study DDE semantics from two different perspectives. In particular, we can benefit from denotational semantics that are based on metric spaces (the Banach oriented DE approach) or posets (the Tarskian oriented dataflow approach). Matthews offers a partial metric topology which incorporates both of these mathematical tools.
The DDE domain is an experimental domain, the code has not been reviewed, and the interfaces are likely to change.