Hypothetical reasoning about actions is the activity of preevaluating
the effect of performing actions in a changing domain; this reasoning
underlies applications of knowledge representation, such as planning a
nd explanation generation. Action effects are often specified in the l
anguage of situation calculus, introduced by McCarthy and Hayes in 196
9. More recently, the event calculus has been defined to describe actu
al actions, i.e., those that have occurred in the past, and their effe
cts on the domain. Altough the two formalisms share the basic ontology
of atomic actions and fluents, situation calculus cannot represent ac
tual actions while event calculus cannot represent hypotethical action
s. In this article, the language and the axioms of event calculus are
extended to allow representing and reasoning about hypothetical action
s, performed either at the present time or in the past, altough counte
rfactuals are not supported. Both event calculus and its extension are
defined as logic programs so that theories are readily adaptable for
Prolog query interpretation. For a reasonably large class of theories
and queries, Prolog interpretation is shown to be sound and complete w
.r.t. the main semantics for logic programs.