merge-trees-hybrid-ownership-semantics

Status: IN

The merge-trees algorithm produces a hybrid ownership structure: overlapping positions get newly allocated nodes (independent of inputs), while non-overlapping subtrees are shared by reference with the original trees — the output's lifetime is entangled with both inputs, making it unsafe to mutate either input tree after merging.

Justifications

Two merge-trees beliefs jointly reveal an ownership hazard invisible at the single-belief level

Depends on (SL): merge-trees-creates-new-nodes-for-overlaps, merge-trees-shares-subtrees-for-non-overlaps

JSON