## Formal Methods within A Totally Functional Approach to Programming”, to appear

Venue: | Formal Methods at the Crossroads: from Panacea to Foundational Support”, Proc. 10th Anniversary Colloquium of UNU/IIST, the International Institute for Software Technology of The United Nations |

Citations: | 2 - 2 self |

### BibTeX

@INPROCEEDINGS{Bailes_formalmethods,

author = {Paul A. Bailes and Colin J. M. Kemp},

title = {Formal Methods within A Totally Functional Approach to Programming”, to appear},

booktitle = {Formal Methods at the Crossroads: from Panacea to Foundational Support”, Proc. 10th Anniversary Colloquium of UNU/IIST, the International Institute for Software Technology of The United Nations},

year = {},

pages = {18--21}

}

### OpenURL

### Abstract

Abstract. 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 foldtheoretic 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. 1 Programming is Too Hard There can be little doubt that “programming ” (both as metaphor for and essence of the

### Citations

1119 |
The Lambda Calculus: Its Syntax and Semantics
- BARENDREGT
- 1984
(Show Context)
Citation Context ... characteristic applicative behaviour that is animated from the data. The simplest of these functional representations unsurprisingly correspond to those invented for Church’s untyped lambda-calculus =-=[6]-=-, where the unavailability of data necessitates such representations. “Church booleans”. Rather than interpreting symbols “True” and “False”, the computation inherent in Boolean values may be defined ... |

940 | A theory of type polymorphism in programming
- Milner
- 1978
(Show Context)
Citation Context ...d (i.e. types for TFP) or because they indicate the greater potential of TFP in a wider context of computer science and related fields. 7.1 Types for TFP The inadequacy of Hindley-Milner-based typing =-=[11]-=- (as implemented in current functional languages, e.g. Haskell) for TFP is apparent: for example, reconsider operations on Church numerals add m n = m succ n mul m n = m (add n) zero The complementary... |

477 |
Reverse engineering and design recovery: A taxonomy
- Chikofsky, Cross
- 1990
(Show Context)
Citation Context ...re system to be disguised in varying degrees in the data, while the program is correspondingly more or less generic. This poses dual problems in a software reverse engineering/design recovery context =-=[21]-=-, where (i) the data-disguised design needs to be uncovered, and (ii) it’s essential that the recovered design itself retain no data-disguised design information. The more a software system depends up... |

443 |
Can programming be liberated from the von Neumann style? a functional style and its algebra of programs
- Backus
- 1978
(Show Context)
Citation Context ... is no loss, especially as compilers can still be programmed; • the appearance at least of data is retained (in contradistinction to TFP). We might also recall that Backus’ seminal Turing Award paper =-=[17]-=- promoted a language that eschewed programmer-defined recursion/iteration, relying instead upon a fixed set of specific iterators (including a version of fold).sThe import of these observations is tha... |

398 |
LCF considered as a programming language
- Plotkin
- 1977
(Show Context)
Citation Context ...of new syntax with new semantics is provided by a local replacement rule, such as macro expansion or identifier declaration. Thus, language extension should be carried out on an expressively-complete =-=[20]-=- base language, in which all conceivable semantic entities can be expressed/defined directly without interpretation of symbolic representations. Reverting to programming as language extension, it foll... |

143 |
Miranda: a non-strict functional language with polymorphic types
- Turner
- 1985
(Show Context)
Citation Context ...ajor claims for functional programming is that the paradigm (strictly its pure applicative superset) supports formal methods in a more accessible, simple way than compared with imperative programming =-=[1, 2]-=-. Referential transparency permits equational reasoning on the texts of programs, using in which programmerdefined functions are accommodated naturally. Program branching is reflected by case analysis... |

112 | A fold for all seasons
- Sheard, Fegaras
- 1993
(Show Context)
Citation Context ...c Combinators PPCs emerge exactly as partial applications of folds to data, which enables very simple formal derivations. 4.1 Generalising “fold” Analogies to “fold” exist for all “regular” datatypes =-=[10]-=-, as do corresponding analogies for laws such as fusion. Consider an ADT T with constructors C1 … Cn where each Ci has arity m and the jth operand is of type Tj (without loss of generality, this also ... |

71 |
Three approaches to type structure
- Reynolds
- 1985
(Show Context)
Citation Context ...e is scope for this to be automated). Second (and arguably preferably in that it lets us express what we want!), is to adopt a more powerful type system. Second-order polymorphic typed-lambdacalculus =-=[12]-=- is much more expressive, and seems to be able to type the above “erroneous” application, but has the drawback of not enjoying the convenience of type inference, unlike Hindley-Milner. A compromise by... |

60 | A tutorial on the universality and expressiveness of fold
- Hutton
- 1999
(Show Context)
Citation Context ...oofs of list-processing functions need not depend upon induction, but rather depend upon (ultimately inductively-defined) laws about “fold”. Universal property of fold. The universal property of fold =-=[5]-=- is that G = fold F V iff G [ ] = V and G (X : Xs) = F X (G Xs) This property follows from the definition of “fold”, and can be used in proofs about functions defined using “fold” without recourse to ... |

47 | First-class polymorphism with type inference
- Jones
- 1997
(Show Context)
Citation Context ...“erroneous” application, but has the drawback of not enjoying the convenience of type inference, unlike Hindley-Milner. A compromise by which polymorphic values are represented as datatype components =-=[13]-=- allows for a combination of greater typeexpressiveness and effective type inference. However, this representation conflicts with the anti-interpretational goal of TFP. Clearly, more research is neede... |

43 | Elementary Strong Functional Programming
- Turner
- 1995
(Show Context)
Citation Context ...nt. Besides, there has been a long history of other research-cum-speculation about the theory and pragmatics of “subrecursive” programming [15]. Of most apparent relevance to TFP is Turner’s proposal =-=[16]-=- for “elementary strong functional programming”, which restricts functional programming to total functions. Turner’s approach has the following salient points: • the simplicity of equational reasoning... |

16 |
Advanced functional programming
- Hughes
- 2005
(Show Context)
Citation Context ...ajor claims for functional programming is that the paradigm (strictly its pure applicative superset) supports formal methods in a more accessible, simple way than compared with imperative programming =-=[1, 2]-=-. Referential transparency permits equational reasoning on the texts of programs, using in which programmerdefined functions are accommodated naturally. Program branching is reflected by case analysis... |

12 |
The Essence of Functional
- Wadler
- 1992
(Show Context)
Citation Context ...ods, is met by exploiting the technique of “fusion”, which takes it place in the formal methods landscape of functional programming as follows. 2.1 Recursion and induction For example (following Bird =-=[3]-=-), given the definition of a function to reverse a list 1 (equations numbered for reference) 1. reverse [ ] = [ ] 2. reverse (x:xs) = reverse xs ++ [x] we prove that “reverse (reverse Xs) = Xs” for al... |

11 |
Parsing Using Combinators
- Hutton
- 1998
(Show Context)
Citation Context ...text-free compositions of concatenation and alternation by higher-order functions that operate on parsers tosproduce “larger” parsers. The independent existence of such so-called “combinator” parsers =-=[8]-=- seems to provide powerful independent support for TFP. Exact real arithmetic. Boehm & Cartwright [9] identify a class of impure platonic combinators for exact real arithmetic. Basically, a real numbe... |

5 |
The Programmer as Language Designer (Towards a Unified Theory of Programming and Language Design
- Bailes
(Show Context)
Citation Context ... development. It’s demonstrable that programming is a language design/extension activity: pragmatically, standard criteria for program quality assessment parallel those for assessing language designs =-=[18]-=-; formally, a straightforward reordering of the parameters to the denotational semantic meaning function exposes declarations as explicit language-extending constructs [19]. At the same time however, ... |

3 | A Formal Basis for the Perception of Programming as a Language Design Activity
- Bailes, Chorvat, et al.
- 1994
(Show Context)
Citation Context ... assessing language designs [18]; formally, a straightforward reordering of the parameters to the denotational semantic meaning function exposes declarations as explicit language-extending constructs =-=[19]-=-. At the same time however, language design/extension is a programming activity, and language extension should eschew undesirable programming practices. We consider that recourse to writing an interpr... |

1 |
Exact Real Arithmetic: Formulating
- Boehm, Cartwright
- 1990
(Show Context)
Citation Context ...sers tosproduce “larger” parsers. The independent existence of such so-called “combinator” parsers [8] seems to provide powerful independent support for TFP. Exact real arithmetic. Boehm & Cartwright =-=[9]-=- identify a class of impure platonic combinators for exact real arithmetic. Basically, a real number is represented by a function which computes a real to any required rational precision. Programmed g... |