Storm
A Modern Probabilistic Model Checker
Loading...
Searching...
No Matches
storm::jani::Variable Class Reference

#include <Variable.h>

Public Member Functions

 Variable (std::string const &name, JaniType const &type, storm::expressions::Variable const &variable, storm::expressions::Expression const &init, bool transient=false)
 Creates a new variable with initial value construct.
 
 Variable (std::string const &name, JaniType const &type, storm::expressions::Variable const &variable)
 Creates a new variable without initial value construct.
 
std::unique_ptr< Variableclone () const
 Clones the variable.
 
storm::expressions::Variable const & getExpressionVariable () const
 Retrieves the associated expression variable.
 
void setExpressionVariable (storm::expressions::Variable const &newVariable)
 Sets the associated expression variable.
 
std::string const & getName () const
 Retrieves the name of the variable.
 
void setName (std::string const &newName)
 Sets the name of the variable.
 
bool hasInitExpression () const
 Retrieves whether an initial expression is set.
 
storm::expressions::Expression const & getInitExpression () const
 Retrieves the initial expression Should only be called if an initial expression is set for this variable.
 
void setInitExpression (storm::expressions::Expression const &initialExpression)
 Sets the initial expression for this variable.
 
bool isTransient () const
 
JaniTypegetType ()
 
JaniType const & getType () const
 
storm::expressions::Expression getRangeExpression () const
 Retrieves an expression characterizing the legal range of the variable.
 
 ~Variable ()
 
void substitute (std::map< storm::expressions::Variable, storm::expressions::Expression > const &substitution, bool const substituteTranscendentalNumbers)
 Substitutes all variables in all expressions according to the given substitution.
 

Static Public Member Functions

static std::shared_ptr< VariablemakeVariable (std::string const &name, JaniType const &type, storm::expressions::Variable const &variable, boost::optional< storm::expressions::Expression > const &initValue, bool transient)
 Convenience functions to call the appropriate constructor and return a shared pointer to the variable.
 
static std::shared_ptr< VariablemakeBasicTypeVariable (std::string const &name, BasicType::Type const &type, storm::expressions::Variable const &variable, boost::optional< storm::expressions::Expression > const &initValue, bool transient)
 
static std::shared_ptr< VariablemakeBooleanVariable (std::string const &name, storm::expressions::Variable const &variable, boost::optional< storm::expressions::Expression > const &initValue, bool transient)
 
static std::shared_ptr< VariablemakeIntegerVariable (std::string const &name, storm::expressions::Variable const &variable, boost::optional< storm::expressions::Expression > const &initValue, bool transient)
 
static std::shared_ptr< VariablemakeRealVariable (std::string const &name, storm::expressions::Variable const &variable, boost::optional< storm::expressions::Expression > const &initValue, bool transient)
 
static std::shared_ptr< VariablemakeBoundedVariable (std::string const &name, BoundedType::BaseType const &type, storm::expressions::Variable const &variable, boost::optional< storm::expressions::Expression > const &initValue, bool transient, boost::optional< storm::expressions::Expression > const &lowerBound, boost::optional< storm::expressions::Expression > const &upperBound)
 
static std::shared_ptr< VariablemakeBoundedIntegerVariable (std::string const &name, storm::expressions::Variable const &variable, boost::optional< storm::expressions::Expression > const &initValue, bool transient, boost::optional< storm::expressions::Expression > const &lowerBound, boost::optional< storm::expressions::Expression > const &upperBound)
 
static std::shared_ptr< VariablemakeBoundedRealVariable (std::string const &name, storm::expressions::Variable const &variable, boost::optional< storm::expressions::Expression > const &initValue, bool transient, boost::optional< storm::expressions::Expression > const &lowerBound, boost::optional< storm::expressions::Expression > const &upperBound)
 
static std::shared_ptr< VariablemakeArrayVariable (std::string const &name, JaniType const &baseType, storm::expressions::Variable const &variable, boost::optional< storm::expressions::Expression > const &initValue, bool transient)
 
static std::shared_ptr< VariablemakeClockVariable (std::string const &name, storm::expressions::Variable const &variable, boost::optional< storm::expressions::Expression > const &initValue, bool transient)
 
static std::shared_ptr< VariablemakeContinuousVariable (std::string const &name, storm::expressions::Variable const &variable, boost::optional< storm::expressions::Expression > const &initValue, bool transient)
 

Detailed Description

Definition at line 12 of file Variable.h.

Constructor & Destructor Documentation

◆ Variable() [1/2]

storm::jani::Variable::Variable ( std::string const &  name,
JaniType const &  type,
storm::expressions::Variable const &  variable,
storm::expressions::Expression const &  init,
bool  transient = false 
)

Creates a new variable with initial value construct.

Definition at line 7 of file Variable.cpp.

◆ Variable() [2/2]

storm::jani::Variable::Variable ( std::string const &  name,
JaniType const &  type,
storm::expressions::Variable const &  variable 
)

Creates a new variable without initial value construct.

Definition at line 13 of file Variable.cpp.

◆ ~Variable()

storm::jani::Variable::~Variable ( )

Definition at line 18 of file Variable.cpp.

Member Function Documentation

◆ clone()

std::unique_ptr< Variable > storm::jani::Variable::clone ( ) const

Clones the variable.

Definition at line 22 of file Variable.cpp.

◆ getExpressionVariable()

storm::expressions::Variable const & storm::jani::Variable::getExpressionVariable ( ) const

Retrieves the associated expression variable.

Definition at line 26 of file Variable.cpp.

◆ getInitExpression()

storm::expressions::Expression const & storm::jani::Variable::getInitExpression ( ) const

Retrieves the initial expression Should only be called if an initial expression is set for this variable.

See also
hasInitExpression()

Definition at line 50 of file Variable.cpp.

◆ getName()

std::string const & storm::jani::Variable::getName ( ) const

Retrieves the name of the variable.

Definition at line 34 of file Variable.cpp.

◆ getRangeExpression()

storm::expressions::Expression storm::jani::Variable::getRangeExpression ( ) const

Retrieves an expression characterizing the legal range of the variable.

If the type is a bounded type, the expression will be of the form "l <= x && x <= u". Otherwise, an uninitialized expression is returned.

Definition at line 75 of file Variable.cpp.

◆ getType() [1/2]

JaniType & storm::jani::Variable::getType ( )

Definition at line 67 of file Variable.cpp.

◆ getType() [2/2]

JaniType const & storm::jani::Variable::getType ( ) const

Definition at line 71 of file Variable.cpp.

◆ hasInitExpression()

bool storm::jani::Variable::hasInitExpression ( ) const

Retrieves whether an initial expression is set.

Definition at line 46 of file Variable.cpp.

◆ isTransient()

bool storm::jani::Variable::isTransient ( ) const

Definition at line 42 of file Variable.cpp.

◆ makeArrayVariable()

std::shared_ptr< Variable > storm::jani::Variable::makeArrayVariable ( std::string const &  name,
JaniType const &  baseType,
storm::expressions::Variable const &  variable,
boost::optional< storm::expressions::Expression > const &  initValue,
bool  transient 
)
static

Definition at line 150 of file Variable.cpp.

◆ makeBasicTypeVariable()

std::shared_ptr< Variable > storm::jani::Variable::makeBasicTypeVariable ( std::string const &  name,
BasicType::Type const &  type,
storm::expressions::Variable const &  variable,
boost::optional< storm::expressions::Expression > const &  initValue,
bool  transient 
)
static

Definition at line 105 of file Variable.cpp.

◆ makeBooleanVariable()

std::shared_ptr< Variable > storm::jani::Variable::makeBooleanVariable ( std::string const &  name,
storm::expressions::Variable const &  variable,
boost::optional< storm::expressions::Expression > const &  initValue,
bool  transient 
)
static

Definition at line 110 of file Variable.cpp.

◆ makeBoundedIntegerVariable()

std::shared_ptr< Variable > storm::jani::Variable::makeBoundedIntegerVariable ( std::string const &  name,
storm::expressions::Variable const &  variable,
boost::optional< storm::expressions::Expression > const &  initValue,
bool  transient,
boost::optional< storm::expressions::Expression > const &  lowerBound,
boost::optional< storm::expressions::Expression > const &  upperBound 
)
static

Definition at line 136 of file Variable.cpp.

◆ makeBoundedRealVariable()

std::shared_ptr< Variable > storm::jani::Variable::makeBoundedRealVariable ( std::string const &  name,
storm::expressions::Variable const &  variable,
boost::optional< storm::expressions::Expression > const &  initValue,
bool  transient,
boost::optional< storm::expressions::Expression > const &  lowerBound,
boost::optional< storm::expressions::Expression > const &  upperBound 
)
static

Definition at line 143 of file Variable.cpp.

◆ makeBoundedVariable()

std::shared_ptr< Variable > storm::jani::Variable::makeBoundedVariable ( std::string const &  name,
BoundedType::BaseType const &  type,
storm::expressions::Variable const &  variable,
boost::optional< storm::expressions::Expression > const &  initValue,
bool  transient,
boost::optional< storm::expressions::Expression > const &  lowerBound,
boost::optional< storm::expressions::Expression > const &  upperBound 
)
static

Definition at line 125 of file Variable.cpp.

◆ makeClockVariable()

std::shared_ptr< Variable > storm::jani::Variable::makeClockVariable ( std::string const &  name,
storm::expressions::Variable const &  variable,
boost::optional< storm::expressions::Expression > const &  initValue,
bool  transient 
)
static

Definition at line 155 of file Variable.cpp.

◆ makeContinuousVariable()

std::shared_ptr< Variable > storm::jani::Variable::makeContinuousVariable ( std::string const &  name,
storm::expressions::Variable const &  variable,
boost::optional< storm::expressions::Expression > const &  initValue,
bool  transient 
)
static

Definition at line 160 of file Variable.cpp.

◆ makeIntegerVariable()

std::shared_ptr< Variable > storm::jani::Variable::makeIntegerVariable ( std::string const &  name,
storm::expressions::Variable const &  variable,
boost::optional< storm::expressions::Expression > const &  initValue,
bool  transient 
)
static

Definition at line 115 of file Variable.cpp.

◆ makeRealVariable()

std::shared_ptr< Variable > storm::jani::Variable::makeRealVariable ( std::string const &  name,
storm::expressions::Variable const &  variable,
boost::optional< storm::expressions::Expression > const &  initValue,
bool  transient 
)
static

Definition at line 120 of file Variable.cpp.

◆ makeVariable()

std::shared_ptr< Variable > storm::jani::Variable::makeVariable ( std::string const &  name,
JaniType const &  type,
storm::expressions::Variable const &  variable,
boost::optional< storm::expressions::Expression > const &  initValue,
bool  transient 
)
static

Convenience functions to call the appropriate constructor and return a shared pointer to the variable.

Definition at line 95 of file Variable.cpp.

◆ setExpressionVariable()

void storm::jani::Variable::setExpressionVariable ( storm::expressions::Variable const &  newVariable)

Sets the associated expression variable.

Definition at line 30 of file Variable.cpp.

◆ setInitExpression()

void storm::jani::Variable::setInitExpression ( storm::expressions::Expression const &  initialExpression)

Sets the initial expression for this variable.

Definition at line 55 of file Variable.cpp.

◆ setName()

void storm::jani::Variable::setName ( std::string const &  newName)

Sets the name of the variable.

Definition at line 38 of file Variable.cpp.

◆ substitute()

void storm::jani::Variable::substitute ( std::map< storm::expressions::Variable, storm::expressions::Expression > const &  substitution,
bool const  substituteTranscendentalNumbers 
)

Substitutes all variables in all expressions according to the given substitution.

Definition at line 59 of file Variable.cpp.


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