Development of a knowledge-based system for heavy vehicle legality and stability