Storm
A Modern Probabilistic Model Checker
Loading...
Searching...
No Matches
GloballyFormula.cpp
Go to the documentation of this file.
1
#include "
storm/logic/GloballyFormula.h
"
2
#include <boost/any.hpp>
3
#include <ostream>
4
5
#include "
storm/logic/FormulaVisitor.h
"
6
7
namespace
storm
{
8
namespace
logic {
9
GloballyFormula::GloballyFormula
(std::shared_ptr<Formula const>
const
& subformula) :
UnaryPathFormula
(subformula) {
10
// Intentionally left empty.
11
}
12
13
bool
GloballyFormula::isGloballyFormula
()
const
{
14
return
true
;
15
}
16
17
bool
GloballyFormula::isProbabilityPathFormula
()
const
{
18
return
true
;
19
}
20
21
boost::any
GloballyFormula::accept
(
FormulaVisitor
const
& visitor, boost::any
const
& data)
const
{
22
return
visitor.
visit
(*
this
, data);
23
}
24
25
std::ostream&
GloballyFormula::writeToStream
(std::ostream& out,
bool
allowParentheses)
const
{
26
if
(allowParentheses) {
27
out <<
"("
;
28
}
29
out <<
"G "
;
30
this->
getSubformula
().
writeToStream
(out, !this->
getSubformula
().
isUnaryFormula
());
31
if
(allowParentheses) {
32
out <<
")"
;
33
}
34
return
out;
35
}
36
}
// namespace logic
37
}
// namespace storm
FormulaVisitor.h
GloballyFormula.h
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::Formula::isUnaryFormula
bool isUnaryFormula() const
Definition
Formula.cpp:184
storm::logic::FormulaVisitor
Definition
FormulaVisitor.h:12
storm::logic::FormulaVisitor::visit
virtual boost::any visit(AtomicExpressionFormula const &f, boost::any const &data) const =0
storm::logic::GloballyFormula::writeToStream
virtual std::ostream & writeToStream(std::ostream &out, bool allowParentheses=false) const override
Writes the forumla to the given output stream.
Definition
GloballyFormula.cpp:25
storm::logic::GloballyFormula::accept
virtual boost::any accept(FormulaVisitor const &visitor, boost::any const &data) const override
Definition
GloballyFormula.cpp:21
storm::logic::GloballyFormula::GloballyFormula
GloballyFormula(std::shared_ptr< Formula const > const &subformula)
Definition
GloballyFormula.cpp:9
storm::logic::GloballyFormula::isGloballyFormula
virtual bool isGloballyFormula() const override
Definition
GloballyFormula.cpp:13
storm::logic::GloballyFormula::isProbabilityPathFormula
virtual bool isProbabilityPathFormula() const override
Definition
GloballyFormula.cpp:17
storm::logic::UnaryPathFormula
Definition
UnaryPathFormula.h:10
storm::logic::UnaryPathFormula::getSubformula
Formula const & getSubformula() const
Definition
UnaryPathFormula.cpp:13
storm
LabParser.cpp.
Definition
cli.cpp:18
src
storm
logic
GloballyFormula.cpp
Generated by
1.9.8