icyphy / ptII

Ptolemy II is an open-source software framework supporting experimentation with actor-oriented design.
https://ptolemy.eecs.berkeley.edu/ptolemyII
Other
99 stars 43 forks source link

"Open Actor" vs "Open Actor Instance" #41

Open cxbrooks opened 18 years ago

cxbrooks commented 18 years ago

Note: the issue was created automatically with bugzilla2github tool

Original bug ID: BZ#42 From: @cxbrooks Reported version: 6.0-devel

cxbrooks commented 18 years ago

Ray writes:

I think we're going to push forward with a solution to our "modular component" problem using inner class definitions (if we can get them to work) in combination with pub/sub to loosely bind the models that require such additional component "plug-in" configuration. Our users will be able to drag and drop the "component" modules into the "master" module (e.g., to add population sub-groups). Under the hood, we're going to do this by creating a URL referenced instance of the "master" class and then adding URL referenced instances the "components" inside that entity. For example:

<entity name="AA Crime" class="gdp_sub" source="file:///D:/UserData/gdp_sub.moml">

    <property name="_location" class="ptolemy.kernel.util.Location"

value="[65.0, 140.0]"> <property name="nation" class="ptolemy.data.expr.StringParameter" value="$nation"> <property name="region" class="ptolemy.data.expr.StringParameter" value="$region">

    <entity name="AA Subgroup Crime" class="gdp_sub"

source="file:///D:/UserData/gdp_sub.moml"> <property name="nation" class="ptolemy.data.expr.StringParameter" value="$nation"> <property name="region" class="ptolemy.data.expr.StringParameter" value="$region">

However, Vergil does not seem to support this valid MOML model. Once a model such as this is created, Vergil can execute the model as expected, but because "Open Actor" opens the class file definition (not the specific/configured instance of the class) you cannot see the underlying encapsulation or any additions or modifications to the instance. When the user right clicks on a class instance, Vergil should offer the user the ability to "Open Class Definition" or "Open Actor Instance". The implementation of "Open Class Definition" would be exactly as defined today. However, the implementation of "Open Actor Instance" should open the specific instance. By doing so, the user should be able to: (1) see any entities that were added to the instance, (2) add entities to an instance (not to a class), and (3) debug a specific instance of an instantiated class.

Not being intimately familiar with Vergil, I'm not sure how easy this would be, but we would be happy with any incremental progress because as it stands now Vergil cannot even communicate the true MOML model to the user, and I think it looses them upon saving the model. I know we mentioned the debugging aspect of this during our visit, but the scope has become much larger, and much more important. So I figured I would document why we need it, and hope it is something you could take a look at.

cxbrooks commented 18 years ago

Edward writes:

I've checked in a partial implementation of this. There is now an "Open Instance" item on the context menu. There are two items still to do: