kernel
package
supports clustered hierarchical graphs, which are collections of
entities and relations between those entities. Its
actor
package extends the kernel so that entities have
functionality and can communicate via the relations. Its
domains extend the actor package by imposing models of
computation on the interaction between entities. Examples of
models of computation include discrete-event systems, dataflow,
process networks, synchronous/reactive systems, and communicating
sequential processes.
Ptolemy II includes a number of support packages, such as
data
, providing a type system, data encapsulation and an
expression parser,
plot
, providing visual display of data,
math
, providing matrix and vector math and signal
processing functions, and
graph
, providing graph-theoretic manipulations.
The three volumes of the Ptolemy II Design Document describes the Ptolemy II design and the implementation of the Java classes.
The "Using Vergil" describes how to use Vergil.
We developed Ptolemy II 8.0.1 under Mac OS 10.5 and Windows Server 2003 and with JDK1.5.0._22.
Ptolemy II 8.0 will not compile under Java 1.3 because we use the java.lang.URI class, which is present only in Java 1.4 and later. JDK 1.5 or later is required so that these packages can use generics: backtrack, ptalon and others.
Ptolemy II has been compiled and run under IBM JDK 1.6.0. There are the following limitations under IBM JDK 1.6.0
Contents:
The model transformation facility provides a framework for the analysis and transformation of actor models using model transformation techniques.
The design of large-scale models poses a number of challenges. As the size of the models increases to thousands of actors or hundreds of thousands of actors, analysis and consistent modification on the models become extremely hard. Furthermore, to maximize component reuse, a systematic approach is needed for the specification and maintenance of common patterns in the models and the transformation of those patterns.
The model transformation framework to be developed in this project aims to support the flexible specification of patterns and replacements by means of rules in graph grammar. An intuitive graphical user interface will be built. For novice users, a set of common transformations will be included in a library to facilitate their common tasks.
The transformations are models in their own right. They can be embedded in larger models hierarchically. Heterogeneous models of computation can be used to control the application of individual "atomic" transformations. This makes it easy to create sophisticated transformations by composing simple ones in a manageable and disciplined way. The sophisticated transformations will also take advantage of the concurrency inherent in those models of computation.
Model transformation can be applied as an optimization of modal models. These are hierarchical state machines with refinements in their states, which are sub-models to be executed when those states are active. The current implementation includes the complete description of each refinement in the model description, even though refinements of the states in a state machine tend to have large commonality. With the transformation technique, only one refinement needs to be stored completely. The others are obtained by transformations performed on the stored refinement. This eliminates redundancy and eases the job of modifying multiple refinements consistently.
Other applications of the model transformation technique include recognizing common design patterns in the models in a static analysis, replacing exiting design patterns with more efficient ones, and reusing design patterns by incorporating them into new models.
Primary Model Transformation Developer: Thomas Huining Feng
The Ptera (Ptolemy Event Relationship Actor) domain is a discrete-event model of computation. A model in Ptera is represented with a graph of nodes and edges, where nodes represent events and directed edges between events represent scheduling relation. One or more events can be selected as initial events, which are scheduled at model time 0.0. When an event is fired, it possibly performs certain actions, and if there are outgoing edges from that event, the events at the end points of those edges are scheduled after non-negative delays. One or more events can also be selected as final events. The firing of final events causes the event queue to be emptied after their actions are performed, and therefore no more events can be processed.
The Ptera domain supports a different kind of modal models called PteraModalModels, compared to modal models using FSMs (Finite State Machines) as the control. A PteraModalModel uses Ptera at the top level, and each event is refined into a sub-model. The refinements can use Ptera and any other Ptolemy models of computation.
A Ptera model is timed. Although it should work in many domains, the DE (Discrete-Event) domain or Ptera domain itself are recommended. When embedded in those domains, the scheduling of the Ptera model is delegated to the container by calling the fireAt() function of its director.
There are many useful additional features for Ptera, such as canceling edges and parameters. A canceling edge, denoted by a dotted line, cancels a previously scheduled event instead of scheduling a new one. If the pointed to event has multiple instances in the event queue, then the first instance is cancelled. Events may also have parameters, and the actual values for those parameters are specified by the expressions on the edges that schedule them. Those expressions are evaluated at run-time. The events may refer to the values of those parameters in their actions by parameter names.
Primary Ptera Developer: Thomas Huining Feng
We designed, implemented and reviewed an interface that defines a causality interfaces for actor networks as described in the paper "Causality Interfaces for Actor Networks."
Causality interfaces are also described in Ye Zhou Ph.D. Thesis, "Interface Theories for Causality Analysis in Actor Networks."
Causality interfaces represent dependencies between input and output ports of an actor and can be used to perform scheduling or static analysis on actor models.
This substantial new work helps address performance problems in large Discrete Event (DE) models. The new work provides more efficient static analysis for directed cycles and scheduling. This work solved a bug concerning execution time with DE models that had many actors at one level of hierarchy. The table below illustrates the improvement.
# of actors | Total execution time before | Total execution time after |
---|---|---|
100 | ~0.2 sec. | ~0.2 sec. |
600 | 149 sec. | 0.7 sec. |
One of the challenges in complex, heterogeneous models is that portions of the model have temporal behavior while other portions are purely functional. We have reworked the interfaces that hierarchically heterogeneous models in Ptolemy II present to one another for managing the passage of time. This rework supports much more robust multithreaded and distributed execution without compromising temporal coherence. Concretely, we have defined a formalism whereby a model requests temporal behavior of its container in the hierarchy, and the container responds with an indication of the extent to which it can honor the request. If the extent is sufficient for the application, then the models are compatibly composed. Otherwise, they are not, and the model is marked defective.
Ptolemy II 8.0 includes a substantial rework of modal models and the underlying finite state machine infrastructure to make them work predictably and consistently across domains.
Ptolemy II 8.0 includes a new implementation of continuous-time models based on the semantics given in "Synchronous Language Principles for Heterogeneous Modeling and Design of Embedded Systems." In particular, the Continuous domain cleanly supports continuous-time models (using an ODE solver), discrete-event models, and arbitrary mixtures of the two, including signals that combine continuous-time segments with discrete events. It also interoperates cleanly with most other domains (pretty much all except PN and Rendezvous, for which there does not appear to be reasonable semantic model of such an interaction). Modal models are also cleanly supported with the Continuous domain, enabling hybrid system modeling with a rigorous semantics. The Continuous domain is expected to eventually replace CT.
For certain actors there is a relation between the widths of the input ports and the widths of the output ports. To resolve this problem, width constraints on ports have been introduced. There exists two types of width constraints. The first one imposes an equality constraints between two different ports. With the second type of constraints you can set the width of a port equal to a certain parameter.
The last step of the algorithm is a consistency check in which it is checked that the solution obtained by the width inference algorithm is a unique one. A non unique solution is treated as a error.
In this release the default width has also been changed from 1 to Auto.
(Bert Rodiers)
This release contains capabilities to generate, from Ptolemy models, other types of models, suitable for formal verification. In particular, the Formal Model Converter component (developed by Chihhong Patrick Cheng) allows to generate models compatible with the SMV or NuSMV model-checkers, from Ptolemy models in the SR domain. Also, the RTMaudeCodeGenerator component (developed by Kyungmin Bae) allows to generate models compatible with the Real Time Maude tool, from Ptolemy models in the DE domain.
Please see the Verification README file for details.
Please see the ptolemy.actor.gui.properties documentation for details.
(Thomas Huining Feng)
ThreadedComposite demonstrations
(Edward A. Lee)-printPDF
command line argument. This option finds the first printer with the
string PDF
in the name and then prints to that printer.
Thus, -printPDF
requires that the full (non-free) version of
Adobe Acrobat be installed, or some other method of printing to PDF.
Unfortunately, the location of the resulting PDF file is not easily
controlled, on the Mac look in ~/Documents/Java Printing.pdf
.
$PTII/ptolemy/verification/demo/iRobotHillClimbing/iRobotHillClimbing.xml
(Requires NuSMV, see the Verification documentation)
$PTII/ptolemy/verification/demo/RailroadControl/RailroadSystem.htm
(Requires NuSMV, see the Verification documentation)
Old Class | New Class |
---|---|
ptolemy/actor/gui.DependencyHighlighter | ptolemy.vergil.basic.DependencyHighlighter |
ptolemy/actor/lib/CodegenActor | ptolemy.actor.lib.jni.CodegenActor |
ptolemy.vergil.actor.lib.LEDMatrix | |
ptolemy/actor/lib.gui.ModelDisplay | ptolemy.vergil.actor.lib.ModelDisplay |
ptolemy.codegen.c.actor.lib.CodegenActor was moved to | ptolemy.actor.lib.jni.CodegenActor |
ptolemy.codegen.c.actor.lib.gui.LEDMatrix | ptolemy.codegen.c.vergil.actor.lib.LEDMatrix |
ptolemy.codegen.kernel.Director | ptolemy.codegen.actor.Director |
ptolemy.domains.curriculum.DependencyHighlighter was moved to | vergil.actor.basic.DependencyHighlighter |
ptolemy.domains.sr.lib.AbsentToken | ptolemy.data.AbsentToken |
ptolemy.domains.sr.lib.ButtonTime | ptolemy.domains.sr.lib.gui.ButtonTime |
ptolemy.domains.sr.lib.NonStrictDisplay | ptolemy.domains.sr.lib.gui.NonStrictDisplay |
ptolemy.moml.SharedParameter | ptolemy.actor.parameters.SharedParameter |
ptolemy.vergil.unit.ConfigureUnitsAction | ptolemy.vergil.unit.ConfigureUnitsAction |
ptII8.0.1.src.tar.gz
)
requires GNU tar or WinZip. Solaris tar will fail to
untar this file with a checksum error because the pathnames are longer
than 100 characters.
Note further that some of the .class names are longer than 31 characters, which may cause problems when downloading zip files on the Macintosh and using Stuffit.
#in_browser
, then
Ptolemy II will invoke the User's web browser. Unfortunately, this
does not always work, especially under Windows if Netscape is already
running. The workaround is to exit Netscape and let Ptolemy II
start up Netscape for you.
vergil.jnlp
file has spaces in it. The workaround is
to place your Ptolemy II tree in a directory that does not have spaces
in the path name if you plan on using Web Start.
Vergil.app
is in bin/
, the default location is
/Applications/Ptolemy/ptII8.0.1/bin/Vergil.app
The reason we use this path is because if the user rebuilds, then the
Vergil.app
script will be generated
in bin/
open
command does not work.
open -a Vergil Adder.xmlit starts Vergil, but it doesn't open Adder.xml
http://book.javanb.com/mac-os-x-for-java-geeks/0596004001_macxjvgks-chp-5.html#macxjvgks-CHP-5
.
System.setProperty("javax.xml.parsers.DocumentBuilderFactory", name);The workaround is to run the caltrop demos as Web Start applications.
com.microstar.htm.htmException: XML element "entity" triggers exception: java.lang.Exception: Attempted to lookup 'Waveform', but got: java.lang.ClassNotFoundException: Waveform Attempted to find as a moml class, but got: java.security.AccessControlException: access denied (java.net.SocketPermission ptolemy.eecs.berkeley.edu resolve) in file:/C:/Program Files/Ptolemy/Ptolemy II 3.0 beta2/ ptolemy/moml/demo/Networked/ at line 62 and column 118 at ptolemy.moml.MoMLParser.startElement(MoMLParser.java:1341) at com.microstar.htm.htmParser.parseElement(XmlParser.java:944) at com.microstar.htm.htmParser.parseContent(XmlParser.java:1117) at com.microstar.htm.htmParser.parseElement(XmlParser.java:946) at com.microstar.htm.htmParser.parseDocument(XmlParser.java:495) at com.microstar.htm.htmParser.doParse(XmlParser.java:175) at com.microstar.htm.htmParser.parse(XmlParser.java:145) at ptolemy.moml.MoMLParser.parse(MoMLParser.java:492) at ptolemy.moml.MoMLParser.parse(MoMLParser.java:471) at ptolemy.moml.MoMLParser.parse(MoMLParser.java:456) at ptolemy.actor.gui.MoMLApplet._createModel(MoMLApplet.java:188)The Network demo does not work as a local applet because the xml file includes a reference to http://ptolemy.eecs.berkeley.edu, which is not on the local file system, so we get a SecurityException.
http://ptolemy.eecs.berkeley.edu/ptolemyII/ptII8.0/ptII8.0.1/ptolemy/moml/demo/Networked/Networked.htm
$PTII/ptolemy/actor/lib/BooleanSwitchIcon.xml
is an icon for
$PTII/ptolemy/actor/lib/BooleanSwitch.java
Directory "/ptolemy.eecs.berkeley.edu/ptolemyII/ptII8.0/jnlp-8.0.1/signed/ptolemy/actor/gt/patterns" does not exist, the value of the DefaultDirectoryAttribute parameter was "$PTII/ptolemy/actor/gt/patterns"There is no stack trace. This is annoying, it is like "Abort, Retry, Cancel?" because it does not tell the user where the error occurred. The offending code is in ptolemy/vergil/gt/TransformationEditor.java
$PTII/./ptolemy/domains/ddf/demo/RijndaelEncryption/RijndaelEncryption.xml
gt GameOfLife does something similar. How do I stop it?
Maybe these need to bring up a viewer that does not have a run button.
c:/Ptolemy/ptII8.0.1
.
A path name like /cygdrive/c/Ptolemy/ptII8.0.1
will not work with Java.
For example, if you run copernicus and copernicus runs make, you may see
makefile:360: *** target pattern contains no `%'. Stop.This is because a makefile variable uses the windows style pathnames with colons in them. One solution is to edit the file to use pathnames with /cygdrive. Another solution is to download a working version from
http://www.cmake.org/files/cygwin/make.exe
For details, see
http://www.cygwin.com/ml/cygwin-announce/2006-07/msg00008.html
I have no idea what prompted this change, it seems really lame. The code worked fine under Cygwin for many years. It seems like breaking an important tool such as make only hurts the GNU tools. This means that it is impossible to use Cygwin make with Sun Java, which uses MS-DOS paths.- From: Christopher Faylor <cgf-no-personal-reply-please at cygwin dot com>
- To: cygwin-announce at cygwin dot com
- Date: Sun, 9 Jul 2006 18:13:29 -0400
I've made a new version of 'make' available for download. This updates the package to the latest version available from fedora.redhat.com. I've included the relevant portions of the NEWS file and the Fedora ChangeLog at the end of this message.
For a brief description of this package, see http://cygwin.com/packages/.
Note that the --win32 command line option and "MAKE_MODE" environment variable are no longer supported in Cygwin's make. If you need to use a Makefile which contains MS-DOS path names, then please use a MinGW version of make.
See: http://mingw.org/ for details on downloading a version of make which understands MS-DOS path names. Please! direct any questions about the MinGW version of make to the appropriate MinGW mailing list.
For further updates, see
https://chess.eecs.berkeley.edu/bugzilla/show_bug.cgi?id=55
.
4/26/07: Wile compiling in $PTII/jni/test
,
I was getting
Process_begin: CreateProcess((null), /usr/bin/gcc -shared -Wl,--add-stdcall-alias -o testDeux.dll testDeux.c, ...) failed.The problem was I was running a broken version of make and updating to
http://www.cmake.org/files/cygwin/make.exe
helped.
vergil -jni
.
Embedding a PN typed composite actor inside a non-process top level such as DE does not work. In fact embedding a process domain inside a non-process domain is likely to have problems. Profess Lee wrote:
Yes, it looks as if the code is designed so that process domains (PN, CSP) can only be used within process domains. I'm not sure to what extent this is a limitation of the process domains vs. a semantic problem. What would PN mean within DE? Since PN has no well-defined notion of a "firing", how would you assign time stamps to the outputs of a PN actor? By default in DE, the time stamps of the outputs of an actor match those of the inputs that triggered the firing. There is no such notion in PN.
export JAVAFLAGS=-Dsun.java2d.print.pipeline=pdl vergilThen edit the file by hand in Illustrator to add the transparency back in.
For limitations discovered after the release, see the Ptolemy II 8.0.1 website
Last Updated: $Date: 2010-11-01 13:16:13 -0700 (Mon, 01 Nov 2010) $