All Projects → rakhimov → Scram

rakhimov / Scram

Licence: gpl-3.0
Probabilistic Risk Analysis Tool (fault tree analysis, event tree analysis, etc.)

Programming Languages

python
139335 projects - #7 most used programming language
cpp17
186 projects

Labels

Projects that are alternatives of or similar to Scram

Xi Qt
A Qt front-end for xi-editor. Experimental (WIP)
Stars: ✭ 85 (-13.27%)
Mutual labels:  qt5
Diceparser
Powerful dice Roller is used as discord bot, irc bot, cli tool and inside Rolisteam : 1d20+4, 1L[head,arm,leg,belly,chest], 1d6+1d8, 8+5*3
Stars: ✭ 90 (-8.16%)
Mutual labels:  qt5
App
free software application for social network analysis and visualization
Stars: ✭ 94 (-4.08%)
Mutual labels:  qt5
Godog
Cucumber for golang
Stars: ✭ 1,287 (+1213.27%)
Mutual labels:  bdd
Qtbase
Qt Base (Core, Gui, Widgets, Network, ...)
Stars: ✭ 1,298 (+1224.49%)
Mutual labels:  qt5
Fastqt
FastQC port to Qt5: A quality control tool for high throughput sequence data.
Stars: ✭ 92 (-6.12%)
Mutual labels:  qt5
Borg Backup Gui
BORG BackUP GUI is a simple GUI for managing Borg backups. Currently I am developing some extensions.
Stars: ✭ 77 (-21.43%)
Mutual labels:  qt5
Packetsender
Network utility for sending / receiving TCP, UDP, SSL
Stars: ✭ 1,349 (+1276.53%)
Mutual labels:  qt5
Reader
Reader for PDF,use Qt5 and Poppler
Stars: ✭ 89 (-9.18%)
Mutual labels:  qt5
Qtrpi
An easy-to-use environment to cross-compile Qt applications for Raspberry Pi from your desktop.
Stars: ✭ 93 (-5.1%)
Mutual labels:  qt5
Otter Browser
Otter Browser aims to recreate the best aspects of the classic Opera (12.x) UI using Qt5
Stars: ✭ 1,289 (+1215.31%)
Mutual labels:  qt5
Bitsofbytes
Code and projects from my blog posts.
Stars: ✭ 89 (-9.18%)
Mutual labels:  qt5
Tidal Discord Rich Presence Unofficial
UNOFFICIAL Tidal Discord Rich Presence
Stars: ✭ 93 (-5.1%)
Mutual labels:  qt5
Zdownloader
zdownloader is a download manager for ZippyShare, Google Drive and MegaUp services
Stars: ✭ 88 (-10.2%)
Mutual labels:  qt5
Albion Online Stats
Albion online stats is an extension to MMORPG game - Albion Online. It tracks network traffic and displays various statistics, such as damage and DPS meter calculated from in-game actions.
Stars: ✭ 97 (-1.02%)
Mutual labels:  qt5
Lettuce
Behavior-driven-development tool for python, inspired by Cucumber for Ruby ⛺
Stars: ✭ 1,229 (+1154.08%)
Mutual labels:  bdd
Quick
The Swift (and Objective-C) testing framework.
Stars: ✭ 9,303 (+9392.86%)
Mutual labels:  bdd
Cucumberjvmexamples
Cucumber JVM with Selenium Java
Stars: ✭ 98 (+0%)
Mutual labels:  bdd
Qshell
a simple desktop shell based on Qt5 and KF5
Stars: ✭ 97 (-1.02%)
Mutual labels:  qt5
Kindd
A kindful dd, written in qt-quick.
Stars: ✭ 93 (-5.1%)
Mutual labels:  qt5

SCRAM

.. image:: https://travis-ci.org/rakhimov/scram.svg?branch=develop :target: https://travis-ci.org/rakhimov/scram .. image:: https://ci.appveyor.com/api/projects/status/d36yu2w3t8hy4ito/branch/develop?svg=true :target: https://ci.appveyor.com/project/rakhimov/scram/branch/develop :alt: 'Build status' .. image:: https://codecov.io/github/rakhimov/scram/coverage.svg?branch=develop :target: https://codecov.io/github/rakhimov/scram?branch=develop .. image:: https://scan.coverity.com/projects/2555/badge.svg :target: https://scan.coverity.com/projects/2555 .. image:: https://api.codacy.com/project/badge/Grade/7067af3e78774325bb33894deac23b9c :target: https://www.codacy.com/app/rakhimov/scram?utm_source=github.com&utm_medium=referral&utm_content=rakhimov/scram&utm_campaign=Badge_Grade

|

SCRAM is a C\ommand-line R\isk A\nalysis M\ulti-tool.

This project aims to build a command line tool for probabilistic risk analysis. SCRAM is capable of performing event tree analysis, static fault tree analysis, analysis with common cause failure models, probability calculations with importance analysis, and uncertainty analysis with Monte Carlo simulations. This tool can handle non-coherent fault trees, containing NOT logic.

SCRAM input and report files are based on the Open-PSA_ Model Exchange Format. For the current status of the Open-PSA MEF features in SCRAM, please see the MEF Support documentation.

A complementary GUI front-end is under development for visualization and manipulation of risk analysis models and reports.

To explore the performance of SCRAM or research fault trees, a fault tree generator script is provided, which can create hard-to-analyze fault trees in a short time.

The documentation_ contains a full description of SCRAM, its current capabilities, and future additions. The latest stable release is packaged for quick installation_ on various platforms.

.. _Open-PSA: http://open-psa.org .. _Model Exchange Format: http://open-psa.github.io/mef .. _MEF Support: https://scram-pra.org/doc/opsa_support.html .. _documentation: https://scram-pra.org .. _quick installation: https://scram-pra.org/doc/installation.html

.. contents:: Table of Contents


Building and Installing


Git Submodules

Some dependencies are provided with git submodules (e.g., Catch2). In order to initialize all the submodules, this repository must be cloned recursively with git clone --recursive, or the following commands must be executed after a normal clone.

.. code-block:: bash

git submodule update --init --recursive

Dependencies

==================== =============== Package Minimum Version ==================== =============== CMake 3.8 boost 1.61 libxml2 2.9.1 Python 3.4 Qt 5.9.1 ==================== ===============

Optional Dependencies

==================== =============== Package Minimum Version ==================== =============== TCMalloc 1.7 JEMalloc 3.6 Humanity Icons 0.6.13 ==================== ===============

Compilers

==================== =============== Package Minimum Version ==================== =============== GCC/G++ 7.1 Clang/LLVM 5.0 Intel 18.0.1 ==================== ===============

Installing Dependencies

Ubuntu

Python and GCC/G++ compiler are assumed to be available on the system. The process is tested on Ubuntu 17.10 using apt-get as the package manager:

.. code-block:: bash

sudo apt-get install -y cmake lib{boost-all,xml2,google-perftools,qt5{svg,opengl}5}-dev qt{base,tools}5-dev{,-tools} humanity-icon-theme

macOS

If on a Mac system, homebrew_ is a good package manager to use. It is assumed that some dependencies are provided by Xcode (e.g., Python, llvm/clang, make). The following instructions are tested on OS X 10.12:

.. code-block:: bash

brew install cmake boost libxml2 gperftools qt5

.. _homebrew: http://brew.sh/

Windows

MSYS2_/Mingw-w64_ is the recommended platform to work on Windows. Assuming MSYS2 is installed on the system, the following instructions will install SCRAM dependencies:

.. code-block:: bash

pacman --noconfirm -S mingw-w64-x86_64-{gcc,make,cmake,boost,libxml2,qt5}

SCRAM installation and executables must be run inside of the MSYS2 shell.

.. _MSYS2: https://sourceforge.net/projects/msys2/ .. _Mingw-w64: http://mingw-w64.sourceforge.net/

Installing SCRAM

The project is configured with CMake_ scripts. CMake generates native "makefiles" or build system configurations to be used in your compiler environment. If there are dependency issues, CMake output should guide with errors. The configuration and build must happen out-of-source (e.g., in build sub-directory).

.. code-block:: bash

.../scram/build$ cmake .. -DCMAKE_INSTALL_PREFIX=path/to/installation/directory -DCMAKE_BUILD_TYPE=Release

For Mingw-w64_ on Windows, specify -G "MSYS Makefiles" generator flag. To build tests, specify -DBUILD_TESTING=ON option.

Various other project configurations can be explored with CMake or its front-ends. For example:

.. code-block:: bash

.../scram/build$ cmake -L

.../scram/build$ ccmake .

.../scram/build$ cmake-gui .

An example build/install instruction with the CMake generated Makefiles:

.. code-block:: bash

.../scram/build$ make install

The main and test binaries are installed in installation/directory/bin. The input files and schema are copied in installation/directory/share/scram/.

Other tools, such as the fault tree generator, can be found in the scripts directory. These tools do not require compilation or installation.

.. _CMake: https://cmake.org


Running SCRAM and Tests


This guide assumes that SCRAM installation directories are in the global path. If this is not the case, path/to/installation/directory/bin/ must be prepended to the command-line calls. However, if SCRAM executables are not in the path, some system tests and scripts cannot be initiated.

To run SCRAM

Example configuration and input files are provided in the input directory.

.. code-block:: bash

scram path/to/input/files

On command line, run help to get more detailed information:

.. code-block:: bash

scram --help

Various other useful tools and helper scripts, such as the fault tree generator, can be found in the scripts directory. Help prompts and the documentation have more details how to use these tools.

To launch the GUI

To launch the GUI front-end from the command-line:

.. code-block:: bash

scram-gui

The command can also take project configuration and/or input files:

.. code-block:: bash

scram-gui path/to/input/files

scram-gui --project path/to/project/file

scram-gui path/to/input/files --project path/to/project/file

To run tests

To run the unit and benchmark tests:

.. code-block:: bash

scram_tests

To test the tools in the scripts directory:

.. code-block:: bash

.../scram/scripts$ python -m pytest test/

To test the command-line call of SCRAM:

.. code-block:: bash

.../scram/tests$ python -m pytest test_scram_call.py

To run performance tests

A set of performance tests is provided to evaluate the running times on the host machine and to help developers check for regressions. More details can be found in performance test source files.

To run all performance tests (may take considerable time):

.. code-block:: bash

scram_tests [.perf]

To run GUI tests

Unfortunately, Qt Test does not automatically register or manage all its test cases, nor does it provide a single test driver. Each test case is a separate binary with its own commands and reports. Take a look at path/to/installation/directory/bin directory for the compiled scramgui_test${CASE_NAME} binaries to run.

All Qt Tests are also manually registered with CTest so that it is possible to run all the GUI tests at once:

.. code-block:: bash

.../scram/build$ ctest --verbose

To run fuzz testing

The main goal of SCRAM fuzz testing is to discover defects in its analysis code. It is recommended to build SCRAM with assertions preserved and sanitizers enabled, for example, address sanitizer in GCC and Clang -fsanitize=address.

In order to speed up the fuzz testing, SCRAM may be built with optimizations but NDEBUG undefined. Additionally, multiple SCRAM instances can be run at once.

An example command to run SCRAM 1000 times with 4 parallel instances:

.. code-block:: bash

fuzz_tester.py -n 1000 -j 4

The fuzz tester can be guided with options listed in its help prompt. Some options can be combined, and some are mutually exclusive. The priorities of mutually exclusive options and combinations are hard-coded in the script, and no error messages are produced; however, information messages are given to indicate the interpretation.

.. code-block:: bash

fuzz_tester.py --help

Fuzzing inputs and configurations are auto-generated. The fuzz tester collects run configurations, failures, and logs. The auto-generated inputs are preserved for failed runs.

Cross Validation

The Fuzz tester can check the results of qualitative analysis algorithms implemented in SCRAM. If there is any disagreement between various algorithms, the run is reported as failure.

.. code-block:: bash

fuzz_tester.py --cross-validate

Documentation Building


Documentation is generated with the configurations on the gh-source_ branch. The raw documentation files are in the doc directory.

.. _gh-source: https://github.com/rakhimov/scram/tree/gh-source


Note to a User


The development may follow the Documentation Driven Development paradigm for some new features. Therefore, some documentation may be ahead of the actual development and describe features under current development or consideration.

For any questions, don't hesitate to ask the user support mailing list (https://groups.google.com/forum/#!forum/scram-users, [email protected]).

For latest releases and information about SCRAM, feel free to subscribe to the announcements (https://groups.google.com/forum/#!forum/scram-announce, [email protected]).


How to Contribute


Please follow the instructions in CONTRIBUTING.md_.

.. _CONTRIBUTING.md: https://github.com/rakhimov/scram/blob/develop/CONTRIBUTING.md

.. image:: https://bestpractices.coreinfrastructure.org/projects/356/badge :target: https://bestpractices.coreinfrastructure.org/projects/356 :alt: CII Best Practices .. image:: https://www.openhub.net/p/scram/widgets/project_thin_badge.gif :target: https://www.openhub.net/p/scram :alt: Open HUB Metrics .. image:: https://d322cqt584bo4o.cloudfront.net/scram/localized.svg :target: https://crowdin.com/project/scram :alt: Crowdin .. image:: https://zenodo.org/badge/17964226.svg :target: https://zenodo.org/badge/latestdoi/17964226 :alt: Zenodo DOI

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].