From 580018e419c1c0d6cdc4f47103be2d7c1aad1eb7 Mon Sep 17 00:00:00 2001 From: Nathanael Sensfelder Date: Mon, 17 Jul 2017 15:53:57 +0200 Subject: Fixes a few dumb mistakes, adds ps example. --- cfg-to-paths/src/Parameters.java | 45 +++++++++++++++++++++++++++------------- 1 file changed, 31 insertions(+), 14 deletions(-) (limited to 'cfg-to-paths/src/Parameters.java') 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 \n" + + "\tjava Main \n" + "PARAMETERS:\n" - + "\t\tDirectory containing the level definitions.\n" + "\t\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\tID of the root node for this DAG.\n" + + "\t\tPrefix for the IDs of generated paths.\n" + + "\t\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 () -- cgit v1.2.3-70-g09d2