Home   :   Matrix Language   :   Pattern Statements

Matrix Pattern Statements

 

Statements

 

Identifier Statements:

Identifier

OwnKey

ForeignKey

 

Identifier Selection Statements:

IdentifierSelection

IdentifierKey

KeySelection

NullKeySelection

 

Traverse Identifier Statements:

TraverseIdentifier

TraverseKey

NullIdentifierSelection

 

Traverse Unique Statement:

TraverseUnique

 

Include Statements:

SystemInclude

MatrixInclude

SiloInclude

RealmInclude

DomainInclude

EntityInclude

StateInclude

ActionInclude

ProcessDomainInclude

ProcessEntityInclude

 

Define Include Statements:

DefineSystemInclude

DefineMatrixInclude

DefineSiloInclude

DefineRealmInclude

DefineDomainInclude

DefineEntityInclude

DefineStateInclude

DefineActionInclude

DefineDomainProcessInclude

DefineEntityProcessInclude

 

 

Overview

 

These statements are the advanced, sophisticated and instrumental statements of the Matrix language. By incorporating new pattern statements, Matrix becomes a fully extensible language that continuously evolves.

 

Pattern statements are discovered by users of the language and appear as arrangements of primitives and other patterns which provide some generically useful functionality. Patterns are important because not only do they make the Matrix code more readable and concise, they also signal the analyst's intention to the Model Compiler which enables more efficient source code to be generated and more sophisticated error checking to be performed.

 

Generally, applicable patterns are incorporated into the Model Compiler (therefore, into subsequent generations of Model Compilers) and become part of the growing Matrix language.

 

Implementation of a pattern statement will always be more efficient than the equivalent primitive statements. A general rule is that it must always be possible to implement a pattern statement in terms of two or more primitive statements.

 

Pattern statements must not rely on the use of temporary process data. Indeed, one of the motivations for creating a pattern statement is to eliminate the need for the definition of process data in a model specification, thereby simplifying the code in the model.

Copyright © 2017 Dark Matter Systems Ltd. All Rights Reserved.