Formal specifications have been proposed as a basis for accessing reusable components from libraries, and various fine-grained specification-matching approaches have been developed to assist in searching libraries. Typically, however, the granularity of matching has been too fine for reuse to be effective. Compounding the problem is the fact that coarse-grained items usually require adaptation before reuse. This paper explains some of the problems and presents a generic solution to a key problem: adaptation of modules through parameter instantiation and subsetting. It shows how unit-matching strategies can be lifted to module level in a generic fashion.
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.
scite is a Brooklyn-based organization that helps researchers better discover and understand research articles through Smart Citations–citations that display the context of the citation and describe whether the article provides supporting or contrasting evidence. scite is used by students and researchers from around the world and is funded in part by the National Science Foundation and the National Institute on Drug Abuse of the National Institutes of Health.