vergil: component-based design...
TRANSCRIPT
1
Ptolemy MiniconferenceBerkeley, CA, March 22-23, 2001
Vergil: Component-BasedDesign Environment
Steve Neuendorffer
Ptolemy Miniconference, Berkeley, 2
Graph Editor
A libraryof actorsanddirectors
editable model visualization
hierarchical models atomic models
2
Ptolemy Miniconference, Berkeley, 3
Why Component Based?
Design Tools Design Artifacts
Design Environment
Ptolemy Miniconference, Berkeley, 4
Digital Design Tools
Graph View
Ptolemy Model
Tree ViewText View
3
Ptolemy Miniconference, Berkeley, 5
Digital Design Artifacts
Ptolemy Model
Text View
HTML Document
Ptolemy Miniconference, Berkeley, 6
n Given a file, what type of artifact does the filecontain?
n Given a digital artifact, what type of tool canmanipulate it?
n Vergil configuration uses a Ptolemy Model!
Design Environment Configuration
<?xml version="1.0" standalone="no"?><!DOCTYPE entity PUBLIC "-//UC Berkeley//DTD MoML 1//EN" "http://ptolemy.eecs.berkeley.edu/xml/dtd/MoML_1.dtd"><entity name="configuration" class="ptolemy.actor.gui.Configuration"> <doc>Configuration to edit and run Ptolemy II models</doc> <!-- The directory of open models, each represented by an effigy. --> <entity name="directory" class="ptolemy.actor.gui.ModelDirectory"/> <!-- Factories for effigies. --> <entity name="effigyFactory" class="ptolemy.actor.gui.EffigyFactory"> <entity name="Graph Editor" class=" ptolemy.actor. gui.PtolemyEffigy$Factory"> <entity name="blank" class="ptolemy.actor.TypedCompositeActor"/> </entity> (etc.)
4
Ptolemy Miniconference, Berkeley, 7
Effigies
n An effigy represents an open design artifactn Subclasses contains design artifacts, such as a
Ptolemy model or an HTML string
Ptolemy Miniconference, Berkeley, 8
Tableaux
n Every design tool displaying an Effigy isrepresented by a Tableau.
n Subclasses for the Graph Editor, Icon Editor, etc.
5
Ptolemy Miniconference, Berkeley, 9
Model Directory
n The modeldirectorycontains all of theopen effigies andtableaux.
n Effigies areindexed from thelocation theywere loaded from.
ModelDirectory
+ModelDirectory(container : Configuration, name : String)+getEffigy(identifier : String) : Effigy
Tableau
1..n 1..1
1..n1..1
Effigy1..n
1..1
Ptolemy Miniconference, Berkeley, 10
Configurations
n EffigyFactories create effigies for a file.n TableauFactories create tableaux for an effigy.n Alternate configurations customize interaction
and integrate new tools.
ModelDirectory
CompositeEntity
Configuration
1..11..1
directory
EffigyFactory
1..1
effigyFactoryTableauFactory
0..1
1..1
tableauFactory
1..1 actor library
6
Ptolemy Miniconference, Berkeley, 11
But how do we build the design tools themselves?
Vergil Configuration
Effigy factories
Tableaufactories
Ptolemy Miniconference, Berkeley, 12
MoML
n Concrete Syntax inXML for describingcomponentarchitectures
n Support for classderivation andmodification
n Represents all Ptolemymodels, including theVergil configuration!
<!ELEMENT class (class | configure | deleteEntity |deletePort | deleteRelation | director | doc | entity | group | import| input | link | port | property | relation | rename | rendition |unlink)*><!ATTLIST class name CDATA #REQUIRED extends CDATA#IMPLIED source CDATA #IMPLIED><!ELEMENT configure (#PCDATA)><!ATTLIST configure source CDATA #IMPLIED><!ELEMENT deleteEntity EMPTY><!ATTLIST deleteEntity name CDATA #REQUIRED><!ELEMENT deletePort EMPTY><!ATTLIST deletePort name CDATA #REQUIRED><!ELEMENT deleteProperty EMPTY><!ATTLIST deleteProperty name CDATA #REQUIRED><!ELEMENT deleteRelation EMPTY><!ATTLIST deleteRelation name CDATA #REQUIRED><!ELEMENT doc (#PCDATA)><!ATTLIST doc name CDATA #IMPLIED><!ELEMENT entity (class | configure | deleteEntity | deletePort|deleteRelation | director | doc |entity | group | import | input | link| port |property | relation | rename | rendition | unlink)*><!ATTLIST entity name CDATA #REQUIRED class CDATA #IMPLIED source CDATA #IMPLIED><!ELEMENT group ANY><!ATTLIST group name CDATA #IMPLIED><!ELEMENT input EMPTY><!ATTLIST input source CDATA #REQUIRED><!ELEMENT link EMPTY><!ATTLIST link insertAt CDATA #IMPLIED port CDATA #REQUIRED relation CDATA #REQUIRED vertex CDATA #IMPLIED><!ELEMENT port (configure | doc | property | rename)*><!ATTLIST port class CDATA #IMPLIED name CDATA #REQUIRED><!ELEMENT property (configure | doc | property | rename)*><!ATTLIST property class CDATA #IMPLIED name CDATA #REQUIRED value CDATA #IMPLIED><!ELEMENT relation (configure | doc | property | rename | vertex)*><!ATTLIST relation name CDATA #REQUIRED class CDATA #IMPLIED><!ELEMENT rename EMPTY><!ATTLIST rename name CDATA #REQUIRED><!ELEMENT unlink EMPTY><!ATTLIST unlink index CDATA #IMPLIED insideIndex CDATA#IMPLIED port CDATA #REQUIRED relation CDATA#REQUIRED><!ELEMENT vertex (configure | doc | location | property | rename)*><!ATTLIST vertex name CDATA #REQUIRED pathTo CDATA #IMPLIED value CDATA #IMPLIED>
7
Ptolemy Miniconference, Berkeley, 13
Graph Visualization in Diva
n Interactors specifyhow mouse eventsare handled.
n Renderers specifyhow nodes andedges appear.
n Other nice things:n Context Menusn Automatic Layoutn Cut and Pasten Printingn Direct Manipulation
Ptolemy Miniconference, Berkeley, 14
Direct Manipulation Editing
n Specified in MoMLn Requests are queued and
executed when possiblen Graph Editor listens for
mutations<port name="input“/>
Allows dynamicallyedit executing models!
MoMLChangeRequest
8
Ptolemy Miniconference, Berkeley, 15
Graph Editor Configuration
n Java Interfacesn Placeable actors
n Attributes of the Vergil Configurationn Actor librariesn Parameter Styles
n Attributes of the Modeln Parameter Styles
Ptolemy Miniconference, Berkeley, 16
User Interfaces for Actors
Actors with specialized interactionimplement the Placeable interface.
public class Plotter extends TypedAtomicActor implements Configurable, Placeable { public void place(Container container) { } }
9
Ptolemy Miniconference, Berkeley, 17
Actor Libraries
<entity name="sources"class="ptolemy.moml.EntityLibrary">
<doc>Domain-polymorphic sources</doc><entity name="Bernoulli"
class="ptolemy.actor.lib.Bernoulli"/><entity name="Clock"
class="ptolemy.actor.lib.Clock"/><entity name="Const"
class="ptolemy.actor.lib.Const"/><entity name="CurrentTime" class="ptolemy.actor.lib.CurrentTime"/>..
</entity>
Objects specified in theConfiguration are availablein the Palette.
Ptolemy Miniconference, Berkeley, 18
<property name="CT" class="ptolemy.domains.ct.kernel.CTMixedSignalDirector"> <property name="ODESolver"> <property name="style" class="ptolemy.actor.gui.style.EditableChoiceStyle"> <property name="choice0" class="ptolemy.data.expr.Parameter"
value=""ptolemy.domains.ct.kernel.solver.ExplicitRK23Solver""/> <property name="choice1" class="ptolemy.data.expr.Parameter"
value=""ptolemy.domains.ct.kernel.solver.BackwardEulerSolver""/> <property name="choice2" class="ptolemy.data.expr.Parameter"
value=""ptolemy.domains.ct.kernel.solver.ForwardEulerSolver""/> </property> </property></property>
Parameter Styles
Attributes in a model, or the configurationspecify the style of parameter editing.
10
Ptolemy Miniconference, Berkeley, 19
Current Research
n Meta-Modeling of diagrams.n Such as in Dome, GME, Moses.
n Applying Models of Computation to interactingdesign toolsn More than just Design Flow Management.
Ptolemy Miniconference, Berkeley, 20
Meta-Modeling
n Diagram structure specified using adescription language.
«composite node»Entity
«node»Port
«edge»Connection
«node»Relation
«node»External Port
11
Ptolemy Miniconference, Berkeley, 21
Tool Configuration
Design SpaceExploration
PerformanceMetricsPerformance
MetricsPerformanceMetricsPerformance
MetricsPerformanceMetrics
Graph Editor
Debugger
CodeGenerator
Ptolemy Miniconference, Berkeley, 22
Tool Interaction
Design SpaceExploration
PerformanceMetricsPerformance
MetricsPerformanceMetricsPerformance
MetricsPerformanceMetrics
Graph Editor
Debugger
CodeGenerator
12
Ptolemy Miniconference, Berkeley, 23
Tool Model
Design SpaceExploration
PerformanceMetricsPerformance
MetricsPerformanceMetricsPerformance
MetricsPerformanceMetrics
Graph Editor
Debugger
CodeGenerator
???Director
Ptolemy Miniconference, Berkeley, 24
Conclusion
n An extensible design environment for integratingarbitrary digital design toolsn Configuration is a Ptolemy model
n Creating digital tools should be simplen Especially graphical, direct manipulation tools
n User Interfaces could be a rich new area for theapplication of models of computationn JavaBeans done right