Browse Source
Merge remote-tracking branch 'remotes/origin/menu_games' into sylvanRationalFunctions
Merge remote-tracking branch 'remotes/origin/menu_games' into sylvanRationalFunctions
# Conflicts:
# src/abstraction/MenuGameAbstractor.cpp
# src/abstraction/prism/AbstractCommand.cpp
Former-commit-id: 032244f923
tempestpy_adaptions
PBerger
9 years ago
19 changed files with 205 additions and 34 deletions
-
6src/abstraction/MenuGame.cpp
-
1src/abstraction/MenuGameAbstractor.cpp
-
8src/abstraction/MenuGameAbstractor.h
-
2src/abstraction/StateSetAbstractor.cpp
-
3src/abstraction/StateSetAbstractor.h
-
2src/abstraction/prism/AbstractCommand.cpp
-
6src/abstraction/prism/AbstractProgram.cpp
-
6src/abstraction/prism/AbstractProgram.h
-
31src/abstraction/prism/PrismMenuGameAbstractor.cpp
-
26src/abstraction/prism/PrismMenuGameAbstractor.h
-
52src/modelchecker/abstraction/GameBasedMdpModelChecker.cpp
-
11src/modelchecker/abstraction/GameBasedMdpModelChecker.h
-
5src/models/symbolic/Model.cpp
-
2src/settings/SettingsManager.cpp
-
23src/settings/modules/AbstractionSettings.cpp
-
34src/settings/modules/AbstractionSettings.h
-
8src/storage/prism/Program.cpp
-
11src/storage/prism/Program.h
-
2src/utility/storm.h
@ -1 +0,0 @@ |
|||
#include "src/abstraction/MenuGameAbstractor.h"
|
@ -0,0 +1,31 @@ |
|||
#include "src/abstraction/prism/PrismMenuGameAbstractor.h"
|
|||
|
|||
#include "src/models/symbolic/StandardRewardModel.h"
|
|||
|
|||
#include "src/settings/SettingsManager.h"
|
|||
#include "src/settings/modules/AbstractionSettings.h"
|
|||
|
|||
namespace storm { |
|||
namespace abstraction { |
|||
namespace prism { |
|||
|
|||
template <storm::dd::DdType DdType, typename ValueType> |
|||
PrismMenuGameAbstractor<DdType, ValueType>::PrismMenuGameAbstractor(storm::prism::Program const& program, std::vector<storm::expressions::Expression> const& initialPredicates, std::shared_ptr<storm::utility::solver::SmtSolverFactory> const& smtSolverFactory) : abstractProgram(program, initialPredicates, smtSolverFactory, storm::settings::getModule<storm::settings::modules::AbstractionSettings>().isAddAllGuardsSet()) { |
|||
// Intentionally left empty.
|
|||
} |
|||
|
|||
template <storm::dd::DdType DdType, typename ValueType> |
|||
storm::abstraction::MenuGame<DdType, ValueType> PrismMenuGameAbstractor<DdType, ValueType>::abstract() { |
|||
return abstractProgram.getAbstractGame(); |
|||
} |
|||
|
|||
template <storm::dd::DdType DdType, typename ValueType> |
|||
void PrismMenuGameAbstractor<DdType, ValueType>::refine(std::vector<storm::expressions::Expression> const& predicates) { |
|||
abstractProgram.refine(predicates); |
|||
} |
|||
|
|||
template class PrismMenuGameAbstractor<storm::dd::DdType::CUDD, double>; |
|||
template class PrismMenuGameAbstractor<storm::dd::DdType::Sylvan, double>; |
|||
} |
|||
} |
|||
} |
@ -0,0 +1,26 @@ |
|||
#pragma once |
|||
|
|||
#include "src/abstraction/MenuGameAbstractor.h" |
|||
|
|||
#include "src/abstraction/prism/AbstractProgram.h" |
|||
|
|||
namespace storm { |
|||
namespace abstraction { |
|||
namespace prism { |
|||
|
|||
template <storm::dd::DdType DdType, typename ValueType> |
|||
class PrismMenuGameAbstractor : public MenuGameAbstractor<DdType, ValueType> { |
|||
public: |
|||
PrismMenuGameAbstractor(storm::prism::Program const& program, std::vector<storm::expressions::Expression> const& initialPredicates, std::shared_ptr<storm::utility::solver::SmtSolverFactory> const& smtSolverFactory = std::make_shared<storm::utility::solver::MathsatSmtSolverFactory>()); |
|||
|
|||
virtual storm::abstraction::MenuGame<DdType, ValueType> abstract() override; |
|||
virtual void refine(std::vector<storm::expressions::Expression> const& predicates) override; |
|||
|
|||
private: |
|||
/// The abstract program that performs the actual abstraction. |
|||
AbstractProgram<DdType, ValueType> abstractProgram; |
|||
}; |
|||
|
|||
} |
|||
} |
|||
} |
@ -0,0 +1,23 @@ |
|||
#include "src/settings/modules/AbstractionSettings.h"
|
|||
|
|||
#include "src/settings/Option.h"
|
|||
#include "src/settings/OptionBuilder.h"
|
|||
|
|||
namespace storm { |
|||
namespace settings { |
|||
namespace modules { |
|||
|
|||
const std::string AbstractionSettings::moduleName = "abstraction"; |
|||
const std::string AbstractionSettings::addAllGuardsOptionName = "allguards"; |
|||
|
|||
AbstractionSettings::AbstractionSettings() : ModuleSettings(moduleName) { |
|||
this->addOption(storm::settings::OptionBuilder(moduleName, addAllGuardsOptionName, true, "Sets whether all guards are added as initial predicates.").build()); |
|||
} |
|||
|
|||
bool AbstractionSettings::isAddAllGuardsSet() const { |
|||
return this->getOption(addAllGuardsOptionName).getHasOptionBeenSet(); |
|||
} |
|||
|
|||
} |
|||
} |
|||
} |
@ -0,0 +1,34 @@ |
|||
#pragma once |
|||
|
|||
#include "src/settings/modules/ModuleSettings.h" |
|||
|
|||
namespace storm { |
|||
namespace settings { |
|||
namespace modules { |
|||
|
|||
/*! |
|||
* This class represents the settings for the abstraction procedures. |
|||
*/ |
|||
class AbstractionSettings : public ModuleSettings { |
|||
public: |
|||
/*! |
|||
* Creates a new set of abstraction settings. |
|||
*/ |
|||
AbstractionSettings(); |
|||
|
|||
/*! |
|||
* Retrieves whether the option to add all guards was set. |
|||
* |
|||
* @return True iff the option was set. |
|||
*/ |
|||
bool isAddAllGuardsSet() const; |
|||
|
|||
const static std::string moduleName; |
|||
|
|||
private: |
|||
const static std::string addAllGuardsOptionName; |
|||
}; |
|||
|
|||
} |
|||
} |
|||
} |
Write
Preview
Loading…
Cancel
Save
Reference in new issue