Пример #1
0
        protected override bool ParseOption(string name, CommandLineOptionEngine.CommandLineParseState ps)
        {
            var args = ps.args;    // convenient synonym

            switch (name)
            {
            case "n":
                if (ps.ConfirmArgumentCount(1))
                {
                    N = Int32.Parse(cce.NonNull(args[ps.i]));
                }

                return(true);

            case "noMutation":
                if (ps.ConfirmArgumentCount(0))
                {
                    NoMutation = true;
                }

                return(true);
            }

            return(base.ParseOption(name, ps));
        }
        protected override bool ParseOption(string option, CommandLineOptionEngine.CommandLineParseState ps)
        {
            if (option == "skipRaceFreePairs")
            {
                this.SkipRaceFreePairs = true;
                return(true);
            }

            return(base.ParseOption(option, ps));
        }
Пример #3
0
        protected override bool ParseOption(string option, CommandLineOptionEngine.CommandLineParseState ps)
        {
            if (option == "help")
            {
                this.ShowHelp();
                System.Environment.Exit(1);
            }
            else if (option == "o")
            {
                if (ps.ConfirmArgumentCount(1))
                {
                    var split = ps.args[ps.i].Split('.');
                    if (split.Length != 2 || !split[1].Equals("bpl"))
                    {
                        Lockpwn.IO.Reporter.ErrorWriteLine("Extension of output must be '.bpl'");
                        System.Environment.Exit((int)Outcome.ParsingError);
                    }

                    this.OutputFile = split[0];
                }

                return(true);
            }
            else if (option == "v")
            {
                this.VerboseMode = true;
                return(true);
            }
            else if (option == "v2")
            {
                this.VerboseMode      = true;
                this.SuperVerboseMode = true;
                return(true);
            }
            else if (option == "debug")
            {
                this.VerboseMode      = true;
                this.SuperVerboseMode = true;
                Output.Debugging      = true;
                return(true);
            }
            else if (option == "temp")
            {
                this.KeepTemporaryFiles = true;
                return(true);
            }
            else if (option == "time")
            {
                this.MeasureTime = true;
                return(true);
            }
            else if (option == "noAssert")
            {
                this.DisableUserAssertions = true;
                return(true);
            }
            else if (option == "showErrorModel")
            {
                this.ShowErrorModel = true;
                return(true);
            }
            else if (option == "noSeq")
            {
                this.SkipSequentialization = true;
                return(true);
            }
            else if (option == "noInv")
            {
                this.SkipSummarization = true;
                return(true);
            }
            else if (option == "corral")
            {
                this.EnableCorralMode = true;
                return(true);
            }
//      else
//      {
//        Lockpwn.IO.Reporter.ErrorWriteLine("lockpwn: error: command line option /{0} not available.", option);
//        this.ShowHelp();
//        System.Environment.Exit((int)Outcome.FatalError);
//      }

            return(base.ParseOption(option, ps));
        }
Пример #4
0
 protected override bool ParseOption(string option, CommandLineOptionEngine.CommandLineParseState ps)
 {
     return(base.ParseOption(option, ps));
 }
Пример #5
0
        protected override bool ParseOption(string option, CommandLineOptionEngine.CommandLineParseState ps)
        {
            if (option == "originalFile")
            {
                if (ps.ConfirmArgumentCount(1))
                {
                    this.OriginalFile = ps.args[ps.i];
                }
                return(true);
            }

            if (option == "whoopDecl")
            {
                if (ps.ConfirmArgumentCount(1))
                {
                    this.WhoopDeclFile = ps.args[ps.i];
                }
                return(true);
            }

            if (option == "analyseOnly")
            {
                if (ps.ConfirmArgumentCount(1))
                {
                    this.AnalyseOnly = ps.args[ps.i];
                }
                return(true);
            }

            if (option == "inlineBound")
            {
                if (ps.ConfirmArgumentCount(1))
                {
                    this.InliningBound = Int32.Parse(ps.args[ps.i]);
                }
                return(true);
            }

            if (option == "checkInParamAliasing")
            {
                this.CheckInParamAliasing = true;
                return(true);
            }

            if (option == "noExistentialOpts")
            {
                this.MergeExistentials = false;
                return(true);
            }

            if (option == "onlyRaceChecking")
            {
                this.OnlyRaceChecking = true;
                return(true);
            }

            if (option == "findBugs")
            {
                this.FindBugs = true;
                return(true);
            }

            if (option == "yieldAll")
            {
                this.YieldAll = true;
                return(true);
            }

            if (option == "yieldCoarse")
            {
                this.YieldCoarse = true;
                return(true);
            }

            if (option == "yieldNoAccess")
            {
                this.YieldNoAccess = true;
                return(true);
            }

            if (option == "yieldRaceChecking")
            {
                this.YieldRaceChecking = true;
                return(true);
            }

            if (option == "optimizeCorral")
            {
                this.OptimizeCorral = true;
                return(true);
            }

            if (option == "countYields")
            {
                this.CountYields = true;
                return(true);
            }

            if (option == "noHeavyAsyncCallsOptimisation")
            {
                this.OptimiseHeavyAsyncCalls = false;
                return(true);
            }

            if (option == "skipInference")
            {
                this.SkipInference = true;
                return(true);
            }

            if (option == "printPairs")
            {
                this.PrintPairs = true;
                return(true);
            }

            if (option == "inline")
            {
                this.InlineHelperFunctions = true;
                return(true);
            }

            if (option == "timePasses")
            {
                this.MeasurePassExecutionTime = true;
                return(true);
            }

            if (option == "debugWhoop")
            {
                this.DebugWhoop = true;
                return(true);
            }

            if (option == "showErrorModel")
            {
                this.ShowErrorModel = true;
                return(true);
            }

            return(base.ParseOption(option, ps));
        }