6.5.1.2. Edges (Dependencies)

Edge Types

Source_Dependency

The edge-source-dependency Source_Dependency is an abstract edge type, all other edges that somehow describe what is going on in the source code inherit from this edge type.

Note

You can use this edge to express “some kind of relationship” in an architecture model.

Call

A edge-call Call represents a call between node-routine Routines. The edge is directed from the calling routine to the called routine.

// Copyright (C) 2025 Axivion GmbH
// Copyright (C) 2025 The Qt Company GmbH, a subsidiary of The Qt Group
// https://www.qt.io

void g (void);
void h (void);

void f (void) 
{
  g();
  h();
}

Calls from routine :code:`f` to routines :code:`g` and :code:`h`.

Calls from routine f to routines g and h.

Reference

A edge-reference Reference represents setting, using, or address-taking of an node-object Object or node-member Memberby a node-routine Routine. The edge is directed from the routine to the object/member. Similarly, address-taking of node-routine Routines is represented by edge-reference References between the routines. Since Reference is an abstract edge type, edges of this type will not appear within a view created directly from code like Code Facts. Instead, one of its concrete subtypes (e.g. Member_Set, Variable_Use or Routine_Address) will be used (see also the example below). However, Reference can be used within architecture model views to express a more restricted dependency than e.g. Source_Dependency.

// Copyright (C) 2025 Axivion GmbH
// Copyright (C) 2025 The Qt Company GmbH, a subsidiary of The Qt Group
// https://www.qt.io

int G;
int H;

void f (void)
{  
  G = H;
}
References from a routine :code:`f` to objects :code:`H` (reading its value) and :code:`G` (setting its value).

References from a routine f to objects H (reading its value) and G (setting its value).

Signature

A edge-signature Signature represents that a type occurs in the signature (i.e., either as parameter type or as return type) of a node-routine Routine. The edge is directed from the routine to the type. Since Signature is an abstract edge type, edges having this type will not appear within a view created directly from code like Code Facts. Instead, one of its concrete subtypes Parameter_Of_Type or Return_Type) will be used (see also the example below). However, Signature can be used within architecture model views to express a more restricted dependency than e.g. Source_Dependency.

// Copyright (C) 2025 Axivion GmbH
// Copyright (C) 2025 The Qt Company GmbH, a subsidiary of The Qt Group
// https://www.qt.io

typedef int T;

T f (void) {}
void g(T param) {}
Type :code:`T` occurs in the signature of routine :code:`f` (as return type) and in the signature of :code:`g` (as parameter type).

Type T occurs in the signature of routine f (as return type) and in the signature of g (as parameter type).

Note

The meaning of signature used here does not necessarily follow the semantic of the programming language under analysis. In some languages, the return type belongs to the signature, in others it does not. We always show the maximum of information that is available, not the information the language will use for overloading etc.

Of_Type

edge-of-type Of_Type models that an node-object Object is of a type. The edge is directed from the node-object Object to the type.

// Copyright (C) 2025 Axivion GmbH
// Copyright (C) 2025 The Qt Company GmbH, a subsidiary of The Qt Group
// https://www.qt.io

typedef int T;
struct S { T member; };
A :code:`member` is of type :code:`T` (and the member is part of type :code:`S`).

A member is of type T (and the member is part of type S).

Extend

An edge-extend Extend represents a direct inheritance relation of two classes. The edge is directed from the child class to the parent class.

// Copyright (C) 2025 Axivion GmbH
// Copyright (C) 2025 The Qt Company GmbH, a subsidiary of The Qt Group
// https://www.qt.io

class P {};

class C : public P {};
A class :code:`C` extends its parent class :code:`P`.

A class C extends its parent class P.

Instance_Of

An edge-instance-of Instance_Of edge indicates a template instantiation relation between a node-template Template node and an instantiated entity (e.g., a generic class and a class in C#).

// Copyright (C) 2025 Axivion GmbH
// Copyright (C) 2025 The Qt Company GmbH, a subsidiary of The Qt Group
// https://www.qt.io

template <class T> void TF (void) {}

void caller(void)
{
  TF<int>();
}
A template function :code:`TF` and an instantiation of that template called by routine :code:`caller`.

A template function TF and an instantiation of that template called by routine caller.

Instantiate

An edge-instantiate Instantiate E → T edge indicates that an entity E (like a member of a class) references an instance of a type T.

Enclosing

An edge-enclosing Enclosing edge indicates that an entity is enclosed within another entity (e.g., a member is declared inside a type).

The hierarchy expressed by edge-enclosing Enclosing edges and other kinds of edge-belongs-to Belongs_To edges must form a forest.

// Copyright (C) 2025 Axivion GmbH
// Copyright (C) 2025 The Qt Company GmbH, a subsidiary of The Qt Group
// https://www.qt.io

class T {
public:
  int field;
  void method (void);
};
A type :code:`T` and its enclosed entities :code:`field` and :code:`method`.

A type T and its enclosed entities field and method.

Attributes

Attributes to nodes and edges are named according to a hierarchical schema. The parts of an attribute name are separated by dots, e. g., “Source.Name”. The following top-level classification for attribute prefixes is used:

Name Prefix

Meaning

Source

Information on the source: Position, name etc.

Linkage

Information for the linkage process: Link name, definition state etc.

Element

Information on the language-based semantic of the element: visibility state, staticness, kind of type etc.

Metric

Metric information: Lines of Code, Halstead, McCabe etc.

other prefixes

Attributes added by analyses (later on in the analysis process) or the visualization front ends.

Source.Name

The Source.Name (of type string) is the name the entity possesses in the source code. If an entity does not have a name, for instance anonymous structs in C, their name will be a question mark ?.

Linkage.Name

The Linkage.Name (of type string) unambiguously identifies the entity within one RFG.

Note

The language front ends guarantee this property for the translation units they process at once, except for cases like violations of the one-definition rule. It is also possible to combine (link) RFGs representing source units that do not link in reality, in which case the property of uniqueness is not guaranteed anymore. The same is true if one adds nodes by means of scripts or by incorporating GXL files. The RFG itself does not prevent or even warn about non-unique link names.

Source.File, Source.Path, Source.Line, Source.Column

Source.File and Source.Path are of type string, Source.Line and Source.Column are of type int.

For a node in the Code Facts view, these four attributes characterize the source location of the definition of the entity. If no definition has been seen, one of the declarations is chosen arbitrarily. If there is more than one place of definition in the source, one is chosen arbitrarily.

For a node in the Declaration Facts view, the four attributes characterize the source location of the definition or declaration (an entity may have multiple nodes that represent its definition and its possibly various declarations).

Note

Nodes of the two views Code Facts and Declaration Facts can also be part of other views.

Note

As long as any entity has a unique point of definition (e.g., only in one header or C source file), the source location information will be the same, no matter which order of translation and linking of the system is performed.

Linkage.Is_Definition

The attribute of type toggle indicates whether the node represents a definition. Nodes that do not possess this attribute are from the environment (e.g., printf) or in parts of the system under analysis that are not yet analyzed. If you create partial RFG files, the parts that are not inside the partial RFG are also not marked with Linkage.Is_Definition.

There are additional attributes for language-specific information.