Git Product home page Git Product logo

dftcalc's Introduction

Linux Windows MacOS

DFTCalc: A Dynamic Fault Tree calculator for reliability and availability

DFTCalc calculates the failure probability of a DFT by making use of the compositional semantics of I/O-IMCs. In this process it docks on several state-of- the-art tools and languages: All leaves and gates of the input DFT are expressed by I/O-IMCs; CADP or DFTRES are used to efficiently compose the individual I/O-IMCs; and a model checker (Storm, Modest, MRMC, IMRMC, or IMCA) finally calculate the failure probability for a certain point in time. The following section describes how DFTCalc aligns all these tools and formats to orchestrate the analysis of a DFT.

DFTCalc takes as input a DFT in Galileo’s textual format. This intuitive format describes a DFT top-down from its root to the basic components. Each subtree is identified by a name, logically connected with other subtrees by gates, and then refined down to the basic components. On execution, DFTCalc processes a given DFT in various stages and analyzes the system’s reliability. The tool’s output is a quantification of this attribute which is expressed as either the failure probability for a given mission time or the mean time to failure.

Supported systems

  • GNU/Linux (tested on Fedora, Debian)
  • MacOS X (tested on Catalina)
  • Windows (tested on Windows 10, Windows Server 2019)

Build Dependencies

To build and run DFTCalc, you need some external libraries. Which ones exactly depends on which options you wish to use. Below we list the external libraries and tools required. The yaml-cpp library is always needed. Either CADP or DFTRES is needed: DFTRES is always needed for the --exact switch, CADP is needed for some unusual gates, in all other cases you can decide which is desired. Beyond that, you need at least one of MRMC, IMRMC, IMCA, Storm, or Modest. For exact operation (the --exact switch), you need DFTRES and IMRMC, Storm, or Modest.

yaml-cpp Install using your favorite package manager, e.g. 'dnf install yaml-cpp-devel' on Fedora.

CADP See the CADP website on how to obtain a license and download the CADP toolkit.

MRMC Backend Download MRMC from the MRMC homepage, and ensure that the 'mrmc' binary is in your PATH.

Coral/imc2ctmdp Only needed for the MRMC backend. Since the 2015 version of CADP you have to compile imc2ctmdp yourself. You can get the code from [here] (https://github.com/buschko/imc2ctmdp). Set your 'CORAL' environment variable to the root of this installation (such that "$CORAL/bin" contains the imc2ctmdp binary).

IMRMC Backend Download IMRMC from the IMRMC homepage and ensure that the 'imrmc' binary is in your PATH.

IMCA Backend Download the most recent IMCA version from github and visit for more information the IMCA homepage. Set the 'IMCA' environment variable to the root of your IMCA installation.

Storm Backend Download the most recent Storm version from the Storm homepage and ensure that the 'storm' binary is in your PATH.

Modest Backend Download the most recent Modest version from the Modest homepage and ensure that running the 'mcsta' command invokes the mcsta tool (e.g., by creating a shell script 'mcsta' in the PATH that starts mcsta).

DFTRES Converter For the 'exact' mode, download and build the most recent version of DFTRES from github and set an environment variable 'DFTRES' to point to the generated jar file.

Installation

By default, DFTCalc is installed into /opt/dft2lntroot. This can be changed by passing the '-DDFTROOT=/your/preferred/path' option to cmake.

Create Makefiles $ mkdir build && cd build && cmake ..

Build $ make

Install $ make install

dftcalc's People

Contributors

axel-b avatar bergfi avatar buschko avatar ennoruijters avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

dftcalc's Issues

Broken support for PAND

I cannot run analyses for DFTs with PAND gates with any backend. The issue seems to be in the translation done by dft2lntc.

To reproduce, call with options -t 10 -p on the following DFT:

toplevel "TLE";
"TLE" pand "B1" "B2";
"B1" lambda=5.11e-5;
"B2" lambda=1.11e-4;

I get the following warnings and errors:

~$ dftcalc -t 10 foo.dft -p
:: ** OUTPUT of foo.0.dft2lntc.out **
:error:
:: ** END output of foo.0.dft2lntc.out **
:: ** OUTPUT of foo.0.dft2lntc.err **
:error::: Running dft2lntc...
/home/hobborg/UT/repos/DFT_benchmarks/other/fault_trees/foo.dft:2.1-21:warning:Unable to create AUT file for this node: `TLE'
/home/hobborg/UT/repos/DFT_benchmarks/other/fault_trees/foo.dft:3.1-20:error:Could not generate BCG file `be_cold_aa.bcg' for node type `be'
:: Finished. 1 errors and 1 warnings.

MTTF header output overrides other metrics

When calling with "-m" option, the output print shows MTTF(...) = <val> for all analysis options passed. The output values <val> are not overriden, only the output header is.

To reproduce run with options -p -s -m and -p -m -t 10 on the following FT:

toplevel "TLE";
"TLE" and "B1" "B2";
"B1" lambda=0.09 repair=333.33;
"B2" lambda=0.12 repair=333.33;

Smart semantics wrong activation with Shared and subtree sparers

When a SPARE gate has cold Spares that are shared or consist out of subtrees, the smart Semantics will erroneously mark them as active, and thus activate the cold spares from the beginning.

Temporary solution:
uncomment line 578 (dft->applySmartSemantics();) in dft2lntc.cpp

This will deactivate the smart semantics.

BE attribute "res" is ignored (feature request: implement it!)

The description of the res attribute for BEs as found in this page doesn't seem to be implemented.

To see that, run the tool with options -p -s -m on the following FT, and then again on that FT but replacing res=1.0 by res=0.0. The expected behaviour is that for run with res=0.0 the MTTF remains the same but the unavailability increases: that is not happening and for both cases the exact same results are given.

toplevel "TLE";
"TLE" and "B1" "B2";
"B1" lambda=0.09 res=1.0 repair=1.3;
"B2" lambda=0.12 res=1.0 repair=1.3;

Furthermore, res should be a probability value in the closed interval [0.0,1.0]. However any value is currently accepted (and seemingly ignored) by the tool. To reproduce run with the options as above on the same FT with res=80085.

Storm output incorrectly trimmed

When running analyses with Storm as backend (default), if the result uses scientific notation then the numbers before the "e" seem to be truncated from standard output.

To reproduce, call with options -t 10 -p and -t 10 -p --imrmc on the following FT:

toplevel "TLE";
"TLE" and "B1" "B2";
"B1" lambda=5.11e-5;
"B2" lambda=1.11e-4;

With Storm I get the output P(..., P(F[<=10] FAIL), 10, fails)=e-7 whereas with IMRMC I get instead P(..., P(F[<=10] FAIL), 10, fails)=5.667504978095[299; 302]e-7

Translation failure for inspected BEs with no `interval' attribute

BEs with an attached inspection module but no interval=N attribute cause IMPOSSIBLE labels to survive composition and hiding, resulting in a fatal error.

Proposed solution: Treat such BEs as having an interval above the number of phases, thereby omitting the actual inspection but allowing the BE to be repaired if something else causes the inspection to act.

Correctly translate transient states into CTMCs

Transient states with meaningful properties (e.g., a state reachable by a FAIL transition from which an ONLINE transition can immediately be taken) currently cause either an error or are ignored when translating to a CTMC. The translators need to correctly mark the state following the ONLINE transition as having experience a transient failure. The model-checker queries should take this new marking into account.

Add 'transient' property to BEs

Add an attribute transient=P to BEs. When the BE fails, with probability P, it should emit a failure signal immediately followed (i.e., with no intervening Markovian or timed transitions), but a repaired signal.

Non-exact calculation compiled without CADP

I'm trying to run the latest DFTCalc (529c7fb) with the latest DFTRES (utwente-fmt/DFTRES@bc69223) and Storm 1.6.4 (moves-rwth/storm@6f39d43).

When I run dftcald without the --exact flag, I get

commandline:warning:CADP mode not compiled in, enabling --exact

and Storm returns and exact solution. Thus, I can't get a floating-point result, even if I specify an error bound with -E.

Due to the large size of the models I want to analyse, I'd like run Storm with floating-point arithmetic.

It seems the warning is emitted in

dftcalc/dftcalc/dftcalc.cpp

Lines 1139 to 1144 in abaa25c

#ifndef HAVE_CADP
if (useConverter == DFT::converter::SVL) {
messageFormatter->reportWarningAt(Location("commandline"),"CADP mode not compiled in, enabling --exact");
useConverter = DFT::converter::DFTRES;
}
#endif

and runExact is forced in

dftcalc/dftcalc/dftcalc.cpp

Lines 870 to 871 in abaa25c

if (useConverter == DFTRES)
sr->runExact = 1;

which subsequently passes --exact to Storm.

I removed latter lines above, and DFTCalc with Storm seems to produce correct floating-point solutions. Are there any pitfalls with this calculation approach? It would be nice if DFTCalc supported non-exact calculation without CADP out of the box.

Ensure that all automata propagate transient failures

Automata for gates currently behave nondeterministically when a FAIL signal of a child is immediately followed by an ONLINE signal. The gate should always emit its own FAIL signal if the child failure should cause a failure, possibly followed as well by its own ONLINE.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.