03.08.2013 Views

PTOLEMY II - CiteSeerX

PTOLEMY II - CiteSeerX

PTOLEMY II - CiteSeerX

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Introduction<br />

rency throughout, allowing for instance for a model to mutate (modify its clustered graph<br />

structure) while the user interface simultaneously modifies the structure in different ways. Consistency<br />

is maintained through the use of monitors and read/write semaphores [59] built upon the<br />

lower level synchronization primitives of Java.<br />

Fully integrated expression language. The Ptolemy <strong>II</strong> expression language is a higher-order, richly<br />

expressive language that is fully integrated with actor-oriented modeling. The type system inference<br />

mechanism propagates through expressions, parameters, and actor ports seamlessly.<br />

A software architecture based on object modeling. Since Ptolemy Classic was constructed, software<br />

engineering has seen the emergence of sophisticated object modeling [101][123][126] and<br />

design pattern [42] concepts. We have applied these concepts to the design of Ptolemy <strong>II</strong>, and they<br />

have resulted in a more consistent, cleaner, and more robust design. We have also applied a simplified<br />

software engineering process that includes systematic design and code reviews [119].<br />

1.5.7 Experimental Capabilities<br />

Ptolemy <strong>II</strong> includes a number of still evolving experimental capabilities. These include.<br />

Distributed models. Ptolemy <strong>II</strong> has (still preliminary) infrastructure supporting distributed modeling<br />

using CORBA, Java RMI, or lower-level networking primitives. Ptolemy <strong>II</strong> has (still preliminary)<br />

support for migrating software components.<br />

Higher-order components. Ptolemy <strong>II</strong> has a (still preliminary) library of actors that operate on<br />

Ptolemy <strong>II</strong> models rather than just on data. While Ptolemy Classic had such higher-order components,<br />

in Ptolemy Classic the manipulations of the model occurred as part of the initialization<br />

phase of the execution. In Ptolemy <strong>II</strong>, they can occur during the execution of the model. Examples<br />

include the MobileModel, which supports an actor-oriented version of mobile code, and ModalModel,<br />

which supports modal behavior.<br />

Lifecycle management components. Ptolemy <strong>II</strong> has a (still preliminary) library of actors that manage<br />

the lifecycle of other Ptolemy <strong>II</strong> models. Examples include RunCompositeActor, which on<br />

each firing performs a complete execution of the contained model, and ModelReference, which<br />

performs a similar function on a model defined in a separate file or URL.<br />

Component specialization. Ptolemy <strong>II</strong> has an evolving code generation mechanism that is very different<br />

from that in Ptolemy Classic. In Ptolemy Classic, each component has to have a definition in<br />

the target language, and the code generator merely stitches together these components. In Ptolemy<br />

<strong>II</strong>, components are defined in Java, and the Java definition is parsed. An API for performing optimization<br />

transformations on the abstract syntax tree is defined, and then compiler back ends can be<br />

used to generate target code. A preliminary implementation of this approach is described in [110],<br />

[134] and [135].<br />

Cal actor definition language. Actors have traditionally been defined in Java for Ptolemy <strong>II</strong>. However,<br />

static analysis of Java programs for properties that are important at the actor-oriented level is<br />

extremely challenging, at best, and impossible at worst. The Cal actor language provides a way to<br />

define actors so that these properties are statically inferable from the actor definition [35].<br />

Experimental models of computation. Ptolemy <strong>II</strong> includes a number of experimental models of<br />

computation, including Giotto [52], timed-multitasking [91], distributed discrete-events [31], and<br />

a push-pull component model called component interaction (CI) [141].<br />

38 Ptolemy <strong>II</strong>

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!