Computation tree logics and temporal logics with reference pointers