From f684e48e9ed7abc921733454db35468d4f390082 Mon Sep 17 00:00:00 2001 From: Matthias Volk Date: Mon, 2 Mar 2020 14:49:01 +0100 Subject: [PATCH] Support for aborting DFT state space building --- .../builder/ExplicitDFTModelBuilder.cpp | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/src/storm-dft/builder/ExplicitDFTModelBuilder.cpp b/src/storm-dft/builder/ExplicitDFTModelBuilder.cpp index bbb03f61c..b5ed7c298 100644 --- a/src/storm-dft/builder/ExplicitDFTModelBuilder.cpp +++ b/src/storm-dft/builder/ExplicitDFTModelBuilder.cpp @@ -1,21 +1,23 @@ #include "ExplicitDFTModelBuilder.h" #include -#include +#include +#include "storm/exceptions/InvalidArgumentException.h" +#include "storm/exceptions/UnexpectedException.h" +#include "storm/logic/AtomicLabelFormula.h" #include "storm/models/sparse/MarkovAutomaton.h" #include "storm/models/sparse/Ctmc.h" -#include "storm/utility/constants.h" -#include "storm/utility/vector.h" #include "storm/utility/bitoperations.h" +#include "storm/utility/constants.h" #include "storm/utility/ProgressMeasurement.h" -#include "storm/exceptions/InvalidArgumentException.h" -#include "storm/exceptions/UnexpectedException.h" +#include "storm/utility/SignalHandler.h" +#include "storm/utility/vector.h" #include "storm/settings/SettingsManager.h" -#include "storm/logic/AtomicLabelFormula.h" -#include "storm-dft/settings/modules/FaultTreeSettings.h" #include "storm/transformer/NonMarkovianChainTransformer.h" +#include "storm-dft/settings/modules/FaultTreeSettings.h" + namespace storm { namespace builder { @@ -477,6 +479,9 @@ namespace storm { matrixBuilder.finishRow(); } } + if (storm::utility::resources::isTerminate()) { + break; + } // Output number of currently explored states if (nrExpandedStates % 100 == 0) { progress.updateProgress(nrExpandedStates);