コード例 #1
0
ファイル: ErrHandler.cs プロジェクト: ggrov/dafny
        public void ClearErrMsg()
        {
            if (Reporter.Count(ErrorLevel.Error) != 0)
            {
                Reporter = new ConsoleErrorReporter();
            }

            if (ErrorList != null && ErrorList.Count > 0)
            {
                ErrorList = null;
            }
        }
コード例 #2
0
        /// <summary>
        /// Invokes Dany resolver.
        /// This will find semantic errors.
        /// </summary>
        private bool Resolve()
        {
            var resolver = new Microsoft.Dafny.Resolver(_dafnyProgram);

            resolver.ResolveProgram(_dafnyProgram);

            bool success = _reporter.Count(ErrorLevel.Error) == 0;

            if (success)
            {
                _status = TranslationStatus.Resolved;
            }
            return(success);
        }