An abstract type describes properties common to many other types but cannot itself be represented.
An alias is a local name for a symbol defined in another module. An alias may be specified on an import.
An ambiguity results when the language processor cannot uniquely determine which of several constructors to run for a given segment of text because the segment is recognized by more than one production. The competing productions do not have to be in the same rule. Ambiguities are resolved by refactoring the grammar and applying precedence directives.
A computed value is applied to its arguments to yield a new value.
Arity is the number of arguments a computed value requires.
Ascribing a type to a value requires that the value conform to the type and exposes the behaviors defined on that type.
A pattern may be ascribed with a named variable scoped to the production. When that pattern matches a section of text, that section of text is bound to the variable for use the constructor.
A collection is a container for zero or more values. The values in a collection are called elements. The same value may occur in a collection multiple times but have no order. This is also known as a bag or multiset.
A comment is a sequence of characters in a compilation unit that is excluded from semantic analysis.
A compilation unit is an ordered sequence of Unicode characters that conform to the lexical and grammatical requirements.
A concrete type can be represented.
A conflict results whenever the language processor faces a choice in what action to take on a section of text. There are two sorts of conflicts: shift-reduce and reduce-reduce. Not all conflicts result in ambiguities because some conflicts are resolved by applying precedence directives and some conflicts are local. A local conflict means that the language processor faces multiple choices on a section of text, but in a larger context only one collection of choices recognizes the text.
Text conforms to a language if the text matches the Main rule.
A constraint is a logical test to determine if an element is a member of a collection.
A constructor defines the output for a production.
Context-free is a term from computer science to designate a class of languages. All languages in this class can be written with a single non-terminal on the left-hand side of the rule and can be recognized with a push-down automaton.
A declaration binds a symbol to a type or computed value.
A default is a value to be used unless no other is specified.
A derived type is constraint over some other type.
A dynamic quality is any quality that is not static.
An element is a value in a collection.
An entity is a set of labeled values.
An export makes a symbol visible outside the module in which it was declared. It is not visible within another module unless it is imported.
An expression is a sequence of Unicode characters that conforms to the Expression production in the grammar. In general it consists of an operator and one or more operands. Applying the operator to the operand yields a new value.
An extent is a location that holds a value at the module scope.
A field is a location that holds a value at the entity scope.
A grammar is a set of rules that determine if a sequence of characters conform to a language. As used in the specification, these rules are context-free.
An identifier is a symbolic name for use in a program. Type names, formal parameters, module names, and names of computed values are all examples of identifiers.
Identity is a value that implies equality between entities. The identity value can be used as a surrogate for the entity itself as in a reference.
An import makes a symbol visible outside the module in which it was declared visible within the module containing the import.
An initializer in an expression that returns a collection or entity value.
An instance is a value that conforms to an entity type.
Designating a rule interleave separates the sections of text recognized by the rule from normal language processing. These are used to define insignificant whitespace and comment rules.
Intrinsic definitions are part of the language and cannot be added to or extended by a library.
A language is a collection of rules potentially with a designated Main rule. If the language has a Main rule, and a text value matches that rule, then the text value conforms to the language or is recognized by the language. In this case, the output of the rule is the output of the language.
A lexical rule determines if a sequence of characters conform to a language. As used in this specification, lexical rules are regular expressions, and ambiguity is resolved by taking the longest match.
A library is an informal name for a commonly used collection of declarations.
A literal is a sequence of characters that represent a simple value.
A member is a field or computed value within an entity scope.
A module is a unit of encapsulation.
Values in a nominal type system names the types they are members of. Also, subtypes name their supertypes.
The value null is a distinct value that is used as a placeholder.
An operand is an expression used as an argument to an operator.
An operator is a character or sequence of characters that is used in an expression to denote a computed value.
Overloading is giving the same symbol multiple interpretations within the same scope. The only form of overloading in M is on the number of arguments to a computed value.
A parser is a language processor.
A pattern occurs on the left side of a production and recognizes text and potentially binds the text to a variable.
Precedence is a statement of preference between two choices available to the language processor.
A prefix is a section of a text value from the beginning of the value to an arbitrary point. Both the empty value and the whole text value are prefixes of a text value.
Pre-processing includes or excludes portions of a compilation unit as determined by pre-processing directives.
A production consists of a pattern and an optional constructor.
A program is a collection of compilation units that conform to the lexical, grammatical, and semantic rules of the language.
A projector yields a new collection with one member from all the elements in a source collection.
A query is an expression that yields a new collection from one or more input collections.
A language recognizes a text value if it matches the Main rule.
A reduce-reduce conflict occurs if two rules match the same section of text. It may be resolved using precedence.
A reference holds the identity value of another entity.
Regular is a term from computer science for a class of languages. It is a subclass of the context-free languages in which the rules are tail recursive and can be recognized by a finite-state automation.
A representation is a storage format for a value. Typically a representation will restrict precision or stipulate an encoding.
A rule is a collection of productions with an optional name. There are three forms of rules: syntax, token, and interleave.
Scope is the range in which a symbol is defined within the source text. A scope is a container for symbol declarations. In M scopes are lexical, which means they can be determined from the block structure of the language (unless otherwise specified).
A selector yields a new collection containing all the elements of a source collection with a member equal to a value given as an argument.
A collection of distinct elements.
A shift-reduce conflict occurs when the language processor can take different actions on two productions or within a single production. It may be resolved using precedence.
The start rule is the first rule a language processor attempts to match when recognizing a text value. The start rule for Mg is named Main.
A static quality is any quality that can be determined by reviewing the source text alone.
A location that holds a value (see field and extent).
A type whose membership is determined by satisfying a structural pattern and possibly other constraints.
A subtype, S, is a type that permits only values of some other type, T.
A supertype, T, is a type that permits all of the values of some other type, S.
A symbol is an identifier in the source text. Symbols are defined within scopes. Modules control the visibility of symbols.
Syntax is used in two ways. In the general sense, syntax is the rules that define a language. In Mg, syntax is used to designate a rule that defines a context-free language.
Token is used to designate a rule that defines a regular language. It is also used to name the sections of a text value recognized by such a rule.
A type is a predicate over values that yields a collection.
An element is unique within a collection if no other element is equal to it.
Syntactically, a value is and expression constructed solely from literals and initializers. It contains no variable reverences, computed values, or operators. Conceptually a value is any abstract notion that can be represented in this way.
A variable is a symbolic name for value.