3,815 research outputs found
Recursive Definitions of Monadic Functions
Using standard domain-theoretic fixed-points, we present an approach for
defining recursive functions that are formulated in monadic style. The method
works both in the simple option monad and the state-exception monad of
Isabelle/HOL's imperative programming extension, which results in a convenient
definition principle for imperative programs, which were previously hard to
define.
For such monadic functions, the recursion equation can always be derived
without preconditions, even if the function is partial. The construction is
easy to automate, and convenient induction principles can be derived
automatically.Comment: In Proceedings PAR 2010, arXiv:1012.455
A Refinement Calculus for Logic Programs
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
Refinement with Time - Refining the Run-Time of Algorithms in Isabelle/HOL
Separation Logic with Time Credits is a well established method to formally verify the correctness and run-time of algorithms, which has been applied to various medium-sized use-cases. Refinement is a technique in program verification that makes software projects of larger scale manageable.
Combining these two techniques for the first time, we present a methodology for verifying the functional correctness and the run-time analysis of algorithms in a modular way. We use it to verify Kruskal\u27s minimum spanning tree algorithm and the Edmonds - Karp algorithm for network flow.
An adaptation of the Isabelle Refinement Framework [Lammich and Tuerk, 2012] enables us to specify the functional result and the run-time behaviour of abstract algorithms which can be refined to more concrete algorithms. From these, executable imperative code can be synthesized by an extension of the Sepref tool [Lammich, 2015], preserving correctness and the run-time bounds of the abstract algorithm
- …