## Reasoning About Functional Programs in Nuprl (1993)

Venue: | In Functional Programming, Concurrency, Simulation and Automated Reasoning |

Citations: | 12 - 0 self |

### BibTeX

@INPROCEEDINGS{Howe93reasoningabout,

author = {Douglas J. Howe},

title = {Reasoning About Functional Programs in Nuprl},

booktitle = {In Functional Programming, Concurrency, Simulation and Automated Reasoning},

year = {1993},

pages = {145--164},

publisher = {Springer Verlag}

}

### OpenURL

### Abstract

. There are two ways of reasoning about functional programs in the constructive type theory of the Nuprl proof development system. Nuprl can be used in a conventional program-verification mode, in which functional programs are written in a familiar style and then proven to be correct. It can also be used in an extraction mode, where programs are not written explicitly, but instead are extracted from mathematical proofs. Nuprl is the only constructive type theory to support both of these approaches. These approaches are illustrated by applying Nuprl to Boyer and Moore's "majority" algorithm. 1 Introduction A type system for a functional programming language can be syntactic or semantic. In a syntactically typed language, such as SML 1 [25], typing is a property of the syntax of expressions. Only certain combinations of language constructs are designated "well-typed", and only well-typed expressions are given a meaning. Each well-typed expression has a type which can be derive...

### Citations

1562 | The Definition of Standard ML
- Miller, Tofte, et al.
- 1990
(Show Context)
Citation Context ...ying Nuprl to Boyer and Moore's "majority" algorithm. 1 Introduction A type system for a functional programming language can be syntactic or semantic. In a syntactically typed language, such=-= as SML 1 [25], typing i-=-s a property of the syntax of expressions. Only certain combinations of language constructs are designated "well-typed", and only well-typed expressions are given a meaning. Each well-typed ... |

471 |
The calculus of constructions
- Coquand, Huet
- 1988
(Show Context)
Citation Context ...st somehow encode its own correctness proof. Two of the most well-known constructive type theories are Martin-Lof's theory [23], which we will refer to here as CMCP, and the Calculus of Constructions =-=[13]-=-. The Calculus of Constructions is syntactically typed, and CMCP, although semantic in conception, places restrictions on programs similar to those of its syntactically typed descendents (such as in [... |

265 |
Constructive mathematics and computer programming
- Martin-Löf
- 1982
(Show Context)
Citation Context ... e has type T . This is a strong requirement, and essentially means that e must somehow encode its own correctness proof. Two of the most well-known constructive type theories are Martin-Lof's theory =-=[23]-=-, which we will refer to here as CMCP, and the Calculus of Constructions [13]. The Calculus of Constructions is syntactically typed, and CMCP, although semantic in conception, places restrictions on p... |

104 |
et al.: Implementing Mathematics with the Nuprl Proof Development System
- Constable
- 1986
(Show Context)
Citation Context ...iting of mathematical text, its type theory, and its mechanism for automating formal reasoning, which is based on the tactic mechanism of the LCF system [15]. The reader is referred to the Nuprl book =-=[12]-=- for a roughly complete account of the implemented system. Modifications made to the system since the book was published are documented in a reference manual distributed with the system. Information o... |

95 | Equality in lazy computation systems
- Howe
- 1989
(Show Context)
Citation Context ... system. Information on how to obtain the system can be obtained from the author. A number of research papers related to Nuprl have been published. Some extensions to the type theory are described in =-=[1, 2, 3, 6, 10, 19, 20, 24, 26]-=-. Numerous applications of Nuprl have been made; these include [5, 8, 9, 11, 16, 17, 18, 21, 22]. In order to illustrate explicit and implicit programming in Nuprl, and to show how the system works, w... |

90 |
A language and axioms for explicit mathematics
- Feferman
- 1975
(Show Context)
Citation Context ...ed some evidence that there is no practical reason to include cumbersome constructs like primitive recursion in the underlying programming language of Nuprl's type theory. As with Feferman's theories =-=[14]-=-, there is a large degree of flexibility to reason about the computational behaviour of programs, and it seems clear that a Nuprl-like type theory could be based on just about any untyped functional p... |

88 | W.E.: The Semantics of Reflected Proof
- Allen, Constable, et al.
- 1990
(Show Context)
Citation Context ... system. Information on how to obtain the system can be obtained from the author. A number of research papers related to Nuprl have been published. Some extensions to the type theory are described in =-=[1, 2, 3, 6, 10, 19, 20, 24, 26]-=-. Numerous applications of Nuprl have been made; these include [5, 8, 9, 11, 16, 17, 18, 21, 22]. In order to illustrate explicit and implicit programming in Nuprl, and to show how the system works, w... |

69 |
Edinburgh LCF, A Mechanized Logic
- Gordon, Milner, et al.
- 1979
(Show Context)
Citation Context ...ving systems are its approach to display and editing of mathematical text, its type theory, and its mechanism for automating formal reasoning, which is based on the tactic mechanism of the LCF system =-=[15]-=-. The reader is referred to the Nuprl book [12] for a roughly complete account of the implemented system. Modifications made to the system since the book was published are documented in a reference ma... |

65 |
Recursive Definition in Type Theory
- Mendler
- 1987
(Show Context)
Citation Context ... system. Information on how to obtain the system can be obtained from the author. A number of research papers related to Nuprl have been published. Some extensions to the type theory are described in =-=[1, 2, 3, 6, 10, 19, 20, 24, 26]-=-. Numerous applications of Nuprl have been made; these include [5, 8, 9, 11, 16, 17, 18, 21, 22]. In order to illustrate explicit and implicit programming in Nuprl, and to show how the system works, w... |

55 |
A Non-Type-Theoretic Semantics for TypeTheoretic Language
- Allen
- 1987
(Show Context)
Citation Context |

49 |
An evaluation semantics for classical proofs
- Murthy
- 1991
(Show Context)
Citation Context |

34 |
Partial objects in constructive type theory
- Constable, Smith
- 1987
(Show Context)
Citation Context |

34 |
On the SUP-INF method for proving Presburger formulas
- Shostak
- 1977
(Show Context)
Citation Context ... encapsulate in a tactic the operation of performing case analyses suggested by if expressions, and the low-level inequality reasoning can be dealt with automatically by a procedure such as Shostak's =-=[28]-=-, (a Nuprl implementation of which has just been completed). * top 2 1. p: N-?Cand 2. j: int 3. 0!j 4. let !c,l? = m(p,j-1) in 8a:Cand. 2*(#(p,a,j-1)+(if a=c then 0 else l)) ! ((j-1)+l)+1 ?? let !c,l?... |

23 | A fast majority vote algorithm
- Boyer, Moore
- 1981
(Show Context)
Citation Context ...count for a candidate c is the number k of distinct j, 0sj ! i, such that p[j] = c. c has a majority if 2k ? i. The problem is to find the majority candidate if one exists. Boyer and Moore's solution =-=[7] is a very simple al-=-gorithm: step through the poll from start to end, keeping track of a single "leading" candidate c, arbitrary initially, and the size l of his "lead", 0 initially. At each step, if ... |

21 |
Programming in Martin-Lof's Type Theory, volume 7
- Nordstrom, Petersson, et al.
- 1990
(Show Context)
Citation Context ...]. The Calculus of Constructions is syntactically typed, and CMCP, although semantic in conception, places restrictions on programs similar to those of its syntactically typed descendents (such as in =-=[27]-=-). Neither of these theories permits the definition of a well-typed function by ordinary recursion. For example, encoding the function exp(x,n) = if n=0 then 1 else if even(n) then square(exp(x,n/2)) ... |

20 |
Automating Reasoning in an Implementation of Constructive Type Theory
- Howe
- 1988
(Show Context)
Citation Context ...esearch papers related to Nuprl have been published. Some extensions to the type theory are described in [1, 2, 3, 6, 10, 19, 20, 24, 26]. Numerous applications of Nuprl have been made; these include =-=[5, 8, 9, 11, 16, 17, 18, 21, 22]. In order-=- to illustrate explicit and implicit programming in Nuprl, and to show how the system works, we focus on a simple case study in which we verify Boyer and Moore's "majority" algorithm. We fir... |

18 |
Implementing metamathematics as an approach to automatic theorem proving
- Constable, Howe
- 1990
(Show Context)
Citation Context ...esearch papers related to Nuprl have been published. Some extensions to the type theory are described in [1, 2, 3, 6, 10, 19, 20, 24, 26]. Numerous applications of Nuprl have been made; these include =-=[5, 8, 9, 11, 16, 17, 18, 21, 22]. In order-=- to illustrate explicit and implicit programming in Nuprl, and to show how the system works, we focus on a simple case study in which we verify Boyer and Moore's "majority" algorithm. We fir... |

17 |
On computational open-endedness in Martin-Löf’s type theory
- Howe
- 1991
(Show Context)
Citation Context |

14 |
The computational behaviour of Girard’s paradox
- Howe
(Show Context)
Citation Context ...esearch papers related to Nuprl have been published. Some extensions to the type theory are described in [1, 2, 3, 6, 10, 19, 20, 24, 26]. Numerous applications of Nuprl have been made; these include =-=[5, 8, 9, 11, 16, 17, 18, 21, 22]. In order-=- to illustrate explicit and implicit programming in Nuprl, and to show how the system works, we focus on a simple case study in which we verify Boyer and Moore's "majority" algorithm. We fir... |

12 |
Verification of Combinational Logic in Nuprl
- Basin, Vecchio
(Show Context)
Citation Context |

12 |
Implementing constructive real analysis: a preliminary report
- Chirimar, Howe
- 1991
(Show Context)
Citation Context |

11 |
Nuprl as a general logic
- Constable, Howe
- 1990
(Show Context)
Citation Context |

9 |
A non-type theoretic definition of Martin-Lof's types
- Allen
- 1987
(Show Context)
Citation Context |

4 |
Developing a toolkit for floating-point hardware in the Nuprl proof development system
- Jackson
- 1991
(Show Context)
Citation Context |

3 | Some normalization properties of Martin-Löf’s type theory, and applications
- Basin, Howe
- 1991
(Show Context)
Citation Context |

3 |
Computational metatheory
- Howe
- 1988
(Show Context)
Citation Context |

2 |
Algorithm development in Martin-Löf’s type theory, Report (in preparation
- Backhouse
- 1984
(Show Context)
Citation Context ...up the program in Fig. 11. It seems to be unavoidable if one sticks to the subset of Nuprl similar to CMCP. For example, it is present in Backhouse's hand-crafted version of the majority algorithm in =-=[4]-=-. One way in which the uninteresting evidence can be eliminated is to use Nuprl's subtype constructor in place of the dependent Cartesian product. See the Nuprl book [12] for more on this approach. Th... |

2 | Nuprl and its use in circuit design
- Jackson
- 1992
(Show Context)
Citation Context |