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: //
09: //
10:
11: package de.uka.ilkd.key.strategy.feature;
12:
13: import de.uka.ilkd.key.logic.PosInOccurrence;
14: import de.uka.ilkd.key.logic.Term;
15: import de.uka.ilkd.key.strategy.LongRuleAppCost;
16: import de.uka.ilkd.key.strategy.RuleAppCost;
17:
18: /**
19: * Feature that returns the maximum number of positive literals occurring within
20: * a d-path of the find-formula as a formula of the antecedent. Used terminology
21: * is defined in Diss. by Martin Giese.
22: */
23: public class CountPosDPathFeature extends AbstractBetaFeature {
24:
25: public final static Feature INSTANCE = new CountPosDPathFeature();
26:
27: private CountPosDPathFeature() {
28: }
29:
30: protected RuleAppCost doComputation(PosInOccurrence pos,
31: Term findTerm) {
32: return LongRuleAppCost.create(maxPosPath(findTerm, !pos
33: .isInAntec()));
34: }
35:
36: }
|