Ptolemy II 2.0-beta is available for download from http://ptolemy.eecs.berkeley.edu/ptolemyII/ptII2.0
Ptolemy II is a software framework developed as part of the Ptolemy project. It is a Java-based component assembly framework with a graphical user interface called Vergil. Vergil itself is a component assembly defined in Ptolemy II. The Ptolemy project studies modeling, simulation, and design of concurrent, real-time, embedded systems. The focus is on assembly of concurrent components. The key underlying principle in the project is the use of well-defined models of computation that govern the interactions between components. A major problem area being addressed is the use of heterogeneous mixtures of models of computation. The Ptolemy Project web page (http://ptolemy.eecs.berkeley.edu) contains much more information about the project. The work is conducted in the Department of Electrical Engineering and Computer Sciences of the University of California at Berkeley. The project is directed by Prof. Edward A. Lee. The project is named after Claudius Ptolemaeus, the second century Greek astronomer, mathematician, and geographer. Ptolemy II includes a growing suite of domains, each of which realizes a model of computation. It also includes a component library, in which most components are domain polymorphic, in that they can operate in several of the domains. Most are also data polymorphic, in that they operate on several data types. The domains that have been implemented are listed below. Some of these are preliminary and/or experimental, as indicated below. Below is a text version of the web page that describes the release. ---start--- Ptolemy II 2.0-beta Release Notes Ptolemy II is a set of Java packages supporting heterogeneous, concurrent modeling and design. Its 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. 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 Ptolemy II design document describes the Ptolemy II design and the implementation of the Java classes. The design document is not included with Ptolemy II 2.0-beta, but will be shipped with the Ptolemy II 2.0 production release. In the interim, please see the "Using Vergil" chapter Complete List of Domains in Ptolemy II * CSP: communicating sequential processes, * CT: continuous-time modeling, * DE: discrete-event modeling, * DDE: distributed discrete events (experimental), * DT: discrete time, * FSM: finite state machines, * Giotto: periodic time-driven (experimental), * GR: 3-D graphics (experimental), * PN: process networks, * SDF: synchronous dataflow, * SR: synchronous/reactive (experimental), and * TM: timed multitasking (experimental). Platforms The core of Ptolemy II 2.0 is 100% Java, so it should work on any platform that has JDK1.3 We developed Ptolemy II 2.0 under Solaris 8 and Windows 2000 sr2 and with JDK1.3.1 and JDK1.4. Note that code generation only works under JDK1.3.0 or 1.3.1 because of limitations in Soot. Ptolemy II 2.0 will not compile under JDK1.2.2. The code generation facility requires JDK1.3.0, it will not work under JDK 1.4.0 Major Features that are new in Ptolemy 2.0 Modal Models (Xiaojun Liu, Edward A. Lee) A modal model is an FSM (finite state machine) combined hierarchically with other models. In our visual syntax, the system builder directly interacts with this hierarchical view. If you look inside the modal model, you will see a visual rendition of the FSM. If you create a state in this FSM, then you can create a refinement, and also you can look inside the state using the context menu on the state. The refinement can be another FSM or some other model using some other Ptolemy domain. For example, by using the CT domain (continuous time), one can easily build hybrid systems. Code Generation (Primary Author: Stephen Neuendorffer, Contributor: Christopher Hylands) This release includes a limited prototype of our code generation facility that will generate .class files for non-hierarchical SDF models ptolemy.data.unit - Units Demo (Primary Authors: Yuhong Xiong, Xiaojun Liu, Contributors: Winthrop Williams, Edward A. Lee) A major source of errors in embedded software is incorrect application of units. Yuhong Xiong and Xiaojun Liu have created a unit system for Ptolemy II that is quite clever. A suite of constants are defined, with names such as "meter", "cm", "feet", "miles", "seconds", "hours", and "days". In each unit category ("length" or "time" for example), there is a primary unit with respect to which all the others are specified. Thus, for example, if the primary unit of length is meters, then the expression "1.0 * cm" will have an internal value of 0.01 * meters. Compound units are specified by just multiplying and dividing, as in for example "1.0 * cm/second". The way this is realized is that these unit constants are tokens just like other Ptolemy II data, and multiplication and division are overloaded in the base classes for numeric valued tokens. We continue to work on this architecture to enable users to customize the unit system on a per-model basis. Timed Multitasking Domain (Jie Liu) - an implementation of a model of computation based on priority-driven multitasking, as common in real-time operating systems (RTOSs), but with more deterministic behavior Synchronous/Reactive Domain: (Primary Author: Paul Whitaker, Contributors: Elaine Cheong, John Reekie) Web Start (Christopher Hylands) - Ptolemy II includes support to build distributions using Sun's Web Start facility, which allows end users to download fully functional distributions via the web. Vergil updates (Steve Neuendorffer, Edward A. Lee, John Reekie Vergil has been improved and the following features have been added Annotations - It is now much easier to annotate a model with text. Parameters - The model can display top level parameter names and values Snap to grid - It is now much easier to line up actors Panner, zoom - The panner and zoom facilities make it easier to navigate large Improved FSM editor Animation - It is now possible to show which actors are firing when. Better icons - Some icons such as Const, Scale and Expression will display their values. set data types of ports See $PTII/doc/design/usingVergil/index.htm for more complete information Other Features that are new in Ptolemy II 2.0 * ptolemy.data.ByteToken (Winthrop Williams, Steve Neuendorffer) - A new Token supporting bytes. * Ptolemy II Matlab interface (Zoltan Kemenczy, Research In Motion, Ltd.) - The Matlab Expression actor uses JNI to invoke the Matlab engine, evaluate Matlab expressions and return the results to Ptolemy II. The Matlab Expression actor works only under Windows, and requires that Matlab be installed on your local machine. Ptolemy II Matlab Interface Overview Java class documentation Matlab Expression Demonstration - Windows only, requires that Matlab be installed locally, will not work within an applet, but will work with Web Start * Expression improvements (Zoltan Kemenczy, Research In Motion, Ltd.) * Multiple Runs (Xiaojun Liu, Edward A. Lee) - The FSM domain as been extended to perform multiple runs of refinement on a model * ptolemy.graph (Shuvra S. Bhattacharyya (University of Maryland at College Park)) - The graph package was redesigned and reimplemented. New Demonstrations CT: Continuous Time Bouncing Ball (Requires Java 3D, see the GR domain) A Continuous Time model that uses a Finite State Machine and the GR domain to simulate a bouncing ball. Car Tracking A following car tracking a leading car in an unreliable communication environment. Switching Continuous Signals Shows how to handle hybrid systems with both continuous and discrete inputs and outputs. Modal Thermostat A thermostat model where the refinements of the modes in the state machine are the same model. Units A demonstration of the Units facility FSM: Finite State Machines Blending A blending controller with two major control modes. Multiple Runs A state machine performs multiple runs of the refinement of mode1. GR: 3-D graphics (experimental) FurutaPendulum The Furuta pendulum has a motor controlling the angle of an arm, from which a free-swinging pendulum hangs. The objective is to swing the pendulum up and then balance it. SDF: Synchronous Dataflow LMSAdaptive An adaptive filter MaximumEntropySpectrum A spectral estimation example SR: Synchronous/Reactive (experimental) TokenRing A cyclic token-ring arbiter composed of three blocks. TM: Timed Multitasking (experimental). Controllers Two (independent) control loops whose controllers share the same CPU. FFT This model shows the use of background process for long running tasks in the TM domain. MergedEvents SimpleTasks This model shows two independent tasks on a single CPU machine. New Actors * ptolemy.actor.lib: Accumulator (Edward A. Lee) An actor that outputs the sum of the inputs so far. BooleanMultiplexor (Steve Neuendorffer) A polymorphic multiplexor with boolean select. BooleanMultiplexor (Steve Neuendorffer) A polymorphic multiplexor with boolean select. BooleanSelect (Steve Neuendorffer) A polymorphic multiplexor with boolean select. BooleanSwitch (Steve Neuendorffer) A polymorphic multiplexor with boolean select. ClassWrapper An actor that wraps (an instance of) a Java class. (Xiaojun Liu) Counter A constant source. (Steve Neuendorffer) Differential (Edward A. Lee) An actor that outputs the difference between successive inputs. DoubleReader (Jie Liu, Christopher Hylands) An actor that outputs doubles read from a URL. Limiter (Edward A. Lee) An actor that limits the input to a specified range. LinearDifferenceEquationSystem (Jie Liu, Elaine Cheong) Linear Difference Equation System. LookupTable (Paul Whitaker, Christopher Hylands) A lookup table that outputs internally stored data given an index Parameter. NonStrictTest (Paul Whitaker, Christopher Hylands) Check the input streams against a parameter value, ignoring absent values. URLDirectoryReader (Christopher Hylands) An actor that reads a URL naming a directory and outputs each element of the directory one at a time. VectorAssembler (Jie Liu, Elaine Cheong) An actor that reads a token from each input channel to assemble a DoubleMatrixToken. VectorDisassembler (Jie Liu, Elaine Cheong) An actor that disassembles a DoubleMatrixToken to a multiport output. WallClockTime (Edward A. Lee) Output the elapsed time in seconds. * ptolemy.actor.lib.comm: SerialComm (Winthrop Williams) Read and write from a serial port * ptolemy.actor.lib.conversions: BooleanToAnything (Edward A. Lee) An actor that converts a boolean token into any other data type. InUnitsOf (Yuhong Xiong, Xiaojun Liu, Edward Lee) An actor that converts input tokens to specified units. IntArrayToString (Winthrop William) An actor that converts an array of integers into a string. LongToDouble (Christopher Hylands) An actor that converts a LongToken into a DoubleToken. StringToIntArray (Winthrop Williams) An actor that converts a string to an array of integers. * ptolemy.actor.lib/gui: MatrixVisualizer (Neil Turner, Steve Neuendorffer) An actor for 2-D visualization of matrices. RealTimePlotter (Edward A. Lee) Plot input data as a function of elapsed real time. SliderSource (Xiaojun Liu) An actor whose output is controlled by a slider in the run window. * ptolemy.actor.lib.logic: IsPresent (Edward A. Lee) Output true if the input is present, false otherwise. * ptolemy.actor.lib.net: DatagramReader (Winthrop Williams) An actor that asynchronously reads datagram packets. DatagramWriter (Winthrop Williams) An actor that sends its input as a UDP datagram packet. * ptolemy.domains.ct.lib: EventSource (Jie Liu) Generate discrete events at prespecified time instants. FirstOrderHold (Jie Liu) An actor that takes a value and a derivative and does first order projection. LevelCrossingDetector (Jie Liu) A CT actor that detects level crossings of its trigger input signal. * ptolemy.domains.de.lib: EventButton (Winthrop Williams, Paul Whitaker) An actor that generates an empty token in response to a click of a button. EventFilter (Steve Neuendorffer, Sonia Sachs) An actor that filters false boolean tokens. Inhibit (Steve Neuendorffer) An actor that produces a copy of the most recent input each time PreemptableTask (Elaine Cheong, Yang Zhao, Xiaojun Liu) An actor that simulates a preemptable task. Previous (Edward A. Lee) An actor that outputs the previous event when it receives an event. Queue (Steve Neuendorffer) An actor that implements a queue of events. QueueWithNextOut (Winthrop Williams, Steve Neuendorffer) An actor that implements a queue of events with a nextOut port SamplerWithDefault (Steve Neuendorffer, Jie Liu, Edward A. Lee) An actor that produces a copy of the most recent input each time * ptolemy.domains.sdf.lib: DoubleToMatrix (Edward A. Lee) An actor that converts a sequence of input tokens to a matrix. MatrixToDouble (Edward A. Lee) An actor that converts a matrix to sequence of output tokens. Backward compatibility issues Most models developed under Ptolemy II 1.0.1 should run under Ptolemy II 2.0. The MoMLParser has been extended to include a list of backward compatibility filters that look for actors that have changed while parsing a model. The backward compatibility filters will make what ever change is necessary, and the user will eventually be prompted to save the model. The filters themselves are defined in ptolemy.moml.filter Below are the backward compatibility issues that are handled automatically. ptolemy.moml.filter.AddEditorFactory: If a parameter has a _location, then Add a VisibleParameterEditorFactory named _editorFactory ptolemy.moml.filter.AddIcon: Add specialized icons that display the value of one of the parameters. The affected actors are: ptolemy.actor.lib.Scale ptolemy.actor.lib.Const ptolemy.actor.lib.TrigFunction ptolemy.actor.lib.MathFunction ptolemy.actor.lib.Expression ptolemy.moml.filter.HideAnnotationNames: If an annotation name ends with 'annotation1', then add _hideName if necessary. ptolemy.moml.filter.PortNameChanges: Update any actor port names that have been renamed. Below are the actors that are affected, along with the old port name and the new port name: ptolemy.actor.lib.Sleep delay -> sleepTime ptolemy.actor.lib.conversions.ComplexToCartesian imag -> y real -> x ptolemy.actor.lib.conversions.CartesianToComplex imag -> y real -> x ptolemy.moml.filter.PropertyClassChanges: Update any actor port class names that have been renamed. Below are the actors that are affected, along with the port name and the new classname: ptolemy.domains.sdf.lib.vq.ImageUnpartition output -> ptolemy.actor.TypedIOPort input -> ptolemy.actor.TypedIOPort ptolemy.actor.lib.javasound.AudioReader sourceURL -> ptolemy.data.expr.Parameter ptolemy.domains.sdf.lib.vq.VQDecode output -> ptolemy.actor.TypedIOPort input -> ptolemy.actor.TypedIOPort ptolemy.domains.sdf.lib.vq.HTVQEncode output -> ptolemy.actor.TypedIOPort input -> ptolemy.actor.TypedIOPort ptolemy.domains.sdf.lib.vq.ImagePartition output -> ptolemy.actor.TypedIOPort input -> ptolemy.actor.TypedIOPort Below are the changes that are not handled automatically: ct.kernel.CTRealTimeDirector has been removed, the fix is to use ct.kernel.CTDirector instead and to set the synchronizeToRealTime parameter to true. DDE: RcvrComparator renamed to ReceiverComparator actor.lib.Reader is now actor.lib.DoubleReader The Reader class was included in the Ptolemy II 1.0.1 download, but was not part of the default configuration. If you have developed your own actors under Ptolemy II 1.0.1 by writing your own Java files, you should recompile all your java code with the new release. In theory, copying the .class files should work, but recompiling is safer. Major Features that were new in Ptolemy II 1.0.1 Vergil - the Ptolemy II GUI (Steve Neuendorffer and Edward A. Lee) Giotto Domain (Christoph M. Kirsch, Benjamin Horowitz, Thomas A. Henzinger) Java 3D Domain (GR Domain) (Chamberlain Fong) Discrete Time Domain (Chamberlain Fong) CORBA/Jini work (Jie Liu) Other Features that were new in Ptolemy II 1.0.1 * The actor classes are more robust and have been reviewed. * User interface utilities for applets and applications * Live editing of models and parameters; * Network integration; * A sophisticated type system including: + Type constant propagation, + Record types, + Array types, and + Fixed-point type * An expression language for parameter expressions; * Data and domain polymorphic component library; * A polymorphic expression actor; * A very simple XML file format called MoML; * A flexible signal plotter; * Several domains with concurrent models of computation ( CSP, PN, DDE ) * Hierarchically interoperable domains (CT/FSM Accelerometer demo); * On-line documentation (in HTML); * Audio signal processing capabilities; Limitations Version 2.0 has a number of limitations. Release Limitations * The gzipped tar file that contains the Ptolemy II distribution requires GNU tar or WinZip. Solaris 2.5.1 tar will fail to untar this file with a checksum error because the pathnames are longer than 100 characters. If you do not have GNU tar, you can obtain source and selected binaries from ftp://ptolemy.eecs.berkeley.edu/pub/gnu. * The Ptolemy II 2.0-beta release does not include the design document. We will include an updated version of the design document in the full release. The Ptolemy II 1.0 design document can be found in: Ptolemy Web Site * The Using Vergil html file has some bogus characters in it. * vergil foo hangs. No window comes up if foo does not exist. * The documentation for custom actors used in demonstrations is not included in the release. * Dragging the UnitConversion icon into a blank canvas will throw an exception because UnitConversion requires data in the other Unit icons. * Applet issues: + Look inside on a composite actor fails : "Cannot look inside with a configuration" + Applets that use MoMLViewerApplet do not auto start. These applets include o Giotto applets o SDF Expression, FixPoint, LMSAdaptive, MaximumEntropy + SDF Spectrum plot is not filled at the end + $PTII/doc/expression.htm needs to be updated + The DDE Zeno demo produces an error message in the Java Plug-in console window: java.lang.IllegalArgumentException: LowerJoin - Attempt to set current time to the past; time = 50.001. The _lastTime was 54.0 at ptolemy.domains.dde.kernel.PrioritizedTimedQueue.put(PrioritizedTime dQueue.java:297) at ptolemy.domains.dde.kernel.DDEReceiver.put(DDEReceiver.java:580) at ptolemy.domains.dde.kernel.DDEReceiver.put(DDEReceiver.java:549) at ptolemy.domains.dde.kernel.FeedBackDelay._sendOutToken(FeedBackDelay .java:247) at ptolemy.domains.dde.kernel.FeedBackDelay.fire(FeedBackDelay.java:175 ) at ptolemy.actor.process.ProcessThread.run(ProcessThread.java:126) ptolemy.actor.Manager run(): elapsed time: 23004 ms + Running the Networked demo via an applet on the local file system results in an AccessControlException. com.microstar.xml.XmlException: 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.AccessControlExceptio n: access denied (java.net.SocketPermission ptolemy.eecs.berkeley.edu resolve) in file:/C:/Program Files/Ptolemy/Ptolemy II 2.0 beta2/ptolemy/moml/demo/Networ ked/ at line 62 and column 118 at ptolemy.moml.MoMLParser.startElement(MoMLParser.java:1341) at com.microstar.xml.XmlParser.parseElement(XmlParser.java:944) at com.microstar.xml.XmlParser.parseContent(XmlParser.java:1117) at com.microstar.xml.XmlParser.parseElement(XmlParser.java:946) at com.microstar.xml.XmlParser.parseDocument(XmlParser.java:495) at com.microstar.xml.XmlParser.doParse(XmlParser.java:175) at com.microstar.xml.XmlParser.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. * Web Start issues: + Applet generation still does not work in the Web Edition + Invoking a pdf file or the code generator brings up a blank window. + Web Start is limited to about 65Mb of memory If you try to run all the demos, then eventually you may see the following in the Web Start console 761 ms. Memory: 65280K Free: 3614K (6%) 7471 ms. Memory: 65280K Free: 931K (1%) Exception occurred during event dispatching: java.lang.OutOfMemoryError <<no stack trace available>> Limitations in the Actor Libraries * The actor library is far from complete. * The Expression actor does not properly propagate type constraints in an expression-dependent fashion. It works correctly for double-valued expressions of double-valued inputs. * The Ptolemy parameter parser uses comma "," to separate elements in an array. This causes problems when Ptolemy is run on European machines that use a comma "1,0" instead of a period "1.1" in floating point numbers. * The readFile() parameter function does not work with applets. * The Matlab interface works only under Windows and it requires that Matlab be installed on the local machine. The Matlab interface has been tested with Matlab 6.1, which corresponds with R12.1. * The actor.lib.comm.SerialComm actor requires that Javacomm is installed http://java.sun.com/products/javacomm/index.html. The SerialComm actor will only work under Windows. Limitations in the PN Domain The PN domain documents that it locally handles mutations. However, this is currently not true in the implementation. For the basic PN model, this doesn't really matter, since mutations happen pretty much the same as they would otherwise. (i.e. they are non-deterministic in when they execute) However, for timed PN models, there is actually some expressiveness lost, since timed PN models can locally execute mutations deterministically. Limitations in the User Interface Below are some of the limitations of Vergil, the Ptolemy II Graphical User Interface. * You should not change the names of built in ports - The port mechanism should disallow port name changes on ports that are named in Java. The UI could recognize this. The UI should not allow the user to remove built in Java defined ports. * Query needs to be put into a scroll pane * Manually setting of the types of actors like ArrayToSequence that have constraints on their element types can cause problems. * HTVQ demo is badly laid out when run under vergil * The Vergil HTML Viewer does not correctly handle internal hyperlinks. The codegen page is especially difficult to use because of this. * No undo mechanism. * Weak support for multiports in the graph editor. * It is difficult to control wire routing. * Cannot have more than one vertex in a connection. * No mechanism to set the width of a relation. * The integrated web browser is not a full-featured browser. * Icon editor not yet integrated. * Debugger not yet integrated. * It is difficult to add actors to the libraries. * No dynamic class reloading. Code Generation Limitations Code Generation limitations are covered on the Code Generation page. Missing Domains * Boolean and integer dataflow. * Dynamic dataflow --end-- Christopher Hylands [EMAIL PROTECTED] University of California Ptolemy/Gigascale Silicon Research Center US Mail: 558 Cory Hall #1770 ph: (510)643-9841 fax:(510)642-2739 Berkeley, CA 94720-1770 home: (510)526-4010 (Office: 400A Cory) ---------------------------------------------------------------------------- Posted to the ptolemy-hackers mailing list. Please send administrative mail for this list to: [EMAIL PROTECTED]