Storm
A Modern Probabilistic Model Checker
Loading...
Searching...
No Matches
storm::prism::Constant Class Reference

#include <Constant.h>

Inheritance diagram for storm::prism::Constant:
Collaboration diagram for storm::prism::Constant:

Public Member Functions

 Constant (storm::expressions::Variable const &variable, storm::expressions::Expression const &expression, std::string const &filename="", uint_fast64_t lineNumber=0)
 Creates a defined constant.
 
 Constant (storm::expressions::Variable const &variable, std::string const &filename="", uint_fast64_t lineNumber=0)
 Creates an undefined constant.
 
 Constant ()=default
 
 Constant (Constant const &other)=default
 
Constantoperator= (Constant const &other)=default
 
 Constant (Constant &&other)=default
 
Constantoperator= (Constant &&other)=default
 
std::string const & getName () const
 Retrieves the name of the constant.
 
storm::expressions::Type const & getType () const
 Retrieves the type of the constant.
 
storm::expressions::Variable const & getExpressionVariable () const
 Retrieves the expression variable associated with this constant.
 
bool isDefined () const
 Retrieves whether the constant is defined, i.e., whether there is an expression defining its value.
 
storm::expressions::Expression const & getExpression () const
 Retrieves the expression that defines the constant.
 
Constant substitute (std::map< storm::expressions::Variable, storm::expressions::Expression > const &substitution) const
 Substitutes all identifiers in the constant according to the given map.
 
- Public Member Functions inherited from storm::prism::LocatedInformation
 LocatedInformation (std::string const &filename, uint_fast64_t lineNumber)
 Constructs a located information with the given filename and line number.
 
 LocatedInformation ()=default
 
 LocatedInformation (LocatedInformation const &other)=default
 
LocatedInformationoperator= (LocatedInformation const &other)=default
 
 LocatedInformation (LocatedInformation &&other)=default
 
LocatedInformationoperator= (LocatedInformation &&other)=default
 
std::string const & getFilename () const
 Retrieves the name of the file in which the information was found.
 
void setFilename (std::string const &filename)
 Sets the filename of this information.
 
uint_fast64_t getLineNumber () const
 Retrieves the line number in which the information was found.
 
void setLineNumber (uint_fast64_t lineNumber)
 Sets the line number of this information.
 

Friends

std::ostream & operator<< (std::ostream &stream, Constant const &constant)
 

Detailed Description

Definition at line 11 of file Constant.h.

Constructor & Destructor Documentation

◆ Constant() [1/5]

storm::prism::Constant::Constant ( storm::expressions::Variable const &  variable,
storm::expressions::Expression const &  expression,
std::string const &  filename = "",
uint_fast64_t  lineNumber = 0 
)

Creates a defined constant.

Parameters
variableThe expression variable associated with the constant.
expressionThe expression that defines the constant.
filenameThe filename in which the transition reward is defined.
lineNumberThe line number in which the transition reward is defined.

Definition at line 7 of file Constant.cpp.

◆ Constant() [2/5]

storm::prism::Constant::Constant ( storm::expressions::Variable const &  variable,
std::string const &  filename = "",
uint_fast64_t  lineNumber = 0 
)

Creates an undefined constant.

Parameters
variableThe expression variable associated with the constant.
filenameThe filename in which the transition reward is defined.
lineNumberThe line number in which the transition reward is defined.

Definition at line 13 of file Constant.cpp.

◆ Constant() [3/5]

storm::prism::Constant::Constant ( )
default

◆ Constant() [4/5]

storm::prism::Constant::Constant ( Constant const &  other)
default

◆ Constant() [5/5]

storm::prism::Constant::Constant ( Constant &&  other)
default

Member Function Documentation

◆ getExpression()

storm::expressions::Expression const & storm::prism::Constant::getExpression ( ) const

Retrieves the expression that defines the constant.

Note that the expression may not be initialized.

Returns
The expression that defines the constant.

Definition at line 34 of file Constant.cpp.

◆ getExpressionVariable()

storm::expressions::Variable const & storm::prism::Constant::getExpressionVariable ( ) const

Retrieves the expression variable associated with this constant.

Returns
The expression variable associated with this constant.

Definition at line 26 of file Constant.cpp.

◆ getName()

std::string const & storm::prism::Constant::getName ( ) const

Retrieves the name of the constant.

Returns
The name of the constant.

Definition at line 18 of file Constant.cpp.

◆ getType()

storm::expressions::Type const & storm::prism::Constant::getType ( ) const

Retrieves the type of the constant.

Returns
The type of the constant;

Definition at line 22 of file Constant.cpp.

◆ isDefined()

bool storm::prism::Constant::isDefined ( ) const

Retrieves whether the constant is defined, i.e., whether there is an expression defining its value.

Returns
True iff the constant is defined.

Definition at line 30 of file Constant.cpp.

◆ operator=() [1/2]

Constant & storm::prism::Constant::operator= ( Constant &&  other)
default

◆ operator=() [2/2]

Constant & storm::prism::Constant::operator= ( Constant const &  other)
default

◆ substitute()

Constant storm::prism::Constant::substitute ( std::map< storm::expressions::Variable, storm::expressions::Expression > const &  substitution) const

Substitutes all identifiers in the constant according to the given map.

Parameters
substitutionThe substitution to perform.
Returns
The resulting constant.

Definition at line 38 of file Constant.cpp.

Friends And Related Symbol Documentation

◆ operator<<

std::ostream & operator<< ( std::ostream &  stream,
Constant const &  constant 
)
friend

Definition at line 46 of file Constant.cpp.


The documentation for this class was generated from the following files: