knuth-bendix completion algorithm