This is an idea to reduce Zucchini patch size.
*** Background ***
Zucchini-gen:
- Makes {"old" target list} from "old".
- Computes {estimated "new" target list} := forward_project({"old" target list}) [uses equivalence map].
- Makes {"new" target list} from "new".
- Computes {extra targets} := {"new" target list} - {estimated "new" target list}.
- Saves {extra targets} in the patch.
Zucchini-apply:
- Makes {"old" target list} from "old".
- Computes {estimated "new" target list} := forward_project({"old" target list}) [uses equivalence map from patch].
- Reads {extra targets} from the patch.
- Computes {reconstructed "new" target list} :=
set_union({estimated "new" target list}, {extra targets }).
- Uses {reconstructed "new" target list} to translate "new" keys into "new" targets.
*** Idea ***
{reconstructed "new" target list} is a superset of {"new" target list}, and is used by Zucchini-apply for reference estimation and correction. However, covered "new" locations undergo references est. & corr.; non-covered "new" locations are written using the INSERT operation from Layer 1 patching. Therefore {extra targets} can have useless elements. We can remove these by modifying Zucchini-gen so it:
- (First 3 operations)
- Makes {trimmed "new" target list} := trim({"new" target list}).
- Computes {extra targets} := {trimmed "new" target list} - {estimated "new" target list}.
- Saves {extra targets} in the patch.
Here, trim() uses the equivalence map and removes all "new" targets that appear only once, and is uncovered.