The Programmable Matter program at DARPA seems to be coming right along. The intent of the program is to have material that can form itself into a variety of three-dimensional objects on command. DARPA calls this idea InfoChemistry - building information directly into materials.
One approach described as "self-folding origami" created by machines that use specialized sheets of material with built-in actuators and data. These machines use cutting-edge mathematical theorems to fold themselves into virtually any three-dimensional object.
Today's generation of sf fans probably think of robots like the T-1000 series shape-shifting mimetic alloy "robots". Take a look at a rather striking video from the current Sarah Connor Chronicals.
(T-1000 series shape-shifting mimetic alloy robot)
I guess I'm hoping that DARPA's engineers will show a little restraint in their design functionality for "InfoChemistry".
There are several older examples from sf for this concept, and I can't find them. I believe one involves what amounts to a multi-tool that just looks like a bar of metal; you slap it in different ways and it reforms its shape into a variety of simple tools. Readers? It's driving me crazy.
However, what is probably the root of the idea is the "shape memory effect" seen in particular metals in the late 1930's.