Exemplo n.º 1
0
 public Frame(Frame parent, TacticFrameCtrl ctrl)
 {
     Contract.Requires <ArgumentNullException>(parent != null);
     // carry over the tactic info
     _declaredVariables = new Dictionary <string, Expression>();
     _dafnyVariables    = new Dictionary <string, VariableData>();
     _inlineTactics     = new Dictionary <string, InlineTacticBlockStmt>();
     Parent             = parent;
     FrameCtrl          = ctrl;
 }
Exemplo n.º 2
0
            /// <summary>
            /// Initialize the top level frame
            /// </summary>
            public Frame(List <Statement> body, bool ifPartial, Attributes attr, Attributes tacticDefAttrs)
            {
                Parent    = null;
                FrameCtrl = new DefaultTacticFrameCtrl();
                FrameCtrl.InitBasicFrameCtrl(body, ifPartial, attr, 1, null, tacticDefAttrs);

                _declaredVariables = new Dictionary <string, Expression>();
                _dafnyVariables    = new Dictionary <string, VariableData>();
                _inlineTactics     = new Dictionary <string, InlineTacticBlockStmt>();
            }
Exemplo n.º 3
0
        public void AddNewFrame(TacticFrameCtrl ctrl)
        {
            var parent = _scope.Peek();

            if (parent.FrameCtrl.TimeStamp != 0)
            {
                if (ctrl.TimeStamp == 0 || parent.FrameCtrl.TimeStamp < ctrl.TimeStamp)
                {
                    ctrl.TimeStamp = parent.FrameCtrl.TimeStamp;
                }
            }
            _scope.Push(new Frame(parent, ctrl));
            ResetVerifyN();
        }