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

#include <Command.h>

Inheritance diagram for storm::prism::Command:
Collaboration diagram for storm::prism::Command:

Public Member Functions

 Command (uint_fast64_t globalIndex, bool markovian, uint_fast64_t actionIndex, std::string const &actionName, storm::expressions::Expression const &guardExpression, std::vector< storm::prism::Update > const &updates, std::string const &filename="", uint_fast64_t lineNumber=0)
 Creates a command with the given action name, guard and updates.
 
 Command ()=default
 
 Command (Command const &other)=default
 
Commandoperator= (Command const &other)=default
 
 Command (Command &&other)=default
 
Commandoperator= (Command &&other)=default
 
std::string const & getActionName () const
 Retrieves the action name of this command.
 
uint_fast64_t getActionIndex () const
 Retrieves the action index of this command.
 
bool isMarkovian () const
 Retrieves whether the command is a Markovian command, i.e.
 
void setMarkovian (bool value)
 Sets whether this command is a Markovian command, i.e.
 
storm::expressions::Expression const & getGuardExpression () const
 Retrieves a reference to the guard of the command.
 
std::size_t getNumberOfUpdates () const
 Retrieves the number of updates associated with this command.
 
storm::prism::Update const & getUpdate (uint_fast64_t index) const
 Retrieves a reference to the update with the given index.
 
std::vector< storm::prism::Update > const & getUpdates () const
 Retrieves a vector of all updates associated with this command.
 
std::vector< storm::prism::Update > & getUpdates ()
 Retrieves a vector of all updates associated with this command.
 
uint_fast64_t getGlobalIndex () const
 Retrieves the global index of the command, that is, a unique index over all modules.
 
Command substitute (std::map< storm::expressions::Variable, storm::expressions::Expression > const &substitution) const
 Substitutes all identifiers in the command according to the given map.
 
Command substituteNonStandardPredicates () const
 
bool isLabeled () const
 Retrieves whether the command possesses a synchronization label.
 
bool containsVariablesOnlyInUpdateProbabilities (std::set< storm::expressions::Variable > const &undefinedConstantVariables) const
 Checks whether the given set of variables only appears in the update probabilities of the command.
 
Command simplify () const
 Simplifies this command.
 
- 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, Command const &command)
 

Detailed Description

Definition at line 14 of file Command.h.

Constructor & Destructor Documentation

◆ Command() [1/4]

storm::prism::Command::Command ( uint_fast64_t  globalIndex,
bool  markovian,
uint_fast64_t  actionIndex,
std::string const &  actionName,
storm::expressions::Expression const &  guardExpression,
std::vector< storm::prism::Update > const &  updates,
std::string const &  filename = "",
uint_fast64_t  lineNumber = 0 
)

Creates a command with the given action name, guard and updates.

Parameters
globalIndexThe global index of the command.
markovianA flag indicating whether the command's update probabilities are to be interpreted as rates in a continuous-time model.
actionIndexThe index of the action of the command.
actionNameThe action name of the command.
guardExpressionthe expression that defines the guard of the command.
updatesA list of updates that is associated with this command.
filenameThe filename in which the command is defined.
lineNumberThe line number in which the command is defined.

Definition at line 5 of file Command.cpp.

◆ Command() [2/4]

storm::prism::Command::Command ( )
default

◆ Command() [3/4]

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

◆ Command() [4/4]

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

Member Function Documentation

◆ containsVariablesOnlyInUpdateProbabilities()

bool storm::prism::Command::containsVariablesOnlyInUpdateProbabilities ( std::set< storm::expressions::Variable > const &  undefinedConstantVariables) const

Checks whether the given set of variables only appears in the update probabilities of the command.

Parameters
undefinedConstantVariablesThe set of variables that may only appear in the update probabilities of the command.
Returns
True iff the given set of variables only appears in the update probabilities of the command.

Definition at line 86 of file Command.cpp.

◆ getActionIndex()

uint_fast64_t storm::prism::Command::getActionIndex ( ) const

Retrieves the action index of this command.

Returns
The action index of the command.

Definition at line 19 of file Command.cpp.

◆ getActionName()

std::string const & storm::prism::Command::getActionName ( ) const

Retrieves the action name of this command.

Returns
The action name of this command.

Definition at line 31 of file Command.cpp.

◆ getGlobalIndex()

uint_fast64_t storm::prism::Command::getGlobalIndex ( ) const

Retrieves the global index of the command, that is, a unique index over all modules.

Returns
The global index of the command.

Definition at line 56 of file Command.cpp.

◆ getGuardExpression()

storm::expressions::Expression const & storm::prism::Command::getGuardExpression ( ) const

Retrieves a reference to the guard of the command.

Returns
A reference to the guard of the command.

Definition at line 35 of file Command.cpp.

◆ getNumberOfUpdates()

std::size_t storm::prism::Command::getNumberOfUpdates ( ) const

Retrieves the number of updates associated with this command.

Returns
The number of updates associated with this command.

Definition at line 39 of file Command.cpp.

◆ getUpdate()

storm::prism::Update const & storm::prism::Command::getUpdate ( uint_fast64_t  index) const

Retrieves a reference to the update with the given index.

Returns
A reference to the update with the given index.

Definition at line 43 of file Command.cpp.

◆ getUpdates() [1/2]

std::vector< storm::prism::Update > & storm::prism::Command::getUpdates ( )

Retrieves a vector of all updates associated with this command.

Returns
A vector of updates associated with this command.

Definition at line 52 of file Command.cpp.

◆ getUpdates() [2/2]

std::vector< storm::prism::Update > const & storm::prism::Command::getUpdates ( ) const

Retrieves a vector of all updates associated with this command.

Returns
A vector of updates associated with this command.

Definition at line 48 of file Command.cpp.

◆ isLabeled()

bool storm::prism::Command::isLabeled ( ) const

Retrieves whether the command possesses a synchronization label.

Returns
True iff the command is labeled.

Definition at line 82 of file Command.cpp.

◆ isMarkovian()

bool storm::prism::Command::isMarkovian ( ) const

Retrieves whether the command is a Markovian command, i.e.

it's update likelihoods are to be interpreted as rates in a continuous-time model.

Returns
True iff the command is Markovian.

Definition at line 23 of file Command.cpp.

◆ operator=() [1/2]

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

◆ operator=() [2/2]

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

◆ setMarkovian()

void storm::prism::Command::setMarkovian ( bool  value)

Sets whether this command is a Markovian command, i.e.

it's update likelihoods are to be interpreted as rates in a continuous-time model.

Parameters
valueThe command is flagged as Markovian iff this flag is set.

Definition at line 27 of file Command.cpp.

◆ simplify()

Command storm::prism::Command::simplify ( ) const

Simplifies this command.

Definition at line 106 of file Command.cpp.

◆ substitute()

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

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

Parameters
substitutionThe substitution to perform.
Returns
The resulting command.

Definition at line 60 of file Command.cpp.

◆ substituteNonStandardPredicates()

Command storm::prism::Command::substituteNonStandardPredicates ( ) const

Definition at line 71 of file Command.cpp.

Friends And Related Symbol Documentation

◆ operator<<

std::ostream & operator<< ( std::ostream &  stream,
Command const &  command 
)
friend

Definition at line 122 of file Command.cpp.


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