ptclconveniently operates on dumb terminals and other environments where graphical user interfaces may not be available, and is described in this chapter. The Ptolemy graphical user interface
pigiis described in chapter 2. When
pigiis run with the
-consoleoption, a ptcl window will appear. This combination allows the user to interact with Ptolemy using both graphical and textual commands. Invoking
tycho, the Ptolemy syntax manager also brings up a ptcl interpreter window. To invoke
pigi, move the mouse over a facet and type a
In Ptolemy 0.7, the
tysh binary contains a prototype of a new interface to the kernel called pitcl. If you start
tycho with the
-ptiny options, then you will be running pitcl, not ptcl. Pitcl is not backward compatible with ptcl, and the pitcl interface is bound to change over time. See the Tycho documentation in
$TYCHO/typt/doc/internals/pticl.html for further information.
ptcl, accepts input commands from the keyboard, or from a file, or some combination thereof. It allows the user to set up a new simulation by creating instances of blocks (stars, galaxies, or wormholes), connecting them together, setting the initial values of internal parameters and states, running the simulation, restarting it, etc. It allows simulations to be run in batch mode. We have used batch mode simulation to run regression tests that compare runs from different versions of Ptolemy.
Ptcl is based on John Ousterhout's Tcl (tool command language), which is an extensible interpreted language. All the commands of Tcl are available in
ptcl. This interface is more convenient than the graphical interface when large complex universes are being created automatically by some other program. Some users also find it more convenient when using a symbolic debugger to debug a new piece of code linked to Ptolemy.
Ptcl extends the Tcl interpreter language by adding new commands. The underlying grammar and control structure of Tcl are not altered. Commands in Tcl have a simple syntax: a verb followed by arguments. This document will not explain Tcl; please refer to the manual entry at
$PTOLEMY/tcltk/itcl/html/tcl7.6/Tcl.n.html which is included with the Ptolemy distribution. Two other excellent references on Tcl are books by Ousterhout [Ous94] and Welch [Wel95]. This chapter describes only the extensions to Tcl made by