03.08.2013 Views

PTOLEMY II - CiteSeerX

PTOLEMY II - CiteSeerX

PTOLEMY II - CiteSeerX

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Authors: Edward A. Lee<br />

Steve Neuendorffer<br />

Contributor: Christopher Hylands<br />

7.1 Introduction<br />

7<br />

MoML<br />

Ptolemy <strong>II</strong> models might be simulations (executable models of some other system) or implementations<br />

(the system itself). They might be classical computer programs (applications), or any of a number<br />

of network-integrated programs (applets, servlets, or CORBA services, for example).<br />

Models can be specified in a number of ways. You can write Java code that instantiates components,<br />

parameterizes them, and interconnects them. Or you can use Vergil (see the Vergil chapter<br />

above) to graphically construct models. Vergil stores models in ASC<strong>II</strong> files using an XML schema<br />

called MoML. MoML (which stands for Modeling Markup Language) is the primary persistent file<br />

format for Ptolemy <strong>II</strong> models. It is also the primary mechanism for constructing models whose definition<br />

and execution is distributed over the network.<br />

This chapter explains MoML. Most users will not need to edit MoML files directly. Use Vergil<br />

instead. Occasionally, however, it is useful to examine and/or edit MoML files directly.<br />

MoML is a modeling markup schema in the Extensible Markup Language (XML). It is intended<br />

for specifying interconnections of parameterized components. A MoML file can be executed as an<br />

application using any of the following commands,<br />

ptolemy filename.xml<br />

ptexecute filename.xml<br />

vergil filename.xml<br />

moml configuration.xml filename.xml<br />

These commands are defined in the directory $PT<strong>II</strong>/bin, which must be in your path 1 , where $PT<strong>II</strong><br />

is the location of the Ptolemy <strong>II</strong> installation. In all cases, the filename can be replaced by a URL. The<br />

Heterogeneous Concurrent Modeling and Design 191

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!