protected override bool ParseOption(string name, CommandLineParseState ps) { var args = ps.args; switch (name) { case "warnDeadCode": WarnDeadCode = true; Mode = Modes.Block; return(true); case "generateTestMode": if (ps.ConfirmArgumentCount(1)) { Mode = args[ps.i] switch { "None" => Modes.None, "Block" => Modes.Block, "Path" => Modes.Path, _ => throw new Exception("Invalid value for testMode") }; } return(true); case "generateTestSeqLengthLimit": var limit = 0; if (ps.GetNumericArgument(ref limit)) { SeqLengthLimit = (uint)limit; } return(true); case "generateTestTargetMethod": if (ps.ConfirmArgumentCount(1)) { TargetMethod = args[ps.i]; } return(true); case "generateTestInlineDepth": var depth = 0; if (ps.GetNumericArgument(ref depth)) { TestInlineDepth = (uint)depth; } return(true); } return(false); }
protected override bool ParseOption(string name, CommandLineParseState ps) { var args = ps.args; switch (name) { case "contracts": int i = 0; if (ps.GetNumericArgument(ref i, 2)) Contracts = i == 1; return true; case "evalAnalysis": int j = 0; if (ps.GetNumericArgument(ref j, 2)) EvalAnalysis = j == 1; return true; case "parallel": int k = 0; if (ps.GetNumericArgument(ref k, 2)) ParallelExecution = k == 1; return true; case "lazy": int l = 0; if (ps.GetNumericArgument(ref l, 2)) LazyEval = l == 1; return true; case "printCsv": int m = 0; if (ps.GetNumericArgument(ref m, 2)) PrintCsv = m == 1; return true; case "search": int s = -1; if (ps.GetNumericArgument(ref s, 2)) EnableSearch = s; return true; default: break; } return base.ParseOption(name, ps); }
protected override bool ParseOption(string name, CommandLineParseState ps) { if (name == "sourceLanguage") { if (ps.ConfirmArgumentCount(1)) { if (ps.args[ps.i] == "cl") { SourceLanguage = SourceLanguage.OpenCL; } else if (ps.args[ps.i] == "cu") { SourceLanguage = SourceLanguage.CUDA; } } return(true); } if (name == "blockHighestDim") { int highestDim = BlockHighestDim; ps.GetNumericArgument(ref highestDim, 3); BlockHighestDim = highestDim; return(true); } if (name == "gridHighestDim") { int highestDim = GridHighestDim; ps.GetNumericArgument(ref highestDim, 3); GridHighestDim = highestDim; return(true); } if (name == "debugGPUVerify") { DebugGPUVerify = true; return(true); } if (name == "onlyIntraGroupRaceChecking") { OnlyIntraGroupRaceChecking = true; return(true); } if (name == "raceChecking") { if (ps.ConfirmArgumentCount(1)) { if (ps.args[ps.i] == "ORIGINAL") { RaceInstrumentationUtil.RaceCheckingMethod = RaceCheckingMethod.ORIGINAL; } else if (ps.args[ps.i] == "SINGLE") { RaceInstrumentationUtil.RaceCheckingMethod = RaceCheckingMethod.WATCHDOG_SINGLE; } else if (ps.args[ps.i] == "MULTIPLE") { RaceInstrumentationUtil.RaceCheckingMethod = RaceCheckingMethod.WATCHDOG_MULTIPLE; } } return(true); } if (name == "displayLoopAbstractions") { DisplayLoopAbstractions = true; return(true); } return(base.ParseOption(name, ps)); // defer to superclass }
protected override bool ParseOption(string name, CommandLineParseState ps) { var args = ps.args; switch (name) { case "contracts": int i = 0; if (ps.GetNumericArgument(ref i, 2)) { Contracts = i == 1; } return(true); case "evalAnalysis": int j = 0; if (ps.GetNumericArgument(ref j, 2)) { EvalAnalysis = j == 1; } return(true); case "parallel": int k = 0; if (ps.GetNumericArgument(ref k, 2)) { ParallelExecution = k == 1; } return(true); case "lazy": int l = 0; if (ps.GetNumericArgument(ref l, 2)) { LazyEval = l == 1; } return(true); case "printCsv": int m = 0; if (ps.GetNumericArgument(ref m, 2)) { PrintCsv = m == 1; } return(true); case "search": int s = -1; if (ps.GetNumericArgument(ref s, 2)) { EnableSearch = s; } return(true); default: break; } return(base.ParseOption(name, ps)); }