A Differential Semantics for Jointree Algorithms