Design Description

http://img.thedailywtf.com/images/201101/DependencyGraph.png

Complex Dependency Diagram (TheDailyWTF)

Core

  1. XML Parser leverages external libraries to process XML files.

  2. Validator validates XML configuration and input files against the RELAX NG schema. The validation against the schema is an integral part of the initialization. Values that pass the validation against the schema are not re-checked by users of those values.

  3. Settings manages overall analysis settings per run.

  4. Config manages program configurations and analysis settings from a configuration file.

  5. Containers: models, fault trees, event trees, components.

  6. Analysis constructs: anything that is stored in containers and can be an input for analysis. Note that some containers are constructs as well.

    • Formula, Expressions, and other facilities used by the analysis constructs.
  7. Initializer processes input files to construct a model with fault trees, event trees, CCF, and other analysis containers and constructs. This initialization phase validates the values and logic supplied from the input files. The constructs and analyses are initialized according to the configurations supplied from the configuration file and command-line. After the initialization step, it is not expected that constructs of the analysis change.

  8. Risk Analyzer operates on a valid model with initialized fault, event trees, and other constructs to provide the requested results. It runs after the initialization phase with the user-specified analysis settings.

  9. Analyzers of fault trees, event trees, CCF, uncertainty, and other analysis kinds. These analyzers are employed by the main Risk Analyzer to produce final results. Common facilities, utilities, and functionalities can be shared among these analyzers. Analyzers and analysis facilities are designed in the spirit of Design by Contract and Policy-based design to keep the code simple and flexible with algorithms.

    1. Fault Tree Analyzer operates on one fault tree with a single top event, and may provide primary events, intermediate events, and products (minimal cut sets or prime implicants) as output, or other information about the passed fault tree. This fault tree analyzer uses many other helper facilities specifically designed to make the analysis efficient and fast.
    2. Probability Calculator accepts the results of Fault Tree Analyzer to calculate the total probability and to provide facilities for other Quantitative analyzers.
    3. Importance Analyzer calculates importance factors of important basic events with Probability Calculator facilities.
    4. Uncertainty Analyzer uses Probability Calculator facilities to sample basic event probabilities and calculate the total probability. Sampled results are processed to find statistical information, such as mean, confidence ranges, standard deviation, and distributions.
  10. Reporter outputs the results of the work of Risk Analyzer to specified files or streams in XML format.

  11. Support components: Logger, XML stream, and library extensions in the ext namespace.

cppdep Component Dependency Report

../_images/scram_core.svg

################################################################################
analyzing dependencies among packages in the specified package group scram ...
================================================================================
2 level(s):

level 0:
	Dependencies
level 1:
	ext
	gui
	include
level 2:
	core
================================================================================
SUMMARY:
Components: 4	 Cycles: 0	 Levels: 2
CCD: 5	 ACCD: 1.25	 NCCD: 0.66 (typical range is [0.85, 1.10])

################################################################################
analyzing dependencies among components in the specified package scram.core ...
================================================================================
1 cycles detected:

cycle #0 (2 nodes): bdd, zbdd
cycle #0 (2 edges): bdd->zbdd zbdd->bdd

================================================================================
13 level(s):

level 0:
	Boost
	LibXML
	STL
	ext
level 1:
	env
	error
	random
	version
level 2:
	element
	logger
	settings
	xml
	xml_stream
level 3:
	analysis
	config
	expression
level 4:
	event
	expression/boolean
	expression/conditional
	expression/constant
	expression/exponential
	expression/random_deviate
	expression/test_event
	parameter
level 5:
	event_tree
	expression/numerical
	pdag
level 6:
	ccf_group
	cycle
	event_tree_analysis
	preprocessor
level 7:
	bdd <0>
	zbdd <0>
	fault_tree
level 8:
	fault_tree_analysis
	mocus
	model
level 9:
	initializer
	probability_analysis
level 10:
	importance_analysis
	uncertainty_analysis
level 11:
	risk_analysis
level 12:
	reporter
level 13:
	scram
================================================================================
SUMMARY:
Components: 40	 Cycles: 1	 Levels: 13
CCD: 331	 ACCD: 8.28	 NCCD: 1.84 (typical range is [0.85, 1.10])

################################################################################
analyzing dependencies among components in the specified package scram.ext ...
================================================================================
1 level(s):

level 0:
	Boost
	STL
level 1:
	algorithm
	combination_iterator
	find_iterator
	index_map
	linear_map
	variant
================================================================================
SUMMARY:
Components: 6	 Cycles: 0	 Levels: 1
CCD: 6	 ACCD: 1.00	 NCCD: 0.44 (typical range is [0.85, 1.10])