MoML is a modeling markup language based on XML. It is intended for
specifying interconnections of parameterized components. Its key
features include:
Web integration. MoML is an XML dialect. XML, the
popular extensible markup language, provides a standard syntax and a
standard way of defining the content within that syntax. The syntax is
a subset of SGML, and is similar to HTML. It is intended for use on the
internet, and is intended for precisely this sort of specialization
into dialects. File references are via URIs (in practice, URLs), both
relative and absolute, so MoML is equally comfortable working in
applets and applications.
Implementation independence. The MoML language is designed to work
with a variety of tools. A modeling tool that reads MoML files is
expected to provide a class loader in some form. Given the name of a
class, the class loader must be able to instantiate it. In Java, the
class loader could be that built in to the JVM. In C++ or other
languages, the class loader would have to implemented by the modeling
tool.
Extensibility. Components can be parameterized in two ways. First,
they can have named attributes with string values. Second, they can be
associated with an external configuration file that can be in any
format understood by the component. Typically, the configuration will
be in some other XML dialect, such PlotML or GraphicML.
Support for visual rendering. Models in MoML can provide
annotations that serve as hints or specifications for a visual
rendering tool, such as a block diagram editor. For example, components
can specify a location and can reference an external configuration file
that defines a visual rendition, such as an icon.
Classes and inheritance. Components can be defined in MoML as
classes which can then be instantiated in a model. Components can
extend other components through an object-oriented inheritance
mechanism.
Semantics independence. MoML defines no semantics for an
interconnection of components. It instead provides a mechanism for
attaching to a model a director. The director defines the semantics of
the interconnection. MoML knows nothing about directors except that
they are instances of classes that can be loaded by the class loader.
The key observation in the design of MoML is that the most important
decision for such a language is the abstract syntax supported by the
language, not the concrete syntax. It is far less important what
punctuation is used, and how the textual data is structured, than what
the data represents. We are using the GSRC abstract syntax, a form of
clustered graphs. The concrete syntax follows from the abstract syntax
by designing an XML dialect to most concisely represent this abstract
syntax. A MoML tool has been constructed using Ptolemy II.