| summaryrefslogtreecommitdiff |
diff options
| author | Nathanael Sensfelder <SpamShield0@MultiAgentSystems.org> | 2017-07-17 15:53:57 +0200 |
|---|---|---|
| committer | Nathanael Sensfelder <SpamShield0@MultiAgentSystems.org> | 2017-07-17 15:53:57 +0200 |
| commit | 580018e419c1c0d6cdc4f47103be2d7c1aad1eb7 (patch) | |
| tree | 102792a4a618b7ffdcc135450641c1f2a1825396 /cfg-to-paths/src/Parameters.java | |
| parent | d48380bd87dcef4b095b2a4e578d4461e68df73c (diff) | |
Fixes a few dumb mistakes, adds ps example.
Diffstat (limited to 'cfg-to-paths/src/Parameters.java')
| -rw-r--r-- | cfg-to-paths/src/Parameters.java | 45 |
1 files changed, 31 insertions, 14 deletions
diff --git a/cfg-to-paths/src/Parameters.java b/cfg-to-paths/src/Parameters.java index 8d0331b..710b1f7 100644 --- a/cfg-to-paths/src/Parameters.java +++ b/cfg-to-paths/src/Parameters.java @@ -1,7 +1,9 @@ public class Parameters { - private final String levels_dir; private final String model_file; + private final String root_node; + private final String id_prefix; + private final String output_file; private final boolean are_valid; public static void print_usage () @@ -10,42 +12,57 @@ public class Parameters ( "Instr-to-kodkod\n" + "USAGE:\n" - + "\tjava Main <LEVELS_DIR> <INSTRUCTIONS>\n" + + "\tjava Main <INSTRUCTIONS> <ROOT_NODE> <ID_PREFIX> <OUTPUT_FILE>\n" + "PARAMETERS:\n" - + "\t<LEVELS_DIR>\tDirectory containing the level definitions.\n" + "\t<INSTRUCTIONS>\tInstruction file describing the model.\n" - + "NOTES:\n" - + "\tThe properties to be verified still have to be hand coded in the" - + "source files (in Main.java)." + + "\t<ROOT_NODE>\tID of the root node for this DAG.\n" + + "\t<ID_PREFIX>\tPrefix for the IDs of generated paths.\n" + + "\t<OUTPUT_FILE>\tFile in which to output the generated" + + " instructions." ); } public Parameters (String... args) { - if (args.length != 2) + if (args.length != 4) { print_usage(); - levels_dir = new String(); model_file = new String(); + root_node = new String(); + id_prefix = new String(); + output_file = new String(); + are_valid = false; } else { - levels_dir = args[0]; - model_file = args[1]; + model_file = args[0]; + root_node = args[1]; + id_prefix = args[2]; + output_file = args[3]; are_valid = true; } } - public String get_levels_directory () + public String get_model_file () { - return levels_dir; + return model_file; } - public String get_model_file () + public String get_root_node () { - return model_file; + return root_node; + } + + public String get_id_prefix () + { + return id_prefix; + } + + public String get_output_file () + { + return output_file; } public boolean are_valid () |


