Seol mar théacs é seo: Datalog rewriting techniques for non-Horn ontologies