Logical Decision Problems and Complexity of Logic Programs