Commit d91ca2a
Skip redundant check_slprop_with_core in purify_and_check_spec and bind_res_and_post_typing
In purify_and_check_spec: purify_spec already elaborates each atom via
tc_term_phase1_with_type (which includes core_check_term). The star-composition
of slprop-typed atoms is trivially slprop-typed, so the full-term
core_check_term recheck was redundant. For InsertionSort's inner while
invariant, this single call took 7.3s.
In bind_res_and_post_typing: each bind in a sequential composition called
check_slprop_with_core on the accumulated postcondition. With N statements,
the same growing post was kernel-checked N times (O(n^2) behavior). The
postcondition type was already verified when the sub-computation was checked.
For InsertionSort, 18 expensive calls totaled ~4.1s.
Combined savings: ~11.2s (core_check_term: 11.6s -> 0.44s, 96% reduction)
Total InsertionSort verification time: 43.4s -> 19.5s (55% speedup)
Also adds PULSE_PROFILE_CORE env var for optional per-call timing profiling
of core_check_term in Pulse_RuntimeUtils.ml.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent 605f4cf commit d91ca2a
4 files changed
Lines changed: 62 additions & 14 deletions
File tree
- pulse
- src
- checker
- ml
- test/bug-reports
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
423 | 423 | | |
424 | 424 | | |
425 | 425 | | |
426 | | - | |
427 | | - | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
428 | 429 | | |
429 | | - | |
430 | 430 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
299 | 299 | | |
300 | 300 | | |
301 | 301 | | |
302 | | - | |
303 | | - | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
304 | 306 | | |
305 | 307 | | |
306 | 308 | | |
307 | 309 | | |
308 | 310 | | |
309 | | - | |
310 | | - | |
311 | | - | |
312 | | - | |
313 | | - | |
314 | | - | |
315 | | - | |
| 311 | + | |
316 | 312 | | |
317 | 313 | | |
318 | 314 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
272 | 272 | | |
273 | 273 | | |
274 | 274 | | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
275 | 327 | | |
276 | 328 | | |
277 | 329 | | |
| |||
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
7 | | - | |
| 6 | + | |
| 7 | + | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| |||
0 commit comments