generate, kernel, gram and strcmp