Пример #1
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());
        }
Пример #2
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);
            }
        }
Пример #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 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();
 }