Commit 4ae26f4
Native bytecode interception working end-to-end with Vitruvius
Use DUP+void-record approach instead of replacing comparison instructions:
- DUP2 before IF_ICMP* to duplicate operands
- DUP + ICONST_0 before IFEQ/IFLT/etc. for single-operand comparisons
- Call recordIcmp(int,int,String)V to observe without changing behavior
- Original comparison instruction executes unchanged
This preserves the exact stack layout, so stack map frames remain valid
and no frame recomputation (COMPUTE_FRAMES/getCommonSuperClass) is needed.
Results: 5 paths explored with native interception enabled. 256-273 raw
constraints collected per iteration. Constraint filtering needs tuning
(too many framework comparisons captured alongside the target threshold
comparisons).
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent c1ad7ba commit 4ae26f4
2 files changed
Lines changed: 76 additions & 50 deletions
File tree
- galette-agent/src/main/java/edu/neu/ccs/prl/galette
- interception
- internal/agent
Lines changed: 42 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
20 | | - | |
21 | | - | |
| 19 | + | |
22 | 20 | | |
23 | 21 | | |
24 | 22 | | |
| |||
106 | 104 | | |
107 | 105 | | |
108 | 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 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
109 | 148 | | |
110 | | - | |
111 | | - | |
112 | 149 | | |
113 | 150 | | |
114 | 151 | | |
| |||
Lines changed: 34 additions & 45 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
93 | 93 | | |
94 | 94 | | |
95 | 95 | | |
| 96 | + | |
| 97 | + | |
96 | 98 | | |
97 | | - | |
98 | | - | |
99 | | - | |
100 | | - | |
101 | | - | |
102 | | - | |
103 | | - | |
104 | | - | |
| 99 | + | |
105 | 100 | | |
106 | | - | |
107 | | - | |
108 | | - | |
109 | | - | |
110 | | - | |
111 | | - | |
| 101 | + | |
112 | 102 | | |
113 | | - | |
114 | 103 | | |
115 | 104 | | |
116 | 105 | | |
| |||
138 | 127 | | |
139 | 128 | | |
140 | 129 | | |
141 | | - | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
142 | 135 | | |
143 | 136 | | |
144 | 137 | | |
145 | 138 | | |
146 | 139 | | |
147 | 140 | | |
148 | | - | |
149 | | - | |
150 | | - | |
151 | | - | |
152 | | - | |
153 | | - | |
154 | | - | |
155 | | - | |
156 | | - | |
157 | | - | |
158 | | - | |
159 | | - | |
160 | | - | |
161 | | - | |
162 | | - | |
163 | | - | |
164 | | - | |
165 | | - | |
166 | | - | |
167 | | - | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
168 | 144 | | |
169 | 145 | | |
170 | 146 | | |
| |||
176 | 152 | | |
177 | 153 | | |
178 | 154 | | |
| 155 | + | |
| 156 | + | |
179 | 157 | | |
180 | 158 | | |
181 | | - | |
182 | | - | |
183 | | - | |
184 | | - | |
185 | | - | |
186 | | - | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
187 | 175 | | |
188 | | - | |
189 | | - | |
190 | | - | |
191 | 176 | | |
192 | 177 | | |
193 | 178 | | |
194 | 179 | | |
195 | 180 | | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
196 | 185 | | |
197 | 186 | | |
198 | 187 | | |
| |||
0 commit comments