Pretty positive there are definitions for both rifle and pistol that apply to the USC at the time it is being cited in MGL.
If you really wanna be on the bleeding edge and get cute, then I’d think long and hard about what exactly the federal definitions are. Seems to me that If you had a firearm that was incontrovertibly NOT a rifle per federal definition, and also incontrovertibly NOT a pistol per federal definition, then you might have yourself something that is not subject to the AWB.
But as many have said, just because you’re right doesn’t mean the prosecutor isn’t going to ignore that version of reality and charge you with their own.