Storm
1.14.0.1
A Modern Probabilistic Model Checker
Loading...
Searching...
No Matches
ReleaseFormula.cpp
Go to the documentation of this file.
1
#include "
storm/logic/ReleaseFormula.h
"
2
#include <boost/any.hpp>
3
#include <ostream>
4
5
#include "
storm/logic/FormulaVisitor.h
"
6
7
namespace
storm
{
8
namespace
logic
{
9
ReleaseFormula::ReleaseFormula
(std::shared_ptr<Formula const>
const
& leftSubformula, std::shared_ptr<Formula const>
const
& rightSubformula)
10
:
BinaryPathFormula
(leftSubformula, rightSubformula) {
11
// Intentionally left empty.
12
}
13
14
bool
ReleaseFormula::isReleaseFormula
()
const
{
15
return
true
;
16
}
17
18
bool
ReleaseFormula::isProbabilityPathFormula
()
const
{
19
return
true
;
20
}
21
22
boost::any
ReleaseFormula::accept
(
FormulaVisitor
const
& visitor, boost::any
const
& data)
const
{
23
return
visitor.
visit
(*
this
, data);
24
}
25
26
std::ostream&
ReleaseFormula::writeToStream
(std::ostream& out,
bool
allowParentheses)
const
{
27
if
(allowParentheses) {
28
out <<
"("
;
29
}
30
this->
getLeftSubformula
().
writeToStream
(out,
true
);
31
out <<
" R "
;
32
this->
getRightSubformula
().
writeToStream
(out,
true
);
33
if
(allowParentheses) {
34
out <<
")"
;
35
}
36
return
out;
37
}
38
}
// namespace logic
39
}
// namespace storm
FormulaVisitor.h
ReleaseFormula.h
storm::logic::BinaryPathFormula::getRightSubformula
Formula const & getRightSubformula() const
Definition
BinaryPathFormula.cpp:18
storm::logic::BinaryPathFormula::BinaryPathFormula
BinaryPathFormula(std::shared_ptr< Formula const > const &leftSubformula, std::shared_ptr< Formula const > const &rightSubformula)
Definition
BinaryPathFormula.cpp:5
storm::logic::BinaryPathFormula::getLeftSubformula
Formula const & getLeftSubformula() const
Definition
BinaryPathFormula.cpp:14
storm::logic::Formula::writeToStream
virtual std::ostream & writeToStream(std::ostream &out, bool allowParentheses=false) const =0
Writes the forumla to the given output stream.
storm::logic::FormulaVisitor
Definition
FormulaVisitor.h:11
storm::logic::FormulaVisitor::visit
virtual boost::any visit(AtomicExpressionFormula const &f, boost::any const &data) const =0
storm::logic::ReleaseFormula::isProbabilityPathFormula
virtual bool isProbabilityPathFormula() const override
Definition
ReleaseFormula.cpp:18
storm::logic::ReleaseFormula::ReleaseFormula
ReleaseFormula(std::shared_ptr< Formula const > const &leftSubformula, std::shared_ptr< Formula const > const &rightSubformula)
Definition
ReleaseFormula.cpp:9
storm::logic::ReleaseFormula::accept
virtual boost::any accept(FormulaVisitor const &visitor, boost::any const &data) const override
Definition
ReleaseFormula.cpp:22
storm::logic::ReleaseFormula::writeToStream
virtual std::ostream & writeToStream(std::ostream &out, bool allowParentheses=false) const override
Writes the forumla to the given output stream.
Definition
ReleaseFormula.cpp:26
storm::logic::ReleaseFormula::isReleaseFormula
virtual bool isReleaseFormula() const override
Definition
ReleaseFormula.cpp:14
storm::logic
Definition
solutionFunctions.h:17
storm
Definition
AutomaticSettings.cpp:13
src
storm
logic
ReleaseFormula.cpp
Generated by
1.15.0