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.proof.ConstraintTableModel;
15: import de.uka.ilkd.key.proof.Goal;
16: import de.uka.ilkd.key.proof.Proof;
17: import de.uka.ilkd.key.rule.TacletApp;
18:
19: /**
20: * Feature that returns zero iff the constraint of concerned rule applications
21: * is consistent with the chosen user constraint
22: */
23: public class UCIncompatibleFeature extends BinaryTacletAppFeature {
24:
25: private final ConstraintTableModel userConstraint;
26:
27: private UCIncompatibleFeature(ConstraintTableModel userConstraint) {
28: this .userConstraint = userConstraint;
29: }
30:
31: public static Feature create(Proof proof) {
32: return new UCIncompatibleFeature(proof.getUserConstraint());
33: }
34:
35: protected boolean filter(TacletApp app, PosInOccurrence pos,
36: Goal goal) {
37: return app.constraint().join(userConstraint.getConstraint(),
38: goal.proof().getServices()).isSatisfiable();
39: }
40:
41: }
|