Skip to content
Permalink
Browse files

Add flag to specify k for k-tails entry point

  • Loading branch information...
ohmann committed May 11, 2018
1 parent db1f862 commit 9c3256fe42bbd85933f1ebac7b8e5dd9d0008b0e
@@ -43,6 +43,7 @@ public static KTailsMain getInstance() {
*/
public static void main(String[] args) throws Exception {
KTailsMain mainInstance = processArgs(args);
AbstractOptions opts = AbstractMain.getInstance().options;
if (mainInstance == null) {
return;
}
@@ -60,7 +61,7 @@ public static void main(String[] args) throws Exception {
PartitionGraph pGraph = new PartitionGraph(traceGraph, false, null);
loggerInfoEnd("Creating partition graph took ", startTime);

runKTails(pGraph, 2);
runKTails(pGraph, opts.kTailsK);
mainInstance.exportGraph(pGraph);
} catch (ParseException e) {
throw e;
@@ -39,6 +39,9 @@
// Execution Options
// ////////////////////////////

static final String kTailsKStr = "Merge states that are k-equivalent using this value as k.";
public int kTailsK = 2;

static final String logLvlQuietStr = "-q Be quiet, do not print much information";
public boolean logLvlQuiet = false;

@@ -67,10 +67,16 @@
// end option group "General Options"

// //////////////////////////////////////////////////
@OptionGroup("Execution Options")
/**
* Merge states that are k-equivalent using this value as k.
*/
@Option(value = AbstractOptions.kTailsKStr)
public int kTailsK = 2;

/**
* Be quiet, do not print much information. Sets the log level to WARNING.
*/
@OptionGroup("Execution Options")
@Option(value = AbstractOptions.logLvlQuietStr, aliases = { "-quiet" })
public boolean logLvlQuiet = false;

@@ -86,13 +92,6 @@
@Option(AbstractOptions.randomSeedStr)
public Long randomSeed = null;

/**
* The k parameter for determining k-equality when running the k-tails
* algorithm
*/
// @Option(AbstractOptions.kStr)
// public int k = 2;

// //////////////////////////////////////////////////
/**
* Regular expression separator string. When lines are found which match
@@ -416,6 +415,7 @@ public AbstractOptions toAbstractOptions() {

// Execution options

absOpts.kTailsK = kTailsK;
absOpts.logLvlQuiet = logLvlQuiet;
absOpts.logLvlVerbose = logLvlVerbose;
absOpts.randomSeed = randomSeed;

0 comments on commit 9c3256f

Please sign in to comment.
You can’t perform that action at this time.