Browse Source

Updated exprtk. made exprtk case-sensitive. fixed other minor issues

Former-commit-id: 3557c83ab6 [formerly 747702a205]
Former-commit-id: 64a2265311
tempestpy_adaptions
dehnert 8 years ago
parent
commit
e799cbba79
  1. 64506
      resources/3rdparty/exprtk/exprtk.hpp
  2. 11
      src/generator/JaniNextStateGenerator.cpp
  3. 1
      src/storage/expressions/ExprtkExpressionEvaluator.cpp

64506
resources/3rdparty/exprtk/exprtk.hpp
File diff suppressed because it is too large
View File

11
src/generator/JaniNextStateGenerator.cpp

@ -390,9 +390,6 @@ namespace storm {
// Iterate over all automata.
uint64_t automatonIndex = 0;
std::cout << "getting silent choices of state" << std::endl;
std::cout << unpackStateIntoValuation(state, this->variableInformation, *this->expressionManager).toString(true) << std::endl;
for (auto const& automaton : model.getAutomata()) {
uint64_t location = locations[automatonIndex];
@ -405,10 +402,8 @@ namespace storm {
// Skip the command, if it is not enabled.
if (!this->evaluator->asBool(edge.getGuard())) {
std::cout << "guard " << edge.getGuard() << " evaluates to false" << std::endl;
continue;
}
std::cout << "guard " << edge.getGuard() << " evaluates to true" << std::endl;
// Determine the exit rate if it's a Markovian edge.
boost::optional<ValueType> exitRate = boost::none;
@ -427,7 +422,6 @@ namespace storm {
if (probability != storm::utility::zero<ValueType>()) {
// Obtain target state index and add it to the list of known states. If it has not yet been
// seen, we also add it to the set of states that have yet to be explored.
std::cout << "got new state " << unpackStateIntoValuation(applyUpdate(state, destination, this->variableInformation.locationVariables[automatonIndex]), this->variableInformation, *this->expressionManager).toString(true) << std::endl;
StateType stateIndex = stateToIdCallback(applyUpdate(state, destination, this->variableInformation.locationVariables[automatonIndex]));
// Update the choice by adding the probability/target state to it.
@ -459,9 +453,6 @@ namespace storm {
std::vector<Choice<ValueType>> JaniNextStateGenerator<ValueType, StateType>::getNonsilentActionChoices(std::vector<uint64_t> const& locations, CompressedState const& state, StateToIdCallback stateToIdCallback) {
std::vector<Choice<ValueType>> result;
std::cout << "getting nonsilent choices of state" << std::endl;
std::cout << unpackStateIntoValuation(state, this->variableInformation, *this->expressionManager).toString(true) << std::endl;
for (uint64_t actionIndex : model.getNonsilentActionIndices()) {
std::vector<std::vector<storm::jani::Edge const*>> enabledEdges = getEnabledEdges(locations, actionIndex);
@ -539,8 +530,6 @@ namespace storm {
// Add the probabilities/rates to the newly created choice.
ValueType probabilitySum = storm::utility::zero<ValueType>();
for (auto const& stateProbabilityPair : *newTargetStates) {
std::cout << "got new state (sync)" << std::endl;
std::cout << unpackStateIntoValuation(stateProbabilityPair.first, this->variableInformation, *this->expressionManager).toString(true) << std::endl;
StateType actualIndex = stateToIdCallback(stateProbabilityPair.first);
choice.addProbability(actualIndex, stateProbabilityPair.second);

1
src/storage/expressions/ExprtkExpressionEvaluator.cpp

@ -20,7 +20,6 @@ namespace storm {
symbolTable.add_variable(variableTypePair.first.getName(), this->rationalValues[variableTypePair.first.getOffset()]);
}
}
symbolTable.add_constants();
}
template<typename RationalType>

Loading…
Cancel
Save