I think the terms, in and of themselves, are more related to caliber, because caliber defines function. Thus a G3 is a battle rifle, a HK33 is an assault rifle, an MP5 is a submachine gun or machine pistol. If you want to get into carbines, then its barrel length discussion time, which is a long winded one because old fashioned relics like me remember the good old days of 29 inch barrel musket style rifles. Back in the good old days of yore, a 22 inch barrel was a carbine. Today a modern full length battle rifle such as the M14 for example, we'll use because it's got a "long" barrel for a modern automatic at 22 inches, is now considered a full length rifle by modern standards.
To simplify this, my own person official means of definition goes to both objective barrel length as well as relative barrel length. Relative in that there is a 'standard' barrel length for the weapon, G98 is 29 thus the K98 is, yes, a carbine, even if it has a longer barrel than a standard FAL or M14. Since the gun is musket style and original was super long, the shorter version can be considered a carbine. Since the barrels have been shorted on ALL modern battle rifles for standard, modern guns can be defined differently, since 21 and 22 inch are standard for FAL and M14 respectively, they can be called rifles instead of carbines (this is controversial to traditional nomenclature, but has its reasons), we may even say that The G3 with an 18 inch barrel might suffice because it was considered a rifle and has a standard barrel length of such. For battle rifles, thus a shortened 18 inch barrel on FAL or M14 might be both called a carbine (because hits a shortened more than standard version) or someone will try to call it a rifle (if you call your G3 a rifle at 18 inches, so can I fucker), but I would lean towards calling ANY shortened barrel a carbine as standard to differentiate modern guns. In a battle rifle ANYTHING under 18 inch is automatically a carbine. If the standard longest barrel is under 16 inches, all versions are automatically carbines.
In assault rifle, The M16 did come in, and still does, with the 20 inch barrel. This is a true assault rifle in every term. But since other assault rifles, like the AK, came in at 16 inch barrel length, and other following designs have as well, perhaps we'll reduce the objective minimum to 16 inch for assault rifles. Thus, any original assault rifle with a standard barrel length ~16 inch and above is an assault rifle, anything less for a standard barrel automatically makes it a carbine in all versions. Also, one can call an 18 inch barrel AR, or 16 inch , carbines, even if they are longer than my objective standard, because they are shorter than standard. Got it?
Submachine guns, machine pistols, are self explanatory. Any pistol cartridge that is in a carbine/submachine gun like form is automatically what it is, regardless of barrel length. The only reason why machinepistol can be dropped is because fully automatic handguns aren't submachine guns, they are just machine pistols, so the dividing term makes things clearer, we'll call the pistols machine pistols and the bigger guns SMG. PCC is only used as a civilian term because of the guns that aren't legally allowed to be fully automatic, thus no SMG status, no MP status, just PCC to differentiate. Even though this also includes manually operated weapons like lever guns.
Now go forth and spread my tl;dr as standard definition.