示例#1
0
        public static bool RequiresInputObservationFile(this MChessObservationMode obsMod)
        {
            switch (obsMod)
            {
            //Only the enums equivalent to the ObservationTestCheckingMode require an input obs file
            case MChessObservationMode.Linearizability:
            case MChessObservationMode.LinearizabilityNotBlock:
            case MChessObservationMode.SequentialConsistency:
            case MChessObservationMode.SequentialConsistencyNotBlock:
                return(true);

            default:
                return(false);
            }
        }
示例#2
0
        /// <summary>
        /// Returns the option value for the "/observationmode:[value]" commandline option.
        /// </summary>
        /// <returns></returns>
        public static string ToCommandLineOptionValue(this MChessObservationMode obsMode)
        {
            switch (obsMode)
            {
            case MChessObservationMode.SerialInterleavings: return("serial");

            case MChessObservationMode.CoarseInterleavings: return("coarse");

            case MChessObservationMode.AllInterleavings: return("all");

            case MChessObservationMode.Linearizability: return("lin_s");

            case MChessObservationMode.LinearizabilityNotBlock: return("lin");

            case MChessObservationMode.SequentialConsistency: return("SC_s");

            case MChessObservationMode.SequentialConsistencyNotBlock: return("SC");

            default:
                throw new NotImplementedException("The MChessObservationMode is not implemented: ");
            }
        }