mCRL2
Loading...
Searching...
No Matches
state_formula_specification.h
Go to the documentation of this file.
1// Author(s): Wieger Wesselink
2// Copyright: see the accompanying file COPYING or copy at
3// https://github.com/mCRL2org/mCRL2/blob/master/COPYING
4//
5// Distributed under the Boost Software License, Version 1.0.
6// (See accompanying file LICENSE_1_0.txt or copy at
7// http://www.boost.org/LICENSE_1_0.txt)
8//
9/// \file mcrl2/modal_formula/state_formula_specification.h
10/// \brief add your file description here.
11
12#ifndef MCRL2_MODAL_FORMULA_STATE_FORMULA_SPECIFICATION_H
13#define MCRL2_MODAL_FORMULA_STATE_FORMULA_SPECIFICATION_H
14
15#include "mcrl2/modal_formula/state_formula.h"
16
17namespace mcrl2::state_formulas {
18
20{
21 protected:
22 /// \brief The data specification of the specification
24
25 /// \brief The action specification of the specification
26 process::action_label_list m_action_labels;
27
28 /// \brief The formula of the specification
30
31 public:
32 /// \brief Constructor.
34
35 /// \brief Constructor of a state formula specification.
36 state_formula_specification(const state_formula& formula, const data::data_specification& data = data::data_specification(), const process::action_label_list& action_labels = {})
37 : m_data(data),
39 m_formula(formula)
40 {}
41
42 /// \brief Returns the data specification
43 /// \return The data specification
44 const data::data_specification& data() const
45 {
46 return m_data;
47 }
48
49 /// \brief Returns the data specification
50 /// \return The data specification
52 {
53 return m_data;
54 }
55
56 /// \brief Returns the action label specification
57 /// \return The action label specification
58 const process::action_label_list& action_labels() const
59 {
60 return m_action_labels;
61 }
62
63 /// \brief Returns the action label specification
64 /// \return The action label specification
65 process::action_label_list& action_labels()
66 {
67 return m_action_labels;
68 }
69
70 /// \brief Returns the formula of the state formula specification
71 /// \return The formula of the state formula specification
72 const state_formula& formula() const
73 {
74 return m_formula;
75 }
76
77 /// \brief Returns the formula of the state formula specification
78 /// \return The formula of the state formula specification
80 {
81 return m_formula;
82 }
83};
84
85//--- start generated classes ---//
86// prototype declaration
88
89/// \\brief Outputs the object to a stream
90/// \\param out An output stream
91/// \\param x Object x
92/// \\return The output stream
93inline
95{
96 return out << state_formulas::pp(x);
97}
98//--- end generated classes ---//
99
100} // namespace mcrl2::state_formulas
101
102
103
104#endif // MCRL2_MODAL_FORMULA_STATE_FORMULA_SPECIFICATION_H
data_specification()=default
Default constructor. Generate a data specification that contains only booleans and positive numbers.
process::action_label_list m_action_labels
The action specification of the specification.
const state_formula & formula() const
Returns the formula of the state formula specification.
state_formula_specification(const state_formula &formula, const data::data_specification &data=data::data_specification(), const process::action_label_list &action_labels={})
Constructor of a state formula specification.
state_formula m_formula
The formula of the specification.
data::data_specification m_data
The data specification of the specification.
state_formula & formula()
Returns the formula of the state formula specification.
const process::action_label_list & action_labels() const
Returns the action label specification.
process::action_label_list & action_labels()
Returns the action label specification.
state_formula(const state_formula &) noexcept=default
Move semantics.
D_ParserTables parser_tables_mcrl2
action_formula parse_action_formula(const std::string &text)
std::string pp(const action_formulas::exists &x, bool arg0)
std::string pp(const action_formulas::imp &x, bool arg0)
std::string pp(const action_formulas::at &x, bool arg0)
std::string pp(const action_formulas::forall &x, bool arg0)
std::string pp(const action_formulas::or_ &x, bool arg0)
std::string pp(const action_formulas::action_formula &x, bool arg0)
std::string pp(const action_formulas::true_ &x, bool arg0)
std::set< data::variable > find_all_variables(const action_formulas::action_formula &x)
std::string pp(const action_formulas::not_ &x, bool arg0)
std::string pp(const action_formulas::multi_action &x, bool arg0)
std::string pp(const action_formulas::false_ &x, bool arg0)
std::string pp(const action_formulas::and_ &x, bool arg0)
void warn_left_merge_merge(const parse_node &)
Prints a warning for each occurrence of 'x ||_ y || z' in the parse tree.
void warn_and_or(const parse_node &)
Prints a warning for each occurrence of 'x && y || z' in the parse tree.
The main namespace for the LPS library.
Definition constelm.h:18
The main namespace for the Process library.
regular_formula parse_regular_formula(const std::string &text)
std::string pp(const regular_formulas::trans &x, bool arg0)
std::string pp(const regular_formulas::alt &x, bool arg0)
std::string pp(const regular_formulas::untyped_regular_formula &x, bool arg0)
std::string pp(const regular_formulas::seq &x, bool arg0)
std::string pp(const regular_formulas::trans_or_nil &x, bool arg0)
std::string pp(const regular_formulas::regular_formula &x, bool arg0)
state_formula_specification parse_state_formula_specification(const std::string &text, const bool formula_is_quantitative)
Parses a state formula specification from text.
state_formula normalize(const state_formula &x)
Normalizes a state formula, i.e. removes any occurrences of ! or =>.
bool is_normalized(const state_formula &x)
Checks if a state formula is normalized.
state_formula parse_state_formula(std::istream &in, lps::stochastic_specification &lpsspec, const bool formula_is_quantitative)
Parses a state formula from an input stream.
state_formula normalize(const state_formula &x, bool quantitative=false, bool negated=false)
bool is_monotonous(const state_formula &f)
Returns true if the state formula is monotonous.
state_formula parse_state_formula(const std::string &text, lps::stochastic_specification &lpsspec, const bool formula_is_quantitative)
Parses a state formula from text.
state_formula_specification parse_state_formula_specification(std::istream &in, const bool formula_is_quantitative)
Parses a state formula specification from an input stream.
state_formula_specification parse_state_formula_specification(const std::string &text, lps::stochastic_specification &lpsspec, const bool formula_is_quantitative)
Parses a state formula specification from text.
bool is_timed(const state_formula &x)
std::set< core::identifier_string > find_state_variable_names(const state_formula &x)
Returns the names of the state variables that occur in x.
state_formula_specification parse_state_formula_specification(std::istream &in, lps::stochastic_specification &lpsspec, const bool formula_is_quantitative)
Parses a state formula specification from an input stream.
state_formula_specification parse_state_formula_specification(const std::string &text)
state_formula parse_state_formula(const std::string &text)
std::string pp(const state_formulas::nu &x, bool arg0)
std::string pp(const state_formulas::exists &x, bool arg0)
std::string pp(const state_formulas::not_ &x, bool arg0)
std::string pp(const state_formulas::supremum &x, bool arg0)
std::ostream & operator<<(std::ostream &out, const state_formula_specification &x)
std::string pp(const state_formulas::must &x, bool arg0)
std::string pp(const state_formulas::minus &x, bool arg0)
std::set< data::variable > find_all_variables(const state_formulas::state_formula &x)
std::set< data::variable > find_free_variables(const state_formulas::state_formula &x)
std::string pp(const state_formulas::true_ &x, bool arg0)
std::string pp(const state_formulas::state_formula &x, bool arg0)
std::string pp(const state_formulas::const_multiply &x, bool arg0)
std::string pp(const state_formulas::delay_timed &x, bool arg0)
bool is_timed(const state_formula &x)
Checks if a state formula is timed.
Definition is_timed.h:71
std::string pp(const state_formulas::imp &x, bool arg0)
std::string pp(const state_formulas::mu &x, bool arg0)
bool is_monotonous(const state_formula &f)
Returns true if the state formula is monotonous.
state_formulas::state_formula translate_user_notation(const state_formulas::state_formula &x)
state_formulas::state_formula normalize_sorts(const state_formulas::state_formula &x, const data::sort_specification &sortspec)
std::string pp(const state_formulas::delay &x, bool arg0)
std::string pp(const state_formulas::forall &x, bool arg0)
std::string pp(const state_formulas::sum &x, bool arg0)
std::string pp(const state_formulas::yaled &x, bool arg0)
std::string pp(const state_formulas::infimum &x, bool arg0)
std::string pp(const state_formulas::or_ &x, bool arg0)
std::string pp(const state_formulas::may &x, bool arg0)
std::string pp(const state_formulas::and_ &x, bool arg0)
std::string pp(const state_formulas::false_ &x, bool arg0)
std::string pp(const state_formulas::const_multiply_alt &x, bool arg0)
std::string pp(const state_formulas::state_formula_specification &x, bool arg0)
std::string pp(const state_formulas::yaled_timed &x, bool arg0)
std::string pp(const state_formulas::plus &x, bool arg0)
std::string pp(const state_formulas::variable &x, bool arg0)
std::set< data::sort_expression > find_sort_expressions(const state_formulas::state_formula &x)
std::set< process::action_label > find_action_labels(const state_formulas::state_formula &x)
std::set< core::identifier_string > find_identifiers(const state_formulas::state_formula &x)
action_formula_actions(const core::parser &parser_)
Definition parse_impl.h:27
action_formulas::action_formula parse_ActFrm(const core::parse_node &node) const
Definition parse_impl.h:31
regular_formulas::regular_formula parse_RegFrm(const core::parse_node &node) const
Definition parse_impl.h:61
untyped_state_formula_specification parse_StateFrmSpec(const core::parse_node &node) const
Definition parse_impl.h:204
state_formula_actions(const core::parser &parser_)
Definition parse_impl.h:95
state_formulas::state_formula parse_StateFrm(const core::parse_node &node) const
Definition parse_impl.h:133