[kepler-dev] Increasing the componentization of Ptolemy II

Christopher Brooks cxh at eecs.berkeley.edu
Mon Sep 29 11:44:15 PDT 2008


We have been working on increasing the level of componentization of
Ptolemy II.  Hauke Fuhrmann is visiting us here at Berkelely.  Hauke
is interested in using Ptolemy II as the computational engine behind
Keiler (http://www.informatik.uni-kiel.de/en/rtsys/kieler/).

We've been experimenting with using Eclipse and OSGi to build bundles
of the Ptolemy II code base.
On Friday, I hacked up a script that creates the ~60 bundles needed to
run the Ptiny version of Vergil.  Ptiny is just the common domains
like SDF, CT, DE, FSM etc.  The bundles don't directly compile
becase CT and FSM have a cross dependency, but the exercise prompted
me to fix several issues.


There are some open questions:

1) Is this the time to refactor the ptolemy.* packages to
org.ptolemy.*?

The MoMLFilter will likely handle much of the backward compatibility for 
running models.

All of the code that calls ptolemy.* packages would need to be updated.

All of the tcl tests would need to be updated.  This would take a few days.


2) It is not clear to me what the proper level of granularity is for
the bundles.
- We could have a bundle per package.  This seems like too fine a
granularity - we will end up with hundreds of bundles.

- We could have many bundles that include common functionality.
This is the level of granularity for the 60 bundles that were created
for Ptiny.  For example, we have a ptolemy.actor.actorKore bundle that
consists of the commonly used base actors in ptolemy (strings,
conversions etc.)  It makes no sense to have one bundle per package
here, because if you use one class, then it is likely that classes
from other nearby packages will be used.

- We could use the bundles that were used for WebStart and izPack
in Ptolemy II 7.0.1.  I decided that these bundles were too coarse
because they tended to include gui code with non-gui code.  For example
ptolemy/ptsupport.jar included the kernel, actor framemwork and actors.
ptolemy/actor/actor.jar, which was part of ptsupport.actor included
the actor framework and graphical and non-graphical actors.
plotapplication included ptolemy/plot/compat.jar, which is support
for pxgraph.

3) Right now, the interface and the implementation are in the same
bundle.  Eventually, we should move away from this.  However, it
seems like a very large step right now.

_Christopher

-- 
Christopher Brooks (cxh at eecs berkeley edu) University of California
Chess Executive Director                      US Mail: 337 Cory Hall
Programmer/Analyst Chess/Ptolemy/Trust        Berkeley, CA 94720-1774
ph: 510.643.9841 fax: 510.642.2718	      (office: 545Q Cory)
home: (F-Tu) 707.665.0131 (W-F) 510.655.5480



More information about the Kepler-dev mailing list