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.soundness;
12:
13: import de.uka.ilkd.key.java.abstraction.ArrayOfKeYJavaType;
14: import de.uka.ilkd.key.logic.Name;
15: import de.uka.ilkd.key.logic.op.NonRigidFunction;
16: import de.uka.ilkd.key.logic.sort.ArrayOfSort;
17: import de.uka.ilkd.key.logic.sort.Sort;
18:
19: public class SVSkolemFunction extends NonRigidFunction implements
20: StateDependingObject {
21:
22: private ArrayOfKeYJavaType influencingPVTypes;
23:
24: public SVSkolemFunction(Name name, Sort sort, ArrayOfSort argSorts,
25: ArrayOfKeYJavaType influencingPVTypes) {
26: super (name, sort, effectiveArgs(argSorts, influencingPVTypes));
27: this .influencingPVTypes = influencingPVTypes;
28: }
29:
30: public ArrayOfKeYJavaType getInfluencingPVTypes() {
31: return influencingPVTypes;
32: }
33:
34: private static ArrayOfSort effectiveArgs(ArrayOfSort argSorts,
35: ArrayOfKeYJavaType influencingPVTypes) {
36: Sort[] res = new Sort[argSorts.size()
37: + influencingPVTypes.size()];
38:
39: int j;
40: for (j = 0; j != argSorts.size(); ++j)
41: res[j] = argSorts.getSort(j);
42:
43: int i;
44: for (i = 0; i != influencingPVTypes.size(); ++i, ++j)
45: res[j] = influencingPVTypes.getKeYJavaType(i).getSort();
46:
47: return new ArrayOfSort(res);
48: }
49: }
|