The MMT Language and System

Building Documents

Calling Build Targets

MMT can be used as a build tool using a special shell command.

build ARCHIVE TARGET [P/A/T/H] runs the build target TARGET on the archive with id ARCHIVE. Optionally, the operation can be restricted to the subfolder P/A/T/H.

Defining Build Targets

The collection of build targets is maintained by the extension manager. New build targets are defined by implementing the archives.BuildTarget class. Build target modfiers and change management are supported for automatically for every build target.

Build Target Modifiers

  • The target TARGET* only operates on input files that have been modified since the last build.
  • The target -TARGET cleans, i.e., deletes the generated files.

The file-properties of the operating system are used to detect changes. Timestamps for the previous build are stored in META-INF/timestamps.

Individual Build Targets

Many build targets work with input and/or output dimensions. Those are the top level folders within an archive. The most important build targets (which are available by default) include:

TargetInput dimensionOutput dimensionProvided byDescription
indexsourcecontent, narration, relationalapi indexes and prepares OMDoc source files for MMT lookups, the produced dimensions are from where MMT retrieves content, documents, and the ontology, respectively
mmt-omdocsourceas indexapi like index but parses and type-checks MMT source files instead of OMDoc files
twelf-omdocsourceas indexLF plugin like mmt-omdoc but for Twelf syntax
htmlnarrationhtmlapi produces html website, which relates to source roughly as JavaDoc does to Java
svgnarrationsvgapi produces theory graphs
scalacontentscalaapi produces Scala stubs for all MMT theories
lf-scalacontentlf-scalaLF plugin produces LF-aware typed Scala stubs
marmultiplenone, produces file NAME.marapi creates a math archive, a zipped collection of the archive

Build Queue Interface

See Build Queue for detailed information on multi-threaded building.

Error Viewer Interface

See Error Viewer for detailed information on seeing the results of building many files.