Browse Source

Removed some debug output.

tempestpy_adaptions
gereon 12 years ago
parent
commit
a9edf2aa8c
  1. 2
      src/ir/IntegerVariable.cpp
  2. 5
      src/ir/Module.cpp
  3. 1
      src/ir/Variable.cpp
  4. 5
      src/ir/expressions/VariableExpression.h
  5. 1
      src/parser/PrismParser/VariableState.h

2
src/ir/IntegerVariable.cpp

@ -46,7 +46,7 @@ std::shared_ptr<storm::ir::expressions::BaseExpression> IntegerVariable::getUppe
// Build a string representation of the variable. // Build a string representation of the variable.
std::string IntegerVariable::toString() const { std::string IntegerVariable::toString() const {
std::stringstream result; std::stringstream result;
result << "int_" << this->getName() << ": [" << lowerBound->toString() << ".." << upperBound->toString() << "]";
result << this->getName() << ": [" << lowerBound->toString() << ".." << upperBound->toString() << "]";
if (this->getInitialValue() != nullptr) { if (this->getInitialValue() != nullptr) {
result << " init " + this->getInitialValue()->toString(); result << " init " + this->getInitialValue()->toString();
} }

5
src/ir/Module.cpp

@ -32,16 +32,11 @@ Module::Module(std::string moduleName,
: moduleName(moduleName), booleanVariables(booleanVariables), integerVariables(integerVariables), : moduleName(moduleName), booleanVariables(booleanVariables), integerVariables(integerVariables),
booleanVariablesToIndexMap(booleanVariableToIndexMap), booleanVariablesToIndexMap(booleanVariableToIndexMap),
integerVariablesToIndexMap(integerVariableToIndexMap), commands(commands), actions(), actionsToCommandIndexMap() { integerVariablesToIndexMap(integerVariableToIndexMap), commands(commands), actions(), actionsToCommandIndexMap() {
std::cout << "Created module " << this << ":" << std::endl << this->toString() << std::endl;
this->collectActions(); this->collectActions();
} }
Module::Module(const Module& module, const std::string& moduleName, const std::map<std::string, std::string>& renaming, std::shared_ptr<VariableAdder> adder) Module::Module(const Module& module, const std::string& moduleName, const std::map<std::string, std::string>& renaming, std::shared_ptr<VariableAdder> adder)
: moduleName(moduleName) { : moduleName(moduleName) {
std::cout << "Renaming module " << module.moduleName << " to " << moduleName << " with " << renaming.size() << " renamings:" << std::endl;
for (auto it: renaming) {
std::cout << "\t" << it.first << " -> " << it.second << std::endl;
}
this->booleanVariables.reserve(module.booleanVariables.size()); this->booleanVariables.reserve(module.booleanVariables.size());
for (BooleanVariable it: module.booleanVariables) { for (BooleanVariable it: module.booleanVariables) {
if (renaming.count(it.getName()) > 0) { if (renaming.count(it.getName()) > 0) {

1
src/ir/Variable.cpp

@ -27,7 +27,6 @@ Variable::Variable(uint_fast64_t index, std::string variableName, std::shared_pt
Variable::Variable(const Variable& var, const std::string& newName, const std::map<std::string, std::string>& renaming, const std::map<std::string,uint_fast64_t>& bools, const std::map<std::string,uint_fast64_t>& ints) Variable::Variable(const Variable& var, const std::string& newName, const std::map<std::string, std::string>& renaming, const std::map<std::string,uint_fast64_t>& bools, const std::map<std::string,uint_fast64_t>& ints)
: Variable(var.index, newName, var.initialValue->clone(renaming, bools, ints)) { : Variable(var.index, newName, var.initialValue->clone(renaming, bools, ints)) {
std::cout << "Cloning Variable " << var.variableName << " to " << newName << std::endl;
} }
// Return the name of the variable. // Return the name of the variable.

5
src/ir/expressions/VariableExpression.h

@ -26,7 +26,6 @@ public:
std::shared_ptr<BaseExpression> upperBound = std::shared_ptr<storm::ir::expressions::BaseExpression>(nullptr)) std::shared_ptr<BaseExpression> upperBound = std::shared_ptr<storm::ir::expressions::BaseExpression>(nullptr))
: BaseExpression(type), index(index), variableName(variableName), : BaseExpression(type), index(index), variableName(variableName),
lowerBound(lowerBound), upperBound(upperBound) { lowerBound(lowerBound), upperBound(upperBound) {
std::cerr << "VariableExpression " << this->variableName << std::endl;
} }
virtual ~VariableExpression() { virtual ~VariableExpression() {
@ -55,9 +54,7 @@ public:
} }
virtual std::string toString() const { virtual std::string toString() const {
std::stringstream result;
result << variableName << "(" << this->index << ")";
return result.str();
return this->variableName;
} }
virtual std::string dump(std::string prefix) const { virtual std::string dump(std::string prefix) const {

1
src/parser/PrismParser/VariableState.h

@ -135,7 +135,6 @@ public:
} }
void prepareForSecondRun() { void prepareForSecondRun() {
std::cerr << "starting second run" << std::endl;
integerConstants_.clear(); integerConstants_.clear();
booleanConstants_.clear(); booleanConstants_.clear();
doubleConstants_.clear(); doubleConstants_.clear();

Loading…
Cancel
Save