A framework for Logic Programming, Knowledge Representation and Abductive Reasoning