Linear time and branching time semantics for recursion with merge