text: Re-melting rock to join hot magma is little more mysterious than melting ice.  It takes energy to melt ice or rock.  If the constituents of the unspecified rock react chemically the question would be whether the specific reaction is endothermic (using energy) or exothermic (giving off energy).