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: package de.uka.ilkd.key.unittest.simplify.ast;
09:
10: import de.uka.ilkd.key.java.Services;
11: import de.uka.ilkd.key.logic.*;
12: import de.uka.ilkd.key.parser.KeYParser;
13:
14: public class NumberTerm extends Term {
15:
16: private int intValue;
17:
18: public NumberTerm(int i) {
19: super ("" + i);
20: intValue = i;
21: }
22:
23: public String toSimplify() {
24: return intValue + "";
25: }
26:
27: public int getValue() {
28: return intValue;
29: }
30:
31: public de.uka.ilkd.key.logic.Term toZ(Services serv) {
32: return KeYParser.toZNotation(intValue + "", serv
33: .getNamespaces().functions(), TermFactory.DEFAULT);
34: }
35:
36: }
|