Browse Source

More fixes. Still TODO: copy constructors for IR classes.

tempestpy_adaptions
dehnert 12 years ago
parent
commit
23f25beb27
  1. 5
      src/ir/expressions/BooleanConstantExpression.cpp
  2. 4
      src/ir/expressions/ConstantExpression.cpp
  3. 7
      src/ir/expressions/ConstantExpression.h
  4. 2
      src/ir/expressions/IntegerConstantExpression.cpp
  5. 5
      src/ir/expressions/UnaryBooleanFunctionExpression.cpp
  6. 2
      src/ir/expressions/UnaryNumericalFunctionExpression.cpp

5
src/ir/expressions/BooleanConstantExpression.cpp

@ -13,9 +13,8 @@ namespace storm {
namespace ir { namespace ir {
namespace expressions { namespace expressions {
BooleanConstantExpression::BooleanConstantExpression(std::string const& constantName) : ConstantExpression(bool_, constantName) {
defined = false;
value = false;
BooleanConstantExpression::BooleanConstantExpression(std::string const& constantName) : ConstantExpression(bool_, constantName), value(false), defined(false) {
// Nothing to do here.
} }
std::shared_ptr<BaseExpression> BooleanConstantExpression::clone(std::map<std::string, std::string> const& renaming, storm::parser::prism::VariableState const& variableState) const { std::shared_ptr<BaseExpression> BooleanConstantExpression::clone(std::map<std::string, std::string> const& renaming, storm::parser::prism::VariableState const& variableState) const {

4
src/ir/expressions/ConstantExpression.cpp

@ -15,6 +15,10 @@ namespace storm {
// Nothing to do here. // Nothing to do here.
} }
ConstantExpression::ConstantExpression(ConstantExpression const& constantExpression) : BaseExpression(constantExpression.getType()), constantName(constantExpression.constantName) {
// Nothing to do here
}
std::string const& ConstantExpression::getConstantName() const { std::string const& ConstantExpression::getConstantName() const {
return constantName; return constantName;
} }

7
src/ir/expressions/ConstantExpression.h

@ -28,6 +28,13 @@ namespace storm {
*/ */
ConstantExpression(ReturnType type, std::string const& constantName); ConstantExpression(ReturnType type, std::string const& constantName);
/*!
* Copy-constructs a constant expression from the given constant expression.
*
* @param constantExpression The constant expression to copy.
*/
ConstantExpression(ConstantExpression const& constantExpression);
/*! /*!
* Retrieves the name of the constant. * Retrieves the name of the constant.
* *

2
src/ir/expressions/IntegerConstantExpression.cpp

@ -5,6 +5,8 @@
* Author: Christian Dehnert * Author: Christian Dehnert
*/ */
#include <sstream>
#include "IntegerConstantExpression.h" #include "IntegerConstantExpression.h"
namespace storm { namespace storm {

5
src/ir/expressions/UnaryBooleanFunctionExpression.cpp

@ -5,9 +5,6 @@
* Author: Christian Dehnert * Author: Christian Dehnert
*/ */
#ifndef STORM_IR_EXPRESSIONS_UNARYBOOLEANFUNCTIONEXPRESSION_H_
#define STORM_IR_EXPRESSIONS_UNARYBOOLEANFUNCTIONEXPRESSION_H_
#include <sstream> #include <sstream>
#include "UnaryBooleanFunctionExpression.h" #include "UnaryBooleanFunctionExpression.h"
@ -24,7 +21,7 @@ namespace storm {
return std::shared_ptr<BaseExpression>(new UnaryBooleanFunctionExpression(this->getChild()->clone(renaming, variableState), this->functionType)); return std::shared_ptr<BaseExpression>(new UnaryBooleanFunctionExpression(this->getChild()->clone(renaming, variableState), this->functionType));
} }
FunctionType UnaryBooleanFunctionExpression::getFunctionType() const {
UnaryBooleanFunctionExpression::FunctionType UnaryBooleanFunctionExpression::getFunctionType() const {
return functionType; return functionType;
} }

2
src/ir/expressions/UnaryNumericalFunctionExpression.cpp

@ -45,7 +45,7 @@ namespace storm {
} }
} }
FunctionType UnaryNumericalFunctionExpression::getFunctionType() const {
UnaryNumericalFunctionExpression::FunctionType UnaryNumericalFunctionExpression::getFunctionType() const {
return functionType; return functionType;
} }

Loading…
Cancel
Save