Inferring Inheritance from Datalog Programs