36 std::ofstream outfile;
39 if (monSettings.isExportMonotonicitySet()) {
44 STORM_LOG_THROW(regions.size() <= 1, storm::exceptions::InvalidArgumentException,
"Monotonicity analysis only allowed on single region");
45 if (!monSettings.isMonSolutionSet()) {
48 monSettings.isDotOutputSet());
49 if (monSettings.isExportMonotonicitySet()) {
50 monotonicityHelper.checkMonotonicityInBuild(outfile, monSettings.isUsePLABoundsSet(), monSettings.getDotOutputFilename());
52 monotonicityHelper.checkMonotonicityInBuild(std::cout, monSettings.isUsePLABoundsSet(), monSettings.getDotOutputFilename());
60 std::function<std::unique_ptr<storm::modelchecker::CheckResult>(std::shared_ptr<storm::logic::Formula const>
const& formula)> verificationCallback;
61 std::function<void(std::unique_ptr<storm::modelchecker::CheckResult>
const&)> postprocessingCallback;
64 verificationCallback = [&](std::shared_ptr<storm::logic::Formula const>
const& formula) {
65 std::unique_ptr<storm::modelchecker::CheckResult> result =
66 storm::api::verifyWithSparseEngine<ValueType>(model, storm::api::createTask<ValueType>(formula,
true));
71 auto result = verificationCallback(property.getRawFormula())->asExplicitQuantitativeCheckResult<ValueType>().getValueVector();
74 auto states = model->getInitialStates();
75 for (
auto state : states) {
76 valuation += result[state];
83 if (res.first && res.second) {
85 }
else if (res.first) {
87 }
else if (res.second) {
93 if (monSettings.isExportMonotonicitySet()) {
101 if (monSettings.isExportMonotonicitySet()) {
105 monotonicityWatch.
stop();
106 STORM_PRINT(
"\nTotal time for monotonicity checking: " << monotonicityWatch <<
".\n\n");
void openFile(std::string const &filepath, std::ofstream &filestream, bool append=false, bool silent=false)
Open the given file for writing.