The MMT Language and System

The Controller

The MMT code is distributed over multiple components. The frontend.Controller class creates one instance of each component. These components include the following:

  • The frontend.Memory stores all known instances of data structures of the MMT language, i.e., documents, theories, etc. It provides methods for retrieving, adding, updating, and deleting knowledge items identified by their MMT URI. The same methods are present on the Controller class. High-level requests should always go through the Controller to benefit from transparent retrieval and change management.
  • The backend.Backend maintains connections to all known physical locations of MMT content. When retrieving a knowledge item by its MMT URI that is not held in memory, it is transparently retrieved by the backend and stored in the memory.
  • The frontend.ExtensionManager maintains all registered extensions.
  • The parser.Parser reads data structures in native MMT text syntax.
  • The checking.MMTStructureChecker validates MMT data structures.
  • The ontology.Evaluator evaluates queries of the MMT query language.
  • The simplifier (uom.UOM) is a rewriting-like engine for MMT expressions that performs simplification and computation.

No static part of the MMT code maintains state: All stateful objects are maintained by the Controller or by one of the components maintained by the Controller. Components that must communicate with the Controller or with other components are passed the appropriate instance as a constructor argument.