Formal Methods within a Totally Functional Approach to Programming (original) (raw)

Taking functional programming to its extremities in search of simplicity still requires integration with other development (e.g. formal) methods. Induction is the key to deriving and verifying functional programs, but can be simplified through packaging proofs with functions, particularly "folds", on data (structures). "Totally Functional Programming" avoids the complexities of interpretation by directly representing data (structures) as "platonic combinators" -the functions characteristic to the data. The link between the two simplifications is that platonic combinators are a kind of partially-applied fold, which means that platonic combinators inherit fold-theoretic properties, but with some apparent simplifications due to the platonic combinator representation. However, despite observable behaviour within functional programming that suggests that TFP is widely-applicable, significant work remains before TFP as such could be widely adopted.

Fundamentals, Prospects and Challenges for Totally Functional Programming Style

2014

General recursive definitions contribute to the complexity of programming. This complexity could be reduced by reliance on established, well-understood programming patterns. Catamorphism-based recursion patterns simplify programming with little practical loss in expressive capability compared to general recursion, including the capability of defining new recursion patterns. Partial application of catamorphisms, sub-catamorphic recursion patterns and methods to symbolic data allows a comprehensive replacement of symbolic data with functional, or what we describe as “zoetic”, representations that inherently adopt the benefits of catamorphism-based programming. The considerable promise of this “Totally Functional” style confronts us with some exciting technical challenges. Keywords-component; Catamorphism, Fold, Functional, Recursion.

Functional programming with bananas, lenses, envelopes and barbed wire

Lecture Notes in Computer Science, 1991

We develop a calculus for lazy functional programming based on recursion operators associated with data type definitions. For these operators we derive various algebraic laws that are useful in deriving and manipulating programs. We shall show that all example Functions in Bird and Wadler's "Introduction to Functional Programming" can be expressed using these operators.

The Beauty of Functional Code

Springer eBooks, 2013

We consider functional type assignment for the class-based objectoriented calculus Featherweight Java. We start with an intersection type assignment systems for this calculus for which types are preserved under conversion. We then define a variant for which type assignment is decidable, and define a notion of unification as well as a principal typeing algorithm. We show the expressivity of both our calculus and our type system by defining an encoding of Combinatory Logic into our calculus and showing that this encoding preserves typeability. We thus demonstrate that the great capabilities of functional types can be applied to the context of class-based object orientated programming.

Functional programming with structured graphs

2012

Abstract This paper presents a new functional programming model for graph structures called structured graphs. Structured graphs extend conventional algebraic datatypes with explicit definition and manipulation of cycles and/or sharing, and offer a practical and convenient way to program graphs in functional programming languages like Haskell. The representation of sharing and cycles (edges) employs recursive binders and uses an encoding inspired by parametric higher-order abstract syntax.

Loading...

Loading Preview

Sorry, preview is currently unavailable. You can download the paper by clicking the button above.