Reseña: Logic + control: An example of program construction
Se ha publicado un trabajo sobre metodología de la programación en Prolog titulado Logic + control: An example of program construction.
Su autor es Wlodzimierz Drabent (de la Univ. de Linköping, Suecia).
El trabajo se presentará el 6 de Septiembre en el ICLP’12 (28th International Conference on Logic Programming).
Su resumen es
We present a Prolog program (the SAT solver of Howe and King) as a logic program with added control. The control consists of a selection rule (delays of Prolog) and pruning the search space. We construct the logic program together with proofs of its correctness and completeness, with respect to a formal specification. This is augmented by a proof of termination under any selection rule. Correctness and termination are inherited by the Prolog program, the change of selection rule preserves completeness. We prove that completeness is also preserved by one case of pruning; for the other an informal justification is presented.
For proving correctness we use a method, which should be well known but is often neglected. A contribution of this paper is a method for proving completeness. In particular we introduce a notion of semi-completeness, for which a local sufficient condition exists.
We compare the proof methods with declarative diagnosis (algorithmic debugging). We introduce a method of proving that a certain kind of pruning preserves completeness. We argue that the proof methods correspond to natural declarative thinking about programs, and that they can be used, formally or informally, in every-day programming.