From bb6fc9a564a6e748bf25e41ab6e9eca6520b8d20 Mon Sep 17 00:00:00 2001 From: Joachim Klein Date: Thu, 8 Mar 2018 14:20:06 +0100 Subject: [PATCH] PrismCL: In test mode, don't immediately exit for not supported engine / solver combinations In test mode, we'd like to have proper 'not supported' handling during the tests, so we don't exit immediately when encountering an engine / iteration method that is incompatible, as that would count as a failure. --- prism/src/prism/PrismCL.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/prism/src/prism/PrismCL.java b/prism/src/prism/PrismCL.java index a5f55488..e8a5ed30 100644 --- a/prism/src/prism/PrismCL.java +++ b/prism/src/prism/PrismCL.java @@ -2099,7 +2099,8 @@ public class PrismCL implements PrismModelListener } // check not trying to do gauss-seidel with mtbdd engine - if (prism.getEngine() == Prism.MTBDD) { + // (if we are in test mode, we ignore here; will lead to appropriate 'not supported' error handling during testing) + if (prism.getEngine() == Prism.MTBDD && !test) { j = prism.getLinEqMethod(); if (j == Prism.GAUSSSEIDEL || j == Prism.BGAUSSSEIDEL || j == Prism.PGAUSSSEIDEL || j == Prism.BPGAUSSSEIDEL) { errorAndExit("Gauss-Seidel and its variants are currently not supported by the MTBDD engine"); @@ -2110,7 +2111,8 @@ public class PrismCL implements PrismModelListener } // or pseudo methods with sparse engine - else if (prism.getEngine() == Prism.SPARSE) { + // (if we are in test mode, we ignore here; will lead to appropriate 'not supported' error handling during testing) + else if (prism.getEngine() == Prism.SPARSE && !test) { j = prism.getLinEqMethod(); if (j == Prism.PGAUSSSEIDEL || j == Prism.BPGAUSSSEIDEL || j == Prism.PSOR || j == Prism.BPSOR) { errorAndExit("Pseudo Gauss-Seidel/SOR methods are currently not supported by the sparse engine");