DaKing that would be utterly insane, but I'm already picturing how it would be done!
W <-m%%m m%%m-> W
W --m m-- W
WMMMMMMm mMMMMMMW
W= Wall
%%=Pump
--=floor (space = open space)
M= Magma
m= magma flow
Magma gets sucked up through the pump, and out the other side, where it falls back down to the floor below joining it's magma friends. Then if a siege comes, you just turn off the power to the pumps, and the magma quickly swallows up anybody inside!
I would *HIGHLY* suggest running iron bars along the inside as well to keep idiots from getting too close to the magma walls, or you'll have flaming traders/haulers/everything else when you're not trying to use it to kill people. Also will lose a bit of magma over time from evaporation (especially each time you reset it), so you're gonna need a pipe nearby to pump fresh magma in from time to time.
This would be a wagon safe version:
W <-m%%m m%%m-> W
W --m m-- W
WMMMMMMmB BmMMMMMMW
---------------------
W= Wall
%%=Pump
--=floor (space = open space)
M= Magma
m= magma flow
B= Bars
You'd have a 3 wide gap on the bottom between the iron bars that wagons could just squeeze through. And iron bars keep any curious dwarves who stick their hands out of the wagon from getting it burned off.
The main downside to this trap is it will take a while to reset (probably a good couple of months) as once the lava is allowed to flow freely, every space in the gap will be left with a 1/7 tile of magma that will have to evaporate over time. This also means you'll lose 5 units of magma multiplied by how long you make the trap each time you use it. (which is why I suggest having the magma pipe close close by, so you can pump fresh magma in from time to time to refill your Magma supplies.)