示例#1
0
        public bool addAssertResult(AssertionBase assertion)
        {
            bool ret = false;
            do
            {
                if (assertion == null)
                    break;

                AssertType type = getAssertType(assertion.ToString());

                // Can not detected assert type
                if (type == AssertType.NONE)
                    break;

                int id = getLatexResultByType(type);
                // Found latex instance at id position
                if (id != -1)
                    mLatexList.RemoveAt(id);

                LatexResult lret = new LatexResult();
                lret.mType = type;
                lret.mMemo = assertion.getMems();
                lret.mTransition = assertion.getTransitions();
                lret.mState = assertion.getStates();
                lret.mTime = assertion.getTimes();
                lret.mRes = convertResultToLatex(type, assertion.getResult());

                mLatexList.Add(lret);
                ret = true;
            } while (false);

            return ret;
        }
示例#2
0
        public LatexWorker(PNExtendInfo extendInfo, string filename)
        {
            mFileName   = filename;
            mExtendInfo = extendInfo;
            //mParseRes = latexresult;

            // Init latex result
            mParseRes[0] = new LatexResult(AssertType.DEADLOCK_FREE, 0, 0, 0, 0d, "\\unk", false);
            mParseRes[1] = new LatexResult(AssertType.CONGESTION_CHANNEL, 0, 0, 0, 0d, "\\unk", false);
            mParseRes[2] = new LatexResult(AssertType.CONGESTION_SENSOR, 0, 0, 0, 0d, "\\unk", false);

            // Init folder
            try
            {
                Directory.CreateDirectory(ROOT_LATEX_PATH);
                Directory.CreateDirectory(TMP_LATEX_PATH);
                checkLatex();
            }
            catch (Exception e) { }
        }