Fast and loose reasoning is morally correct

@inproceedings{Danielsson2006FastAL,
  title={Fast and loose reasoning is morally correct},
  author={Nils Anders Danielsson and John Hughes and Patrik Jansson and Jeremy Gibbons},
  booktitle={POPL '06},
  year={2006}
}
Functional programmers often reason about programs as if they were written in a total language, expecting the results to carry over to non-total (partial) languages. We justify such reasoning.Two languages are defined, one total and one partial, with identical syntax. The semantics of the partial language includes partial and infinite values, and all types are lifted, including the function spaces. A partial equivalence relation (PER) is then defined, the domain of which is the total subset of… 

Figures from this paper

Bidirectionalization for free! (Pearl)
TLDR
The idea is to take a general-purpose language, Haskell, and write a higher-order function that takes (polymorphic) get-functions as arguments and returns appropriate put-Functions, inspired by relational parametricity and uses free theorems for proving the consistency conditions.
Reasoning about functional programs : Sparkle, a proof assistant for Clean
TLDR
A simple prototype of a dedicated theorem prover for the functional language Clean is described and an examination is made of the work that needs to be done to extend the prototype to a fully operational and truly useful programming tool.
Reasoning about Functional Programs
TLDR
This chapter presents a method to verify programs called Structural induction, which can be applied to functional programs giving rise to rigorous correctness proofs.
Modularity and Implementation of Mathematical Operational Semantics
Proving lazy folklore with mixed lazy/strict semantics
TLDR
This paper employs a model for formal reasoning with enforced strictness based on John Launchbury’s lazy graph semantics, and formally proves some “folklore” properties that are often used in informal reasoning by programmers.
Types and verification for infinite state systems
TLDR
This work introduces a type theory which can be used to type-check a polymorphic functional programming language similar to a fragment of the Haskell programming language, and shows that using program transformation techniques, one can restructure some programs which are not provably productive in the authors' type theory into programsWhich are manifestly productive.
Logical Relations for PCF
TLDR
It is shown that the Y combinator coincides with the domaintheoretic fixpoint operator, that parallel-or and the Plotkin existential are not definable in PCF, that the continuation semantics for PCF coincides withThe direct semantics, and that the domain- theoretic semantics forPCF is adequate for reasoning about contextual equivalence in an operational semantics.
Unified Classical Logic Completeness - A Coinductive Pearl
TLDR
A classical result is revisited: the completeness theorem for first-order logic established through a Gentzen system, which establishes an abstract property of possibly infinite derivation trees, independently of the concrete syntax or inference rules.
Recovering purity with comonads and capabilities
TLDR
This model formalises the intuition common to systems programmers that the ability to perform effects should be controlled via access to a permission or capability, and that a program is capability-safe if it performs no effects that it does not have a runtime capability for.
...
...

References

SHOWING 1-10 OF 41 REFERENCES
Chasing Bottoms: A Case Study in Program Verification in the Presence of Partial and Infinite Values
TLDR
This work describes a method for testing properties of programs in the presence of partial and infinite values and proves that the programs they have written are in fact (more or less) inverses using first fixpoint induction and then the approximation lemma.
Free theorems in the presence of seq
TLDR
This work provides a parametricity theorem for the subset of Haskell corresponding to a Girard-Reynolds-style calculus with fixpoints, algebraic datatypes, and seq, and uses an asymmetric logical relation to lead to "inequational" versions of free theorems enriched by preconditions guaranteeing their validity in the described setting.
Program Calculation Properties of Continuous Algebras
Defining data types as initial algebras, or dually as final co-algebras, is beneficial, if not indispensible, for an algebraic calculus for program construction, in view of the nice equational
Program Verification in a Logical Theory of Constructions
  • P. Dybjer
  • Computer Science, Philosophy
    FPCA
  • 1985
The logical theory of constructions is a simple theory which combines functional programs and intuitionistic predicate calculus. Here we propose that it is a practical alternative to other
Recursive models for constructive set theories
Elementary Strong Functional Programming
TLDR
This work proposes an elementary discipline of strong functional programming, in which all computations terminate, and introduces a type distinction between data, known to be finite, and codata, which is potentially infinite.
CPO's do not form a CPO, and yet Recursion Works
TLDR
The paper concentrates on the method which was used implicitly in the studies of the domain universes underlying MetaSoft, and BSI/VDM, and its use in the area of the denotational semantics of programming languages.
Metasoft Primer: Towards a Metalanguage for Applied Denotational Semantics
TLDR
When you read more every page of this metasoft primer towards a metalanguage for applied denotational semantics lecture notes in computer science volume 288, what you will obtain is something great.
An Intensional Characterization of the Largest Bisimulation
...
...