Primal Grammars Driven Automated Logic