Ok, apparently you trying to be a pain (watch out Puc you may have competition here). A foul refers to illegal personal contact or unsportsmanlike conduct on the court or sidelines of a game. Every foul violates a rule, but not every rule violation counts as a foul. Therefore, fouling at the end of a game does in fact violate the rules. I would tell you to refer to a rule book but based on what I have seen of basketball lately the rulebook apparently no longer exists.