/// <summary> /// Parse the given option. /// </summary> /// <param name="option">Option</param> protected override void ParseOption(string option) { var configuration = base.Configuration as DynamicAnalysisConfiguration; if (option.ToLower().StartsWith("/test:") && option.Length > 6) { configuration.AssemblyToBeAnalyzed = option.Substring(6); } else if (option.ToLower().StartsWith("/sch:") && option.Length > 5) { if (option.ToLower().Substring(5).Equals("random")) { configuration.SchedulingStrategy = SchedulingStrategy.Random; } else if (option.ToLower().Substring(5).Equals("dfs")) { configuration.SchedulingStrategy = SchedulingStrategy.DFS; } else if (option.ToLower().Substring(5).Equals("iddfs")) { configuration.SchedulingStrategy = SchedulingStrategy.IDDFS; } else if (option.ToLower().Substring(5).Equals("macemc")) { configuration.SchedulingStrategy = SchedulingStrategy.MaceMC; } } else if (option.ToLower().StartsWith("/i:") && option.Length > 3) { int i = 0; if (!int.TryParse(option.Substring(3), out i) && i > 0) { ErrorReporter.ReportAndExit("Please give a valid number of iterations " + "'/i:[x]', where [x] > 0."); } configuration.SchedulingIterations = i; } else if (option.ToLower().Equals("/explore")) { configuration.FullExploration = true; } else if (option.ToLower().StartsWith("/sch-seed:") && option.Length > 10) { int seed; if (!int.TryParse(option.Substring(10), out seed)) { ErrorReporter.ReportAndExit("Please give a valid random scheduling " + "seed '/sch-seed:[x]', where [x] is a signed 32-bit integer."); } configuration.RandomSchedulingSeed = seed; } else if (option.ToLower().StartsWith("/db:") && option.Length > 4) { int i = 0; if (!int.TryParse(option.Substring(4), out i) && i >= 0) { ErrorReporter.ReportAndExit("Please give a valid exploration depth " + "bound '/db:[x]', where [x] >= 0."); } configuration.DepthBound = i; } else if (option.ToLower().StartsWith("/prefix:") && option.Length > 8) { int i = 0; if (!int.TryParse(option.Substring(8), out i) && i >= 0) { ErrorReporter.ReportAndExit("Please give a valid safety prefix " + "bound '/prefix:[x]', where [x] >= 0."); } configuration.SafetyPrefixBound = i; } else if (option.ToLower().Equals("/printtrace")) { configuration.PrintTrace = true; } else if (option.ToLower().Equals("/tpl")) { configuration.ScheduleIntraMachineConcurrency = true; } else if (option.ToLower().Equals("/liveness")) { configuration.CheckLiveness = true; } else if (option.ToLower().Equals("/statecaching")) { configuration.CacheProgramState = true; } else { base.ParseOption(option); } }