They cannot be legally divorced in my opinion.If they were then Dev would know about Sonakshi's pregnancy .The fact that they are still sleeping on the same bed infront of their family confirms this .
But they are mentally divorced..they don't want to stay together and consider eaach other as bitter past .They don't see a need to get legally divorced unless they wanna remarry ...the court will easily grant divorce if they apply as they are separated for 7long yrs ...this is the reason their families are suggesting second marriage