This section gives an overview of MMT’s abstract syntax and the corresponding classes in the MMT API. MMT’s surface syntax is described in detail here.
The (simplified) abstract syntax of MMT is:
Level | Symbol | Grammar | Description |
---|---|---|---|
Document Level | |||
. | Doc |
:= (Thy | Mor)* |
Documents |
Module Level | |||
. | Thy |
:= c [:o] = {Dec*} |
Theories |
. | Mor |
:= c : o -> o = {Ass*} |
Views |
Symbol Level | |||
. | Dec |
:= c [:o] [=o] [#N] |
[Declarations]((../../language/declarations.html) |
. | Ass |
:= c = o |
Symbol [Assignments]((../../language/declarations.html#constants) |
Object Level | |||
. | o |
:= c | x | c( (x[: o])* ; o* ) | c(STRING) |
Objects/Terms |
. | N |
Notations | |
. | c |
URI | |
. | x |
Variable |
api.Content
is the top level datastructure for all of the classes representing the MMT language. For our purposes, it branches into
api.NarrativeElement
(described here), e.g. documents,api.StructuralElement
(described here), e.g. modules, declarations andobjects.Obj
(described here), e.g. terms and contexts.The following inheritance graph gives an overview of the most relevant data structures in the MMT API: