The aim of this work is to show that the Peircean notion of abduction, even if in a limited way, can be expressed declaratively by using logic programming (suitably extended). To this extent, the concepts of surprising fact, explanation and confirmation and the dynamic view of the entire process of reasoning, are mapped in logic, and a sound and complete abductive proof procedure (called SCIFF) has been defined and implemented in order to automatically perform such a reasoning. This allows us to understand better the fundamental concepts of abductive reasoning, and to support operationally, by using SCIFF, some forms of reasoning such diagnosis, planning, specification of open artificial societies, and deontic reasoning