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.java.expression.operator;
12:
13: import de.uka.ilkd.key.java.Expression;
14: import de.uka.ilkd.key.java.Services;
15: import de.uka.ilkd.key.java.abstraction.KeYJavaType;
16: import de.uka.ilkd.key.java.expression.Operator;
17: import de.uka.ilkd.key.java.reference.ExecutionContext;
18: import de.uka.ilkd.key.util.ExtList;
19:
20: /**
21: * Comparative operator.
22: * @author <TT>AutoDoc</TT>
23: */
24:
25: public abstract class ComparativeOperator extends Operator {
26:
27: /**
28: * Comparative operator.
29: * @param children an ExtList with all children of this node
30: * the first children in list will be the one on the left
31: * side, the second the one on the right side.
32: */
33:
34: public ComparativeOperator(ExtList children) {
35: super (children);
36: }
37:
38: public ComparativeOperator(Expression lhs, Expression rhs) {
39: super (lhs, rhs);
40: }
41:
42: /**
43: * Get arity.
44: * @return the int value.
45: */
46:
47: public int getArity() {
48: return 2;
49: }
50:
51: /**
52: * Get notation.
53: * @return the int value.
54: */
55:
56: public int getNotation() {
57: return INFIX;
58: }
59:
60: public KeYJavaType getKeYJavaType(Services services,
61: ExecutionContext ec) {
62: return getKeYJavaType(services);
63: }
64:
65: public KeYJavaType getKeYJavaType(Services services) {
66: return services.getTypeConverter().getBooleanType();
67: }
68:
69: }
|