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.op.oclop;
12:
13: import de.uka.ilkd.key.logic.Name;
14: import de.uka.ilkd.key.logic.Term;
15: import de.uka.ilkd.key.logic.sort.Sort;
16: import de.uka.ilkd.key.logic.sort.oclsort.OclSort;
17:
18: /**
19: * Represents the OCL operation: isUnique()
20: */
21: public class OclIsUnique extends OclCollOpBound {
22:
23: public OclIsUnique() {
24: super (new Name("$isUnique"), OclSort.OCLANY, OclSort.BOOLEAN);
25: }
26:
27: public Sort sort(Term[] subTerm) {
28: helpSort(subTerm);
29: return OclSort.BOOLEAN;
30: }
31:
32: public String toString() {
33: return (name() + ":" + OclSort.BOOLEAN);
34: }
35:
36: public String proofToString() {
37: String s = OclSort.BOOLEAN + " " + name();
38: s += "(" + OclSort.COLLECTION_OF_OCLANY + "," + OclSort.OCLANY;
39: s += ");\n";
40: return s;
41: }
42: }
|