/
CasesStmOpCallExp.vdmpp.result
140 lines (96 loc) · 2.35 KB
/
CasesStmOpCallExp.vdmpp.result
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
import java.util.*;
import org.overture.codegen.runtime.*;
@SuppressWarnings("all")
public class Entry {
public static Object Run() {
Object casesExp_1 = rec();
Boolean success_1 = true;
if (casesExp_1 instanceof A) {
A recordPattern_1 = ((A) Utils.copy(casesExp_1));
Number intPattern_1 = recordPattern_1.a;
success_1 = Utils.equals(intPattern_1, 9L);
} else {
success_1 = false;
}
if (!(success_1)) {
if (casesExp_1 instanceof B) {
B recordPattern_2 = ((B) Utils.copy(casesExp_1));
success_1 = true;
Number intPattern_2 = recordPattern_2.b;
success_1 = Utils.equals(intPattern_2, 9L);
} else {
success_1 = false;
}
if (!(success_1)) {
if (casesExp_1 instanceof B) {
B recordPattern_3 = ((B) Utils.copy(casesExp_1));
success_1 = true;
Number intPattern_3 = recordPattern_3.b;
success_1 = Utils.equals(intPattern_3, 10L);
} else {
success_1 = false;
}
if (success_1) {
return 1111L;
}
} else {
return 111L;
}
} else {
return 11L;
}
return -1L;
}
public static Object rec() {
return new B(10L);
}
public Entry() {}
public String toString() {
return "Entry{}";
}
public static class A implements VDMRecord {
public Number a;
public A(final Number _a) {
a = _a;
}
public boolean equals(final Object obj) {
if (!(obj instanceof A)) {
return false;
}
A other = ((A) obj);
return Utils.equals(a, other.a);
}
public int hashCode() {
return Utils.hashCode(a);
}
public A copy() {
return new A(a);
}
public String toString() {
return "mk_Entry`A" + Utils.formatFields(a);
}
}
public static class B implements VDMRecord {
public Number b;
public B(final Number _b) {
b = _b;
}
public boolean equals(final Object obj) {
if (!(obj instanceof B)) {
return false;
}
B other = ((B) obj);
return Utils.equals(b, other.b);
}
public int hashCode() {
return Utils.hashCode(b);
}
public B copy() {
return new B(b);
}
public String toString() {
return "mk_Entry`B" + Utils.formatFields(b);
}
}
}
##########