01: // This file is part of KeY - Integrated Deductive Software Design
02: // Copyright (C) 2001-2007 Universitaet Karlsruhe, Germany
03: // Universitaet Koblenz-Landau, Germany
04: // Chalmers University of Technology, Sweden
05: //
06: // The KeY system is protected by the GNU General Public License.
07: // See LICENSE.TXT for details.
08: package de.uka.ilkd.key.proof.init;
09:
10: import java.util.HashMap;
11:
12: import de.uka.ilkd.key.gui.Main;
13: import de.uka.ilkd.key.gui.configuration.ChoiceSettings;
14: import de.uka.ilkd.key.gui.configuration.ProofSettings;
15: import de.uka.ilkd.key.logic.Name;
16: import de.uka.ilkd.key.proof.BalancedGoalChooserBuilder;
17: import de.uka.ilkd.key.proof.DefaultGoalChooserBuilder;
18: import de.uka.ilkd.key.proof.SetAsListOfGoalChooserBuilder;
19: import de.uka.ilkd.key.rule.UseMethodContractRule;
20: import de.uka.ilkd.key.strategy.DebuggerStrategy;
21: import de.uka.ilkd.key.strategy.SetOfStrategyFactory;
22: import de.uka.ilkd.key.strategy.StrategyFactory;
23: import de.uka.ilkd.key.unittest.UseMethodContractRuleForTestGen;
24:
25: public class DebuggerProfile extends JavaProfile {
26:
27: private final static StrategyFactory DEFAULT = new DebuggerStrategy.Factory();
28:
29: public DebuggerProfile(Main main) {
30: super ("standardRules-debugger.key",//TODO
31: SetAsListOfGoalChooserBuilder.EMPTY_SET.add(
32: new DefaultGoalChooserBuilder()).add(
33: new BalancedGoalChooserBuilder()), main);
34: }
35:
36: protected SetOfStrategyFactory getStrategyFactories() {
37: return super .getStrategyFactories().add(DEFAULT);
38: }
39:
40: protected UseMethodContractRule getContractRule() {
41: return UseMethodContractRuleForTestGen.INSTANCE;
42: }
43:
44: public String name() {
45: return "Debugger Profile";
46: }
47:
48: public StrategyFactory getDefaultStrategyFactory() {
49: return DEFAULT;
50: }
51:
52: public void updateSettings(ProofSettings settings) {
53: ChoiceSettings cs = settings.getChoiceSettings();
54: HashMap dcs = cs.getDefaultChoices();
55: dcs.put("testGeneration", "testGeneration:testOn");
56: cs.setDefaultChoices(dcs);
57: settings.getStrategySettings().setStrategy(
58: new Name("DebuggerStrategy"));
59: }
60:
61: }
|