38,380 research outputs found

    A Refinement Calculus for Logic Programs

    Get PDF
    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.Comment: 36 pages, 3 figures. To be published in Theory and Practice of Logic Programming (TPLP

    A Declarative Semantics for Logic Program Refinement

    Get PDF
    The refinement calculus provides a framework for the stepwise development of imperative programs from specifications. This paper presents a semantics for 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 specifications constructs (general predicates and assumptions) and universal quantification. A semantics is defined for this wide-spectrum language based on {\em executions}, which are partial functions from states to states, where a state is represented as a set of bindings. This execution 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 a refinement law for introducing recursive procedures is presented

    A refinement calculus for expressions

    Get PDF
    This thesis describes a calculus intended for the refinement of expressions, in particular the calculus provides a framework for the formal derivation of executable expressions from initial specifications. The approach taken follows and extends the work of Back, Morris and Morgan on the refinement calculus for imperative style programs. We contribute to the area by providing a refinement calculus of expressions with a simple semantics and support for the formulation and development of specifications in parts. We take the view that a refinement calculus consists of: a specification language, which usually includes constructs which are non-executable, but is a "super-language" of a programming language; a refinement relation between specifications, which possesses particular properties necessary for the refinement of specifications in a stepwise and piecewise manner; and a set of laws determining how such refinements may proceed. We describe a simple functional language of expressions which includes features for undefinedness, non-determinism and partiality. The added constructs allow the easy formulation of expressive and abstract specifications, giving maximum freedom to the implementor. The issue of methods to structure large specifications is addressed through the concept of partiality. We provide support for the construction of specifications in parts, together with operations to compose partial specifications to form the whole. We also consider how the state and exception monads, used to hide imperative features in pure functional programs, might be used similarly to structure specifications. A refinement relation between specifications is defined. A set of laws suitable for the manipulation and refinement of expressions is proposed. The expression language is given a simple denotational semantics, using powerdomain structures to capture non-determinism. This semantics allows the easy and intuitive formal definition of refinement, using the Smyth ordering for powerdomains, and facilitates the construction of the proofs of the proposed laws for the calculus

    A reification calculus for model-oriented software specification

    Get PDF
    This paper presents a transformational approach to the derivation of implementations from model-oriented specifications of abstract data types. The purpose of this research is to reduce the number of formal proofs required in model refinement, which hinder software development. It is shown to be appli- cable to the transformation of models written in Meta-iv (the specification lan- guage of Vdm) towards their refinement into, for example, Pascal or relational DBMSs. The approach includes the automatic synthesis of retrieve functions between models, and data-type invariants. The underlying algebraic semantics is the so-called final semantics “`a la Wand”: a specification “is” a model (heterogeneous algebra) which is the final ob ject (up to isomorphism) in the category of all its implementations. The transformational calculus approached in this paper follows from exploring the properties of finite, recursively defined sets. This work extends the well-known strategy of program transformation to model transformation, adding to previous work on a transformational style for operation- decomposition in META-IV. The model-calculus is also useful for improving model-oriented specifications.(undefined

    A coinductive semantics of the Unlimited Register Machine

    Get PDF
    We exploit (co)inductive specifications and proofs to approach the evaluation of low-level programs for the Unlimited Register Machine (URM) within the Coq system, a proof assistant based on the Calculus of (Co)Inductive Constructions type theory. Our formalization allows us to certify the implementation of partial functions, thus it can be regarded as a first step towards the development of a workbench for the formal analysis and verification of both converging and diverging computations

    Composing features by managing inconsistent requirements

    Get PDF
    One approach to system development is to decompose the requirements into features and specify the individual features before composing them. A major limitation of deferring feature composition is that inconsistency between the solutions to individual features may not be uncovered early in the development, leading to unwanted feature interactions. Syntactic inconsistencies arising from the way software artefacts are described can be addressed by the use of explicit, shared, domain knowledge. However, behavioural inconsistencies are more challenging: they may occur within the requirements associated with two or more features as well as at the level of individual features. Whilst approaches exist that address behavioural inconsistencies at design time, these are overrestrictive in ruling out all possible conflicts and may weaken the requirements further than is desirable. In this paper, we present a lightweight approach to dealing with behavioural inconsistencies at run-time. Requirement Composition operators are introduced that specify a run-time prioritisation to be used on occurrence of a feature interaction. This prioritisation can be static or dynamic. Dynamic prioritisation favours some requirement according to some run-time criterion, for example, the extent to which it is already generating behaviour
    • …
    corecore