We propose a denotational semantics for logic programming based on a classical notion of logical consequence which is apt to capture the main proposed semantics of logic programs. In other words, we show that any of those semantics can be viewed as a relation of the form T |= X where T is a theory which naturally represents the logic program under consideration together with a set of formulas playing the role of "hypotheses", in a way which is dictated by that semantics, |= is a notion of logical consequence which is classical because negation, disjunction and existential quantification receive their classical meaning, and X represents what can be inferred from the logic program, or an intended interpretation of that logic program (such as an answer-set, its well-founded model, etc.). The logical setting we propose extends the language of classical modal logic as it deals with modal operators indexed by ordinals. We make use of two kinds of basic modal formulas: 2 α ϕ which intuitively means that the logical program can generate ϕ by stage α of the generation process, and 3 α 2 β ϕ with α > β, which intuitively means that ϕ can be used as a hypothesis from stage β of the generation process onwards, possibly expecting to confirm ϕ by stage α (so expecting 2 α ϕ to be generated). This allows us to capture Rondogiannis and Wadge's version of the well-founded semantics [27] where a member of the well-founded model is a closed atom which receives an ordinal truth value of true α or false α for some ordinal α: in our framework, this corresponds to having T |= 2 α ϕ or T |= 2 α ¬ϕ, respectively, with T being the natural representation of the logic program under consideration and the right set of "hypotheses" as dictated by the well-founded semantics. The framework we present goes much beyond the proposed traditional semantics for logic programming, as it can for instance let us investigate under which conditions a set of hypotheses can be minimal, with each hypothesis being activated as late as possible and confirmed as soon as possible, setting the theoretical foundation to sophisticated ways of making local use of hypotheses in knowledge-based systems, while still being theoretically grounded in a classical notion of logical consequence.