Added function for grouping axioms in compiling knowledge-base.