Commit 51a8ba2
committed
mcsat: trace dropped atoms in preprocessor_build_tuple_model
preprocessor_build_tuple_model has three paths along which a
tuple-blasted atom can quietly fail to appear in the reconstructed
model:
1. one of the blasted leaf variables has no value in the trail,
2. the function-type merge in merge_blasted_function_value returns
null_value for one of several structural reasons (leaf value is
neither a function nor an update object, a map's arity does not
match the flattened domain, or a sub-call to build_value_from_flat
could not rebuild a codomain / domain / default value),
3. the non-function tuple merge in build_value_from_flat itself
returns null_value.
Under the previous code each of these branches just `continue`'d or
returned null_value and the caller conditionally invoked
model_map_term only on success. A user inspecting (show-model) would
see the atom missing with no signal anywhere as to why.
Emit a short line under the existing "mcsat::preprocess" trace tag at
each drop site:
- the leaf-missing case in preprocessor_build_tuple_model names the
atom and the leaf index that is unassigned;
- merge_blasted_function_value records a short reason string at each
of its five `goto done` exits (via a local fail_reason variable
set immediately before the jump), and emits it from the single
cleanup label; the caller then adds the concrete atom term;
- the tuple (non-function) branch in preprocessor_build_tuple_model
names the atom and notes that the leaves did not decompose.
trace_enabled is a no-op in NDEBUG, so release builds pay nothing at
runtime. mcsat_trace_printf and trace_term_ln are already used from
this file under the same tag, so no new headers or dependencies.
No semantic change to the rebuilt model; the 31 api tests and the 8
tuple .ys regressions still pass in debug, sanitize, and release.1 parent a349e1f commit 51a8ba2
1 file changed
Lines changed: 39 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2422 | 2422 | | |
2423 | 2423 | | |
2424 | 2424 | | |
| 2425 | + | |
| 2426 | + | |
| 2427 | + | |
| 2428 | + | |
| 2429 | + | |
2425 | 2430 | | |
2426 | 2431 | | |
2427 | 2432 | | |
| |||
2446 | 2451 | | |
2447 | 2452 | | |
2448 | 2453 | | |
| 2454 | + | |
2449 | 2455 | | |
2450 | 2456 | | |
2451 | 2457 | | |
| |||
2456 | 2462 | | |
2457 | 2463 | | |
2458 | 2464 | | |
| 2465 | + | |
2459 | 2466 | | |
2460 | 2467 | | |
2461 | 2468 | | |
| |||
2471 | 2478 | | |
2472 | 2479 | | |
2473 | 2480 | | |
| 2481 | + | |
2474 | 2482 | | |
2475 | 2483 | | |
2476 | 2484 | | |
| |||
2491 | 2499 | | |
2492 | 2500 | | |
2493 | 2501 | | |
| 2502 | + | |
2494 | 2503 | | |
2495 | 2504 | | |
2496 | 2505 | | |
| |||
2499 | 2508 | | |
2500 | 2509 | | |
2501 | 2510 | | |
| 2511 | + | |
2502 | 2512 | | |
2503 | 2513 | | |
2504 | 2514 | | |
| |||
2510 | 2520 | | |
2511 | 2521 | | |
2512 | 2522 | | |
| 2523 | + | |
2513 | 2524 | | |
2514 | 2525 | | |
2515 | 2526 | | |
2516 | 2527 | | |
2517 | 2528 | | |
2518 | 2529 | | |
| 2530 | + | |
| 2531 | + | |
| 2532 | + | |
| 2533 | + | |
2519 | 2534 | | |
2520 | 2535 | | |
2521 | 2536 | | |
| |||
2567 | 2582 | | |
2568 | 2583 | | |
2569 | 2584 | | |
| 2585 | + | |
| 2586 | + | |
| 2587 | + | |
| 2588 | + | |
| 2589 | + | |
| 2590 | + | |
| 2591 | + | |
| 2592 | + | |
| 2593 | + | |
| 2594 | + | |
| 2595 | + | |
| 2596 | + | |
2570 | 2597 | | |
2571 | 2598 | | |
2572 | 2599 | | |
| |||
2575 | 2602 | | |
2576 | 2603 | | |
2577 | 2604 | | |
| 2605 | + | |
| 2606 | + | |
| 2607 | + | |
| 2608 | + | |
| 2609 | + | |
| 2610 | + | |
2578 | 2611 | | |
2579 | 2612 | | |
2580 | 2613 | | |
2581 | 2614 | | |
2582 | 2615 | | |
2583 | 2616 | | |
| 2617 | + | |
| 2618 | + | |
| 2619 | + | |
| 2620 | + | |
| 2621 | + | |
| 2622 | + | |
2584 | 2623 | | |
2585 | 2624 | | |
2586 | 2625 | | |
| |||
0 commit comments