From "Ballistics Theory and Design of Guns and Ammunition", by Donald E. Carlucci and Sidney S. Jacobson, CRC Press:
A gun can be loosely defined as a one-stroke internal combustion engine. In this case, the projectile is the piston and the propellant is the air–fuel mixture.
A definition like this could come in handy.