03.08.2013 Views

PTOLEMY II - CiteSeerX

PTOLEMY II - CiteSeerX

PTOLEMY II - CiteSeerX

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Actor Libraries<br />

properly in the CT domain should declare that it implements this interface 1 . Most actors do not implement<br />

SequenceActor, because they do not care whether the input is a sequence.<br />

An actor that implements the TimedActor interface declares that the current time in a model execution<br />

affects its behavior. Currently, all domains can execute actors that implement TimedActor,<br />

because all directors provide a notion of current time. However, the results may not be what is<br />

expected. The SDF (synchronous dataflow) domain, for example, does not advance current time. Thus,<br />

Sink<br />

+input : TypedIOPort(multi)<br />

«Interface»<br />

TimedActor<br />

Source<br />

+output : TypedIOPort<br />

+trigger : TypedIOPort(Token,multi)<br />

... RandomSources ...<br />

... SequenceSources ...<br />

... RandomSources ...<br />

... SequenceSources ...<br />

... Timed Sources ... ... RandomSources ...<br />

... SequenceSources ...<br />

FIGURE 4.1. Key actor base classes and interfaces.<br />

TypedAtomicActor<br />

Transformer<br />

+input : TypedIOPort<br />

+output : TypedIOPort<br />

... Sinks ... ... Sources ... ... Transformers ... ... Other Actors ...<br />

TimedSource<br />

+stopTime : Parameter(DoubleToken)<br />

RandomSource<br />

+seed : Parameter(LongToken)<br />

SequenceSource<br />

«Interface»<br />

SequenceActor<br />

+firingCountLimit : Parameter(IntToken)<br />

1. Unfortunately, a scan of the current actor library (as of version 4.0) will reveal that we have not been very rigorous<br />

about this, and many actors that make a sequential assumption about the input fail to implement this interface.<br />

We are working on a more rigorous way of making this distinction, based on the concept of behavioral<br />

types.<br />

Heterogeneous Concurrent Modeling and Design 129

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

Saved successfully!

Ooh no, something went wrong!