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: package de.uka.ilkd.key.strategy.feature;
11:
12: import de.uka.ilkd.key.logic.PosInOccurrence;
13: import de.uka.ilkd.key.logic.Term;
14: import de.uka.ilkd.key.strategy.RuleAppCost;
15:
16: /**
17: * Binary feature that returns zero iff the find-formula of a rule contains a
18: * d-path consisting only of positive literals (as a formula of the antecedent).
19: * Used terminology is defined in Diss. by Martin Giese.
20: */
21: public class PurePosDPathFeature extends AbstractBetaFeature {
22:
23: public final static Feature INSTANCE = new PurePosDPathFeature();
24:
25: private PurePosDPathFeature() {
26: }
27:
28: protected RuleAppCost doComputation(PosInOccurrence pos,
29: Term findTerm) {
30: return hasPurePosPath(findTerm, !pos.isInAntec()) ? BinaryFeature.ZERO_COST
31: : BinaryFeature.TOP_COST;
32: }
33:
34: }
|