A Theory of Formalisms for Representing Knowledge