6.2.5.9. Architecture-GravisArchitecture

Architecture check using GXL files for architecture and mapping

Required inputs: RFG

This rule performs a Gravis-based architecture analysis using GXL files for model and mapping information. Steps for using it:

  • model architecture in Gravis,
  • manually map source code in Gravis,
  • export architecture and mapping into GXL files within Gravis and
  • provide the correct view names and file paths to the rule.

Possible Messages

This rule has no predefined messages.

Options

allow_dependencies_to_parents

allow_dependencies_to_parents : bool = False

'Allow dependencies to parents.
 

architecture_file

architecture_file : bauhaus.analysis.config.LayerRelativePath = 'None (value must be set)'

Path of the GXL file containing the architecture view.
 

architecture_view_name

architecture_view_name : str = 'Architecture'

Name of the architecture view.
 

base_view_name

base_view_name : str = 'Declaration Facts'

Name of the base view.
 

browsable_mapping

browsable_mapping : str = ''

Sets the browsable mapping mode: "Minimal" or "Full"; default is no browsable mapping.
 

causing_elements_view

causing_elements_view : str = 'causing_elements_view'

Name of the causing elements view view.
 

csv_output_file

csv_output_file : bauhaus.analysis.config.LayerRelativePath | None = None

Optional CSV file in which architecture check results are additionally written.
 

declaration_forwarding

declaration_forwarding : bool = True

Whether special logic should be used for resolving of declaration mapping targets.
 

declare_edge_type

declare_edge_type : str = 'Declare'

Name of the edge type used for computing declaration mapping targets.
 

export_warnings

export_warnings : bool = True

Export output messages to the analysis database.
 

generate_violation_previews

generate_violation_previews : bool = True

Whether to generate images of the architecture violations to be shown in the dashboard. This is an expensive operation and can be skipped to shorten the runtime of this rule. This option requires a minimal or full browsable mapping, therefore it automatically overwrites the option 'browsable_mapping' to 'Minimal' if no browsable mapping has been chosen.
 

hierarchy_view_name

hierarchy_view_name : str = 'File'

Name of the hierarchy view.
 

ignored_edge_types

ignored_edge_types : set[str] = set()

Edge type names of code dependencies which should not be reported as divergences or convergences; E.g. set(["Dynamic_Call", "Use_Of_Type"]).
 

loglevel

loglevel : LogLevel = 'WARNING'

Logging mode. WARNING only outputs errors and warnings, INFO additionally prints info messages, DEBUG additionally outputs info and debug messages.
 

mapping_file

mapping_file : bauhaus.analysis.config.LayerRelativePath = 'None (value must be set)'

Path of the GXL file containing the mappig view.
 

mapping_view_name

mapping_view_name : str = 'Mapping'

Name of the mapping view.
 

preprocessing_step

preprocessing_step : typing.Callable[[_dg.Graph], typing.Optional[_dg.Graph]] | None = None

User-defined function that gets the RFG graph after importing the GXL files as argument; allowing preparation steps before checking the architecture. The returned RFG is used for the architecture check, if None is returned, the analysis aborts.
 

preview_generation_limit

preview_generation_limit : int = 10000

Limit for generating architecture violation previews. If the number of causing edges exceeds this limit, then no images are generated at all. This protects the analysis run from spending a disproportionate amount of processing time on generating previews in case of an incomplete or accidentally broken architecture.
 

result_types_to_report

result_types_to_report

Type: set[ArchitectureAnalysisResultType]

Default: {'Absence', 'Divergence'}

Result types that should be reported; currently possible values are "Absence", "Divergence", and "Convergence".
 

result_view_name

result_view_name : str = 'Architecture Check'

Name of the resulting view.
 

root_edge_type_name

root_edge_type_name : str = 'Source_Dependency'

The root type of the edge type hierarchy whose contained types are interpreted as dependencies for the architecture check.
 

Option Types

These types are used by options listed above:

ArchitectureAnalysisResultType

Types of possible architecture result edges.
 
  • Absence

  • Convergence

  • Divergence

LogLevel

An enumeration.
 
  • WARNING

  • INFO

  • DEBUG