What happens when you melt a solid in a perfectly enclosed space? Here are the parameters:

*

*You have a perfectly airtight box made of a very resistant material.

*You have a block of a substance that melts normally (such as aluminium) that fits perfectly in the box.

Since liquids are less dense than their solid counterparts but a liquid cannot be compressed, what would happen if you were to place the solid in the box, closed it and then attempted to melt it by increasing the temperature?
I am assuming the box is strong enough to withstand the pressure, won't react with the melting cube and also won't melt itself.
 A: 
Since liquids are less dense than their solid counterparts but a liquid cannot be compressed, what would happen if you were to place the solid in the box, closed it and then attempted to melt it?

Liquids are not always less dense than their solid counterparts.
Liquids can be compressed, though it takes a lot of pressure to change their volume appreciably.

What happens when you melt a solid in a perfectly enclosed space?

It probably won't melt at the same temperature as it would if it were free to expand. However, at some temperature it will lose its solidity.
By losing its solidity, I do not mean that it will necessarily "melt" in the usual sense of the term. Above the critical temperature of a substance, there is no clear distinction between liquid and gas. The material is just said to be "fluid". Consider the material in the interior of the Sun. It is often described as a "gas", but I don't think that is quite correct. However, regardless of being held at a fixed density, at some high enough temperature a material will become "fluid".
Below is a phase diagram that has temperature and density as axes.

Credit: sklogwiki
Essentially, what has been asked is what happens to a substance when the temperature is raised, but the density stays the same. Vertical lines on the graph represent different temperatures with a constant density. As can be seen, the boundary between fluid/liquid and crystaline solid has a positive but finite slope. Although the graph does not extend vertically indefinitely, if the slope were to continue in the same direction, every constant density line would eventually intersect it.
A: It stays solid.
Simply check with the phase diagram of your solid. To melt it, you likely would increase temperature. The density should decrease, but your box doesn't expand, so the pressure increases and you remain solid:

(Following the discussion, it is fair to qualify this that it stays solid until at some point it may turn into a plasma, at some huge temperature.)
