{"id":"cs/0202002","title":"A Refinement Calculus for Logic Programs","authors":["Ian Hayes","Robert Colvin","David Hemer","Paul Strooper","Ray Nickson"],"categories":["cs.SE","cs.LO"],"primary_category":"cs.SE","first_posted":"2002-02-04","updated":"2002-02-04","url":"https://arxiv.vip/abs/cs/0202002","arxiv_url":"https://arxiv.org/abs/cs/0202002","pdf_url":"https://arxiv.org/pdf/cs/0202002","comment_count":0,"abstract":"Existing refinement calculi provide frameworks for the stepwise development of imperative programs from specifications. This paper presents a refinement calculus for deriving logic programs. The calculus contains a wide-spectrum logic programming language, including executable constructs such as sequential conjunction, disjunction, and existential quantification, as well as specification constructs such as general predicates, assumptions and universal quantification. A declarative semantics is defined for this wide-spectrum language based on executions. Executions are partial functions from states to states, where a state is represented as a set of bindings. The semantics is used to define the meaning of programs and specifications, including parameters and recursion. To complete the calculus, a notion of correctness-preserving refinement over programs in the wide-spectrum language is defined and refinement laws for developing programs are introduced. The refinement calculus is illustrated using example derivations and prototype tool support is discussed.","arxiv_comments":"36 pages, 3 figures. To be published in Theory and Practice of Logic Programming (TPLP)","journal_ref":null,"doi":null,"license":null,"versions":1,"discussion_url":"https://arxiv.vip/abs/cs/0202002#discussion"}