With all due respect, the criteria for what is a separate language and what is a simply a dialect are not purely linguistic but more political and social anyway. As soon as a dialect becomes codified as the standard language of a politically defined society, it becomes a language. On the other hand, as long as a dialect, no matter what a deviation from the norm it is, has no standardized written norm, it does not gain the status "language". Example: the Swiss German dialect(s), would certainly qualify to be a language considering what a deviation from German it is, more akin to Dutch than to High German. Why is it not a language? Because it has no standard form, not written form, except phonetically as a joke in private. Young people write SMS and e-mails in Swiss German to each other, but that is pretty much all. We speak in Swiss German (dialect) but we write in High German (language) with a norm. There have been considerations to codify some Standard Swiss German, but then debates arise as to which dialect to take as the basis. There are big differences along the continuum too.With all due respect, Catalan is a dialect, either of Langue d'Oc or of Spanish.
There's pretty little linguistic that is properly Catalan, it all is part of the southern Romance language continuum.
Not to mention the codification of languages for purely political reasons, such as Moldavian, which is for all practical purposes pure Romanian.