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.

35 lines
1012 B

  1. #include "src/logic/BooleanLiteralFormula.h"
  2. #include "src/logic/FormulaVisitor.h"
  3. namespace storm {
  4. namespace logic {
  5. BooleanLiteralFormula::BooleanLiteralFormula(bool value) : value(value) {
  6. // Intenionally left empty.
  7. }
  8. bool BooleanLiteralFormula::isBooleanLiteralFormula() const {
  9. return true;
  10. }
  11. bool BooleanLiteralFormula::isTrueFormula() const {
  12. return value;
  13. }
  14. bool BooleanLiteralFormula::isFalseFormula() const {
  15. return !value;
  16. }
  17. boost::any BooleanLiteralFormula::accept(FormulaVisitor const& visitor, boost::any const& data) const {
  18. return visitor.visit(*this, data);
  19. }
  20. std::ostream& BooleanLiteralFormula::writeToStream(std::ostream& out) const {
  21. if (value) {
  22. out << "true";
  23. } else {
  24. out << "false";
  25. }
  26. return out;
  27. }
  28. }
  29. }