From cb4e821e7ff761cb134581ffb46a31409eb3e9df Mon Sep 17 00:00:00 2001 From: sjunges Date: Tue, 9 Aug 2016 16:53:13 +0200 Subject: [PATCH] give an error message if a distribution occurs in an expression Former-commit-id: 533bfe34bb7e44bac594612244acb2cbd6c70572 [formerly 09d6896e9c96a64aa8145a6657aca14d3688d728] Former-commit-id: a1fa9e7ced3f1032c25d4b1e6585f991721a7480 --- src/parser/JaniParser.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/parser/JaniParser.cpp b/src/parser/JaniParser.cpp index 0afe7b147..8b261026e 100644 --- a/src/parser/JaniParser.cpp +++ b/src/parser/JaniParser.cpp @@ -318,6 +318,9 @@ namespace storm { std::string ident = expressionStructure.get(); return storm::expressions::Expression(getVariableOrConstantExpression(ident, scopeDescription, localVars)); } else if(expressionStructure.is_object()) { + if(expressionStructure.count("distribution") == 1) { + STORM_LOG_THROW(false, storm::exceptions::InvalidJaniException, "Distributions are not supported by storm expressions, cannot import " << expressionStructure.dump() << " in " << scopeDescription << "."); + } if(expressionStructure.count("op") == 1) { std::string opstring = getString(expressionStructure.at("op"), scopeDescription); std::vector arguments = {};