These are good questions and good observations...
I believe the main value of domain polymorphism is the ability to write components that work in many domains. It is not (as you point out) in the ability to change the MoC of a model.
One of the key objectives in Ptolemy II is to be able to experiment quickly with models of computation. I've done demos where in about 10 minutes I create a variant of the PNDirector that supports nondeterministic process networks. After those 10 minutes, I can immediately build nontrivial models using the new MoC because the vast majority of the actors in the library "just work" with the new director.
Some of the actors in the library are very sophisticated and very domain polymorphic (e.g. the ModalModel). If you had to create a new version of this for each new MoC, it would greatly slow down experimentation with MoCs.
Another motivation for domain polymorphism is that it enables heterogeneous models. A TypedCompositeActor with a director inside appears from the outside like an atomic domain-polymorphic actor. Although not all combinations of MoCs across the hierarchy are useful, many are (e.g. CT and DE, anything and FSM, DE and SDF, etc.). Such combinations are again a major research topic.
Edward
At 07:32 PM 2/28/2005 -0500, Hiren Patel wrote:
Hackers,
I understand that domain polymorphism has advantages of a plug-n-play environment in terms of the receivers being automatically retrieved from the domain specific directors allowing the actors to retain their behavior in different domains.
1. However, most of the time the modeler knows what MoC is being employed to model a certain component and I believe it is rare that someone would change their mind that requires changing the domain director during modeling.
2. From the documents the hierarchy describing the polymorphism is incomplete and it seems like many actors are not domain polymorphic with many other domains.
So, though this feature is very handy for the GUI visualization and a very neat concept, what are the true uses of such domain polymorphism?
3. Are transparent composite actors a result of requiring structural hierarchy and to facilitate the GUI for large models?
Thank you for your assistance,
-- ~ Hiren <hiren at vt dot edu>
---------------------------------------------------------------------------- Posted to the ptolemy-hackers mailing list. Please send administrative mail for this list to: [EMAIL PROTECTED]
------------
Edward A. Lee
Professor, Chair of the EE Division, Associate Chair of EECS
231 Cory Hall, UC Berkeley, Berkeley, CA 94720
phone: 510-642-0253 or 510-642-0455, fax: 510-642-2845
[EMAIL PROTECTED], http://ptolemy.eecs.berkeley.edu/~eal
---------------------------------------------------------------------------- Posted to the ptolemy-hackers mailing list. Please send administrative mail for this list to: [EMAIL PROTECTED]