Abstract. One of the maincharacteristics of logical reasoning in knowledge based systems is its high computational complexity. Anytime deduction and anytime compilation are two attractive approaches that have been proposed for addressing such a di culty. The rst one o ers a compromise between the time complexity needed to compute approximate answers and the quality of these answers. The second one proposes a trade-o between the space complexity of the compiled knowledge base and the number of possible answers that can be e ciently processed by this data structure. The purpose of this paper is to de ne a logic which handles these two approaches by incorporating several major features. First, the logic is semantically founded on the notion of resource which determines both the accuracy and the cost of approximation. Second, a stepwise procedure is included for improving approximate answers and allowing their convergence to the correct answer. Third, both sound approximations and complete...