5.4.1. System-Based Logical Model

After parsing the source files from any language, Sonargraph creates a system-based logical model based on the parser model which correspond to following diagram:

System-Based Logical Model
Figure 5.8. System-Based Logical Model

The system-based logical model is constructed in a way that the mapping from physical elements to logical elements occurs in the internal and external scopes separately meaning that the following conditions will be met:

  • Given a physical element "abc" inside a module of the user code and a physical element "abc" inside the external elements, there will be a logical element "abc" belonging to the InternalLogicalNamespaceRoot and another logical element "abc" belonging to the ExternalLogicalNamespaceRoot in the system-based logical model.

  • Given a physical element "abc" inside a module X of the user code and a physical element "abc" inside the module Y also in the user code, there will be a single logical element "abc" belonging to the InternalLogicalNamespaceRoot in the system-based logical model.