From 573307289837c18b28f1bc489516cb9b0fe53174 Mon Sep 17 00:00:00 2001 From: Tim Quatmann Date: Mon, 25 May 2020 16:32:34 +0200 Subject: [PATCH] TransientVariableInformation: Flagging a few getters const --- src/storm/generator/TransientVariableInformation.cpp | 6 +++--- src/storm/generator/TransientVariableInformation.h | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/storm/generator/TransientVariableInformation.cpp b/src/storm/generator/TransientVariableInformation.cpp index 391f290cd..420e2ae6e 100644 --- a/src/storm/generator/TransientVariableInformation.cpp +++ b/src/storm/generator/TransientVariableInformation.cpp @@ -97,21 +97,21 @@ namespace storm { } template - TransientVariableData const& TransientVariableInformation::getBooleanArrayVariableReplacement(storm::expressions::Variable const& arrayVariable, uint64_t arrayIndex) { + TransientVariableData const& TransientVariableInformation::getBooleanArrayVariableReplacement(storm::expressions::Variable const& arrayVariable, uint64_t arrayIndex) const { std::vector const& indices = arrayVariableToElementInformations.at(arrayVariable); STORM_LOG_THROW(arrayIndex < indices.size(), storm::exceptions::WrongFormatException, "Array access at array " << arrayVariable.getName() << " evaluates to array index " << arrayIndex << " which is out of bounds as the array size is " << indices.size() << "."); return booleanVariableInformation[indices[arrayIndex]]; } template - TransientVariableData const& TransientVariableInformation::getIntegerArrayVariableReplacement(storm::expressions::Variable const& arrayVariable, uint64_t arrayIndex) { + TransientVariableData const& TransientVariableInformation::getIntegerArrayVariableReplacement(storm::expressions::Variable const& arrayVariable, uint64_t arrayIndex) const { std::vector const& indices = arrayVariableToElementInformations.at(arrayVariable); STORM_LOG_THROW(arrayIndex < indices.size(), storm::exceptions::WrongFormatException, "Array access at array " << arrayVariable.getName() << " evaluates to array index " << arrayIndex << " which is out of bounds as the array size is " << indices.size() << "."); return integerVariableInformation[indices[arrayIndex]]; } template - TransientVariableData const& TransientVariableInformation::getRationalArrayVariableReplacement(storm::expressions::Variable const& arrayVariable, uint64_t arrayIndex) { + TransientVariableData const& TransientVariableInformation::getRationalArrayVariableReplacement(storm::expressions::Variable const& arrayVariable, uint64_t arrayIndex) const { std::vector const& indices = arrayVariableToElementInformations.at(arrayVariable); STORM_LOG_THROW(arrayIndex < indices.size(), storm::exceptions::WrongFormatException, "Array access at array " << arrayVariable.getName() << " evaluates to array index " << arrayIndex << " which is out of bounds as the array size is " << indices.size() << "."); return rationalVariableInformation[indices[arrayIndex]]; diff --git a/src/storm/generator/TransientVariableInformation.h b/src/storm/generator/TransientVariableInformation.h index c6047f470..5ea1c6342 100644 --- a/src/storm/generator/TransientVariableInformation.h +++ b/src/storm/generator/TransientVariableInformation.h @@ -93,9 +93,9 @@ namespace storm { TransientVariableInformation() = default; void registerArrayVariableReplacements(storm::jani::ArrayEliminatorData const& arrayEliminatorData); - TransientVariableData const& getBooleanArrayVariableReplacement(storm::expressions::Variable const& arrayVariable, uint64_t index); - TransientVariableData const& getIntegerArrayVariableReplacement(storm::expressions::Variable const& arrayVariable, uint64_t index); - TransientVariableData const& getRationalArrayVariableReplacement(storm::expressions::Variable const& arrayVariable, uint64_t index); + TransientVariableData const& getBooleanArrayVariableReplacement(storm::expressions::Variable const& arrayVariable, uint64_t index) const; + TransientVariableData const& getIntegerArrayVariableReplacement(storm::expressions::Variable const& arrayVariable, uint64_t index) const; + TransientVariableData const& getRationalArrayVariableReplacement(storm::expressions::Variable const& arrayVariable, uint64_t index) const; void setDefaultValuesInEvaluator(storm::expressions::ExpressionEvaluator& evaluator) const;