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.rule.encapsulation;
12:
13: class TypeSchemeEqualConstraint implements TypeSchemeConstraint {
14: private TypeSchemeTerm term1, term2;
15:
16: public TypeSchemeEqualConstraint(TypeSchemeTerm term1,
17: TypeSchemeTerm term2) {
18: this .term1 = term1;
19: this .term2 = term2;
20: }
21:
22: public boolean evaluate() {
23: return term1.evaluate().equalTo(term2.evaluate());
24: }
25:
26: public SetOfTypeSchemeVariable getFreeVars() {
27: return term1.getFreeVars().union(term2.getFreeVars());
28: }
29:
30: public String toString() {
31: return term1 + " = " + term2;
32: }
33: }
|