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.logic.sort;
12:
13: import de.uka.ilkd.key.logic.Name;
14: import de.uka.ilkd.key.logic.op.Equality;
15: import de.uka.ilkd.key.logic.op.Op;
16:
17: public class NullSortImpl extends ClassInstanceSortImpl implements
18: NullSort {
19:
20: /** creates a NullSort*/
21: public NullSortImpl(Name name) {
22: super (name, false);
23: }
24:
25: /**
26: * returns true iff the given sort is an object sort
27: */
28: public boolean extendsTrans(Sort s) {
29: return s == Sort.ANY || (s instanceof ObjectSort);
30: }
31:
32: /** @return equality symbol of this sort */
33: public Equality getEqualitySymbol() {
34: return Op.EQUALS;
35: }
36:
37: /**
38: * @return an object of this class with elementSort().equals(p),
39: * or null if such an object cannot be constructed (as p is an
40: * incompatible sort)
41: */
42: public Sort cloneFor(Sort p) {
43: return this;
44: }
45: }
|