My question is based on Science article about ship worms. According to article ship worms are in clam family.
ship worms do not digest the wood. If I remember correctly, they bore into it with their shell. They do not eat it.
I have never heard of any animal that can digest cement. Most mollusks that have shells gets the raw materials (like calcium) in a dissolved state in the water. If you would put a clam in pure water without these dissolved minerals they could not make their shell. And very few animals can digest cellulose because they do not have enzymes that can break the bonds between glucose units in cellulose. Certain bacteria can produce such enzymes and therefore they can digest cellulose or wood. Such bacteria can be found in the digestive system of termites. They digest the wood for the termites. I imagine some similar situation exists in ship worms.