You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

68 lines
2.5 KiB

  1. /*
  2. * BooleanVariable.h
  3. *
  4. * Created on: 08.01.2013
  5. * Author: Christian Dehnert
  6. */
  7. #ifndef STORM_IR_BOOLEANVARIABLE_H_
  8. #define STORM_IR_BOOLEANVARIABLE_H_
  9. #include <memory>
  10. #include <map>
  11. #include "src/ir/Variable.h"
  12. namespace storm {
  13. namespace parser {
  14. namespace prism {
  15. class VariableState;
  16. } // namespace prismparser
  17. } // namespace parser
  18. namespace ir {
  19. /*!
  20. * A class representing a boolean variable.
  21. */
  22. class BooleanVariable : public Variable {
  23. public:
  24. /*!
  25. * Default constructor. Creates a boolean variable without a name.
  26. */
  27. BooleanVariable();
  28. /*!
  29. * Creates a boolean variable with the given name and the given initial value.
  30. *
  31. * @param localIndex A module-local unique index for the variable.
  32. * @param globalIndex A globally unique index for the variable.
  33. * @param variableName The name of the variable.
  34. * @param initialValue The expression that defines the initial value of the variable.
  35. */
  36. BooleanVariable(uint_fast64_t localIndex, uint_fast64_t globalIndex, std::string const& variableName, std::shared_ptr<storm::ir::expressions::BaseExpression> const& initialValue = std::shared_ptr<storm::ir::expressions::BaseExpression>(nullptr));
  37. /*!
  38. * Creates a copy of the given boolean variable and performs the provided renaming.
  39. *
  40. * @param oldVariable The variable to copy.
  41. * @param newName New name of this variable.
  42. * @param newGlobalIndex The new global index of the variable.
  43. * @param renaming A mapping from names that are to be renamed to the names they are to be
  44. * replaced with.
  45. * @param variableState An object knowing about the variables in the system.
  46. */
  47. BooleanVariable(BooleanVariable const& oldVariable, std::string const& newName, uint_fast64_t newGlobalIndex, std::map<std::string, std::string> const& renaming, storm::parser::prism::VariableState const& variableState);
  48. /*!
  49. * Retrieves a string representation of this variable.
  50. * @returns a string representation of this variable.
  51. */
  52. std::string toString() const;
  53. };
  54. } // namespace ir
  55. } // namespace storm
  56. #endif /* STORM_IR_BOOLEANVARIABLE_H_ */