/// <summary>
        ///   Calculates the probability of formula.
        /// </summary>
        /// <param name="model">The model that should be checked.</param>
        /// <param name="formula">The state formula to be checked.</param>
        public static Probability CalculateProbabilityOfFormula(string ocFileName, string mainNode, IEnumerable <Fault> faults, Formula formula)
        {
            Probability probability;

            var createModel = LustreExecutableModel.CreateExecutedModelFromFormulasCreator(ocFileName, mainNode, faults.ToArray());

            var markovChainGenerator = new MarkovChainFromExecutableModelGenerator <LustreExecutableModel>(createModel)
            {
                Configuration = TraversalConfiguration
            };

            markovChainGenerator.Configuration.SuccessorCapacity *= 2;
            markovChainGenerator.AddFormulaToCheck(formula);
            markovChainGenerator.Configuration.UseCompactStateStorage = true;
            var markovChain = markovChainGenerator.GenerateLabeledMarkovChain();

            using (var modelChecker = new ConfigurationDependentLtmcModelChecker(markovChainGenerator.Configuration, markovChain, TraversalConfiguration.DefaultTraceOutput))
            {
                probability = modelChecker.CalculateProbability(formula);
            }

            GC.Collect();
            return(probability);
        }
        /// <summary>
        ///   Calculates the probability of formula.
        /// </summary>
        /// <param name="model">The model that should be checked.</param>
        /// <param name="formula">The state formula to be checked.</param>
        public static ProbabilityRange CalculateProbabilityRangeOfFormula(string ocFileName, string mainNode, IEnumerable <Fault> faults, Formula formula)
        {
            ProbabilityRange probabilityRangeToReachState;

            var createModel = LustreExecutableModel.CreateExecutedModelFromFormulasCreator(ocFileName, mainNode, faults.ToArray());

            var ltmdpGenerator = new MarkovDecisionProcessFromExecutableModelGenerator <LustreExecutableModel>(createModel)
            {
                Configuration = TraversalConfiguration
            };

            ltmdpGenerator.AddFormulaToCheck(formula);
            ltmdpGenerator.Configuration.SuccessorCapacity     *= 8;
            ltmdpGenerator.Configuration.UseCompactStateStorage = true;
            var ltmdp = ltmdpGenerator.GenerateLabeledTransitionMarkovDecisionProcess();

            using (var modelChecker = new ConfigurationDependentLtmdpModelChecker(ltmdpGenerator.Configuration, ltmdp, TraversalConfiguration.DefaultTraceOutput))
            {
                probabilityRangeToReachState = modelChecker.CalculateProbabilityRange(formula);
            }

            GC.Collect();
            return(probabilityRangeToReachState);
        }