Modelling TRAK - Producing the TRAK Metamodel Web Pages
The Model of TRAK
The model of TRAK is based upon a set of (non-TRAK) architecture viewpoints - specifications for creating and interpreting architecture views, each of which is is designed to frame specific concerns. The architecture viewpoints and use of the model are :-
‘Architecture Description Viewpoints. Metamodel Description, Implementation and Model Changes ’, Eclectica Systems Ltd, 3736126–001, Jul. 2024
‘Using directed graphs to define viewpoints to keep a metamodel, an architecture framework and views using different modeling languages consistent’, Engineering Reports, vol. 2, no. 6, p. e12168, Jun. 2020, doi:10.1002/eng2.12168.
At the time of writing the TRAK metamodel consists approximately:-
- c 900 triples
- c 52 node elements
- c 80 connector elements
- c 125 properties
- c 94 values
The Architecture Description Viewpoints document defines a set of viewpoints used to
- record versions and changes in a model
- define a metamodel element, its properties and property values
- define a metamodel triple using the previously defined metamodel elements
- define an architecture viewpoint using triples
- define dependencies between architecture views
- define an implementation of a metamodel
The pages on this site are produced using the latest version (1), the metamodel element, properties and property values (2), the metamodel triples (3) and the originating views (4 and 5) i.e. all but the last implementation viewpoint as described in Architecture Viewpoints Web Page Support.
The model of TRAK is held in a Neo4J graph database. This holds triples natively - there are no tables. The CYPHER query language is used to create triples, set properties and extract the required information.
CYPHER queries are simply instructions to follow a path through a metamodel.
The pages produced using the model include:-
Metamodel Element Page(s)
Each metamodel element web page presents the characteristics of an individual node or connector element from the TRAK metamodel.
- using the correct versions
- context diagram
- definition and properties
- neighbouring elements
- appears in triples
- originating architecture view
Using the Correct Versions
The Model Change and Configuration Viewpoint is needed to ensure that only the latest version of the TRAK metamodel elements, properties, property values and architecture viewpoints are used. The model holds each successive version - when something is removed it is simply not included in any version following the point of removal but the 'deleted' element is still held within the model.
Using CYPHER all we need then to check for is 1) that the latest version includes an element and b) no version follows the latest version (which is what makes it the latest version)
TRAK uses the Standard metamodel element to represent a normative document. In this application both the metamodel and the viewpoints have a Standard element to represent the two specifications - TRAK00002. TRAK. Architecture Framework. Metamodel and TRAK00001. TRAK. Architecture Framework. Viewpoints respectively.
Context Diagram
The Metamodel Tuple Structure Definition Viewpoint does what it says on the tin - it is used to define the TRAK metamodel elements that form the start, end and the connector used for each triple.
In this application the context diagram is obtained by collecting the triples in which the element is used as subject (start element), object (end element) or predicate (as the connector).
In addition to only using the latest version we have, for an element:-
Definition and Properties
The Node or Connector element then provides:-
- definition
- comments
- tests for
- tests against
Most elements, properties and property values are defined with reference to an ontology such as the Oxford English Dictionary (OED), or Dublin Core Metamadata (DC). This is represented by a relationship between an Connector, Node, Property or Value and an Ontology Element.
Parent / Child Elements
The class hierarchy is obtained - upwards to a parent and downwards to a child:
Neighbouring Elements
The list of triples generated to create the context diagram is used again to create a list of unique node elements in those triples
Appears in Triples
The list of triples generated to create the context diagram is used again to create a textual list of triples in which the element participates.
For example - the Vulnerability element:
Originating Architecture View
Dependencies arise between architecture view because a metamodel triple is first created on one view before being used on one or more other Architecture Views.
This is represented using:-
- Architecture View IS ORIGIN FOR Architecture Description Tuple - to define the originating view
- (source) Architecture View SUPPLIES Architecture Description Tuple SUPPLIED TO (destination) Architecture View
Note that the SUPPLIES and SUPPLIED TO relationships each have a 'source view' property to record the identifier of the source architecture view to allow each supply path to be distinguished.
In this application we simply need to follow work backwards from the element to the triples appears in to the originating architecture view.
Summary by Architecture Perspective
A single page summmarises the architecture perspectives in TRAK and the elements in each perspective. This is described using:
which is followed by a CYPHER query: