Bayesian and Human Reliability Analysis-Aided Method for the Reliability Analysis of Software (BAHAMAS)
Figure: BAHAMAS Bayesian Belief Network (BBN)
BAHAMAS evaluates software failures by tracking defect introduction and defect removal activities across the software development life cycle (SDLC), estimating the defects that remain in the software, and propagating those effects to software failure probability.
- Web app: https://bahamas.streamlit.app
- Project webpage: https://idaholab.github.io/BAHAMAS/
The BAHAMAS Bayesian Belief Network (BBN) includes:
- Red nodes for defect introduction driven by human error during each SDLC stage
- Blue nodes for defect removal activities during the SDLC
- Purple nodes for defect types that remain in the software at each stage
- Yellow nodes for the defect types remaining after the full SDLC
- Green nodes for resulting software failure probability
In practical terms, BAHAMAS links SDLC activities, human reliability, defect propagation, and unsafe control actions into a single reliability assessment workflow.
conda create -n bahamas_libs python=3.13
conda activate bahamas_libs
pip install --verbose --editable .cd app
streamlit run app.pyconda activate bahamas_libs
cd /path/to/BAHAMAS/examples
python ../bahamas/main.py -i bbn.tomlIf you want to install dependencies manually instead of installing the package directly:
pip install toml streamlit==1.35 streamlit-aggrid==1.1.5 numpy>=1.24 pandas==2.3 scipy openpyxl pytest plotly kaleido matplotlib streamlit-option-menu jsonpointer streamlit_extrasYou can also install the package in non-editable mode:
pip install --verbose .Run tests with:
pytestLaunch the Streamlit application:
cd app
streamlit run app.pyRun BAHAMAS from the command line with a TOML input file:
conda activate bahamas_libs
cd /path/to/BAHAMAS/examples
python ../bahamas/main.py -i bbn.toml[BBN]
[BBN.params]
samples = 40000
seed = 2
[BBN.files]
task = "../data/Task_List.xlsx"
defect = "../data/Defect_Data.xlsx"
approx = "../data/sdlc_macro.xlsx"
[BBN.analysis]
type = "precise"CLI screen output
06-Aug-25 09:39:54 BAHAMAS INFO Welcome!
06-Aug-25 09:39:54 BAHAMAS INFO Input file: ../data/Task_List.xlsx
06-Aug-25 09:39:54 BAHAMAS WARNING Default output file ../data/out_Task_List.xlsx will be used
06-Aug-25 09:39:54 BAHAMAS.ODC INFO Construct ODC Conditional Distribution for each SDLC stage
06-Aug-25 09:39:54 BAHAMAS.UCA INFO Construct UCA ODC defect correlation distribution.
06-Aug-25 09:39:54 BAHAMAS.BBN INFO Sampling HEP and DCP
06-Aug-25 09:39:54 BAHAMAS.HEP INFO Calculate SDLC "Concept" stage HEP
06-Aug-25 09:39:54 BAHAMAS.DCP INFO Calculate DCP for SDLC "Concept" stage
06-Aug-25 09:39:54 BAHAMAS.HEP INFO Calculate SDLC "Requirement" stage HEP
06-Aug-25 09:39:54 BAHAMAS.DCP INFO Calculate DCP for SDLC "Requirement" stage
06-Aug-25 09:39:54 BAHAMAS.HEP INFO Calculate SDLC "Design" stage HEP
06-Aug-25 09:39:54 BAHAMAS.DCP INFO Calculate DCP for SDLC "Design" stage
06-Aug-25 09:39:54 BAHAMAS.HEP INFO Calculate SDLC "Implementation" stage HEP
06-Aug-25 09:39:54 BAHAMAS.DCP INFO Calculate DCP for SDLC "Implementation" stage
06-Aug-25 09:39:54 BAHAMAS.HEP INFO Calculate SDLC "Testing" stage HEP
06-Aug-25 09:39:54 BAHAMAS.DCP INFO Calculate DCP for SDLC "Testing" stage
06-Aug-25 09:39:54 BAHAMAS.HEP INFO Calculate SDLC "Install and Maintenance" stage HEP
06-Aug-25 09:39:54 BAHAMAS.DCP INFO Calculate DCP for SDLC "Install and Maintenance" stage
06-Aug-25 09:39:54 BAHAMAS.BBN INFO Sampling ODC
06-Aug-25 09:39:54 BAHAMAS.BBN INFO Sampling UCA
06-Aug-25 09:39:54 BAHAMAS.BBN INFO Compute marginal ODC
06-Aug-25 09:39:54 BAHAMAS.BBN INFO BBN Propagation
06-Aug-25 09:39:54 BAHAMAS.BBN INFO Compute UCA and total failure probabilities
06-Aug-25 09:39:56 BAHAMAS INFO Software total failure: 2.9825182468709206e-05 with std 1.4002568043296736e-05
06-Aug-25 09:39:56 BAHAMAS INFO UCA type: UCA-A, Mean: 7.127925281781246e-06, STD: 3.4908455837352817e-06
06-Aug-25 09:39:56 BAHAMAS INFO UCA type: UCA-B, Mean: 1.3451519498232246e-05, STD: 6.3548059571775254e-06
06-Aug-25 09:39:56 BAHAMAS INFO UCA type: UCA-C, Mean: 4.900300523766049e-06, STD: 2.4943170792606996e-06
06-Aug-25 09:39:56 BAHAMAS INFO UCA type: UCA-D, Mean: 4.345437164929662e-06, STD: 2.336590212125128e-06
06-Aug-25 09:39:56 BAHAMAS INFO ... Complete!
This code was developed with the assistance of AI tools to aid in code generation, debugging, and optimization. The final implementation has been reviewed and verified by the author to ensure accuracy and adherence to project requirements.




