From d3774f9958350a8747303b143919e9ea6818da74 Mon Sep 17 00:00:00 2001 From: Sebastian Junges Date: Wed, 8 Feb 2017 18:11:40 +0100 Subject: [PATCH] JANI: parse assignment index/level --- src/storm/parser/JaniParser.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/storm/parser/JaniParser.cpp b/src/storm/parser/JaniParser.cpp index c47d59940..c8f0c15e8 100644 --- a/src/storm/parser/JaniParser.cpp +++ b/src/storm/parser/JaniParser.cpp @@ -1074,7 +1074,12 @@ namespace storm { STORM_LOG_THROW(assignmentEntry.count("value") == 1, storm::exceptions::InvalidJaniException, "Assignment in edge from '" << sourceLoc << "' to '" << targetLoc << "' in automaton '" << name << "' must have one value field"); storm::expressions::Expression assignmentExpr = parseExpression(assignmentEntry.at("value"), "assignment in edge from '" + sourceLoc + "' to '" + targetLoc + "' in automaton '" + name + "'", localVars); // TODO check types - assignments.emplace_back(lhs, assignmentExpr); + // index + uint64_t assignmentIndex = 0; // default. + if(assignmentEntry.count("index") > 0) { + assignmentIndex = getUnsignedInt(assignmentEntry.at("index"), "assignment index in edge from '" + sourceLoc + "' to '" + targetLoc + "' in automaton '" + name + "'"); + } + assignments.emplace_back(lhs, assignmentExpr, assignmentIndex); } } destinationLocationsAndProbabilities.emplace_back(locIds.at(targetLoc), probExpr);