diff --git a/prism/CHANGELOG.txt b/prism/CHANGELOG.txt index 75070202..04886e58 100644 --- a/prism/CHANGELOG.txt +++ b/prism/CHANGELOG.txt @@ -2,6 +2,9 @@ This file contains details of the changes in each new version of PRISM. New since last release: +* Allow command-line switches of form --sw (as well as -sw) +* Parametric model checking +* Fast adaptive uniformisation * Export labels from GUI ----------------------------------------------------------------------------- diff --git a/prism/src/prism/PrismCL.java b/prism/src/prism/PrismCL.java index d40649a9..4eb280fa 100644 --- a/prism/src/prism/PrismCL.java +++ b/prism/src/prism/PrismCL.java @@ -871,7 +871,11 @@ public class PrismCL implements PrismModelListener // if is a switch... if (args[i].length() > 0 && args[i].charAt(0) == '-') { + // Remove "-" sw = args[i].substring(1); + // Remove optional second "-" (i.e. we allow switches of the form --sw too) + if (sw.charAt(0) == '-') + sw = sw.substring(1); // Note: the order of these switches should match the -help output (just to help keep track of things). // But: processing of "PRISM" options is done elsewhere in PrismSettings diff --git a/prism/src/prism/PrismSettings.java b/prism/src/prism/PrismSettings.java index 6ef05b81..3794006b 100644 --- a/prism/src/prism/PrismSettings.java +++ b/prism/src/prism/PrismSettings.java @@ -787,7 +787,11 @@ public class PrismSettings implements Observer int j; double d; + // Remove "-" sw = args[i].substring(1); + // Remove optional second "-" (i.e. we allow switches of the form --sw too) + if (sw.charAt(0) == '-') + sw = sw.substring(1); // Note: the order of these switches should match the -help output (just to help keep track of things).