|
|
@ -16,12 +16,17 @@ namespace storm { |
|
|
|
namespace abstraction { |
|
|
|
namespace prism { |
|
|
|
|
|
|
|
template <storm::dd::DdType DdType, typename ValueType> |
|
|
|
AbstractProgram<DdType, ValueType>::~AbstractProgram() { |
|
|
|
std::cout << "destructing abs program" << std::endl; |
|
|
|
} |
|
|
|
|
|
|
|
template <storm::dd::DdType DdType, typename ValueType> |
|
|
|
AbstractProgram<DdType, ValueType>::AbstractProgram(storm::expressions::ExpressionManager& expressionManager, storm::prism::Program const& program, |
|
|
|
std::vector<storm::expressions::Expression> const& initialPredicates, |
|
|
|
std::unique_ptr<storm::utility::solver::SmtSolverFactory>&& smtSolverFactory, |
|
|
|
bool addAllGuards) |
|
|
|
: program(program), smtSolverFactory(std::move(smtSolverFactory)), modules(), abstractionInformation(expressionManager), initialStateAbstractor(), addedAllGuards(addAllGuards), bottomStateAbstractor(), currentGame(nullptr) { |
|
|
|
: program(program), smtSolverFactory(std::move(smtSolverFactory)), modules(), abstractionInformation(expressionManager), initialStateAbstractor(abstractionInformation, program.getAllExpressionVariables(), {program.getInitialConstruct().getInitialStatesExpression()}, *this->smtSolverFactory), addedAllGuards(addAllGuards), bottomStateAbstractor(abstractionInformation, program.getAllExpressionVariables(), program.getAllGuards(true), *this->smtSolverFactory), currentGame(nullptr) { |
|
|
|
|
|
|
|
// For now, we assume that there is a single module. If the program has more than one module, it needs
|
|
|
|
// to be flattened before the procedure.
|
|
|
@ -67,18 +72,16 @@ namespace storm { |
|
|
|
|
|
|
|
// For each module of the concrete program, we create an abstract counterpart.
|
|
|
|
for (auto const& module : program.getModules()) { |
|
|
|
modules.emplace_back(module, abstractionInformation, *this->smtSolverFactory); |
|
|
|
this->modules.emplace_back(module, abstractionInformation, *this->smtSolverFactory); |
|
|
|
} |
|
|
|
|
|
|
|
// Retrieve the command-update probability ADD, so we can multiply it with the abstraction BDD later.
|
|
|
|
commandUpdateProbabilitiesAdd = modules.front().getCommandUpdateProbabilitiesAdd(); |
|
|
|
|
|
|
|
// Create the state set abstractors.
|
|
|
|
initialStateAbstractor = storm::abstraction::StateSetAbstractor<DdType, ValueType>(abstractionInformation, {program.getInitialConstruct().getInitialStatesExpression()}, *this->smtSolverFactory); |
|
|
|
bottomStateAbstractor = storm::abstraction::StateSetAbstractor<DdType, ValueType>(abstractionInformation, program.getAllGuards(true), *this->smtSolverFactory); |
|
|
|
|
|
|
|
// Finally, we build the game the first time.
|
|
|
|
currentGame = buildGame(); |
|
|
|
|
|
|
|
std::cout << "abs module at " << &modules.front() << std::endl; |
|
|
|
} |
|
|
|
|
|
|
|
template <storm::dd::DdType DdType, typename ValueType> |
|
|
|