示例#1
0
        public static void PrepareFrame(BlockStmt body, ProofState state)
        {
            Contract.Requires <ArgumentNullException>(body != null, "body");
            Contract.Requires <ArgumentNullException>(state != null, "state");
            state.AddNewFrame(body);
            // call the search engine
            var search = new BaseSearchStrategy(state.TacticInfo.SearchStrategy, true);

            search.Search(state, _errorReporterDelegate);
            state.RemoveFrame();
        }
示例#2
0
        public static ProofState ApplyTactic(ProofState state, Dictionary <IVariable, Type> variables,
                                             UpdateStmt tacticApplication)
        {
            Contract.Requires <ArgumentNullException>(tcce.NonNull(variables));
            Contract.Requires <ArgumentNullException>(tcce.NonNull(tacticApplication));
            Contract.Requires <ArgumentNullException>(state != null, "state");
            state.InitState(tacticApplication, variables);
            var search = new BaseSearchStrategy(state.TacticInfo.SearchStrategy, true);

            return(search.Search(state, _errorReporterDelegate).FirstOrDefault());
        }
示例#3
0
        public static IEnumerable <ProofState> ApplyNestedTactic(ProofState state, Dictionary <IVariable, Type> variables,
                                                                 UpdateStmt tacticApplication)
        {
            Contract.Requires <ArgumentNullException>(tcce.NonNull(variables));
            Contract.Requires <ArgumentNullException>(tcce.NonNull(tacticApplication));
            Contract.Requires <ArgumentNullException>(state != null, "state");
            state.InitState(tacticApplication, variables);
            var search = new BaseSearchStrategy(state.TacticInfo.SearchStrategy, false);

            foreach (var result in search.Search(state, _errorReporterDelegate))
            {
                var c = state.Copy();
                c.AddStatementRange(result.GetGeneratedCode());
                yield return(c);
            }
        }
示例#4
0
 public static void PrepareFrame(BlockStmt body, ProofState state) {
   Contract.Requires<ArgumentNullException>(body != null, "body");
   Contract.Requires<ArgumentNullException>(state != null, "state");
   state.AddNewFrame(body);
   // call the search engine
   var search = new BaseSearchStrategy(state.TacticInfo.SearchStrategy, true);
   search.Search(state, _errorReporterDelegate);
   state.RemoveFrame();
 }
示例#5
0
 public static IEnumerable<ProofState> ApplyNestedTactic(ProofState state, Dictionary<IVariable, Type> variables,
   UpdateStmt tacticApplication) {
   Contract.Requires<ArgumentNullException>(tcce.NonNull(variables));
   Contract.Requires<ArgumentNullException>(tcce.NonNull(tacticApplication));
   Contract.Requires<ArgumentNullException>(state != null, "state");
   state.InitState(tacticApplication, variables);
   var search = new BaseSearchStrategy(state.TacticInfo.SearchStrategy, false);
   foreach (var result in search.Search(state, _errorReporterDelegate)) {
     var c = state.Copy();
     c.AddStatementRange(result.GetGeneratedCode());
     yield return c;
   }
 }
示例#6
0
 public static ProofState ApplyTactic(ProofState state, Dictionary<IVariable, Type> variables,
   UpdateStmt tacticApplication) {
   Contract.Requires<ArgumentNullException>(tcce.NonNull(variables));
   Contract.Requires<ArgumentNullException>(tcce.NonNull(tacticApplication));
   Contract.Requires<ArgumentNullException>(state != null, "state");
   state.InitState(tacticApplication, variables);
   var search = new BaseSearchStrategy(state.TacticInfo.SearchStrategy, true);
   return search.Search(state, _errorReporterDelegate).FirstOrDefault();
 }