Results 11 - 20
of
22
Partial computations in constructive type theory
- JOURNAL OF LOGIC AND COMPUTATION
, 1991
"... Constructive type theory as conceived by Per Martin-Löf has a very rich type system, but partial functions cannot be typed. This also makes it impossible to directly write recursive programs. In this paper a constructive type theory Red is defined which includes a partial type constructor A; objects ..."
Abstract
-
Cited by 7 (5 self)
- Add to MetaCart
Constructive type theory as conceived by Per Martin-Löf has a very rich type system, but partial functions cannot be typed. This also makes it impossible to directly write recursive programs. In this paper a constructive type theory Red is defined which includes a partial type constructor A; objects in the type A may diverge, but if they converge, they must be members of A. A fixed point typing principle is given to allow typing of recursive functions. The extraction paradigm of type theory, whereby programs are automatically extracted from constructive proofs, is extended to allow extraction of fixed points. There is a Scott fixed point induction principle for reasoning about these functions. Soundness of the theory is proven. Type theory becomes a more expressive programming logic as a result.
Facilitating Program Verification with Dependent Types
- In Proceedings of the International Conference on Software Engineering and Formal Methods
, 2003
"... The use of types in capturing program invariants is overwhelming in practical programming. The type systems in languages such as ML and Java scale convincingly to realistic programs but they are of relatively limited expressive power. In this paper, we show that the use of a restricted form of depen ..."
Abstract
-
Cited by 7 (1 self)
- Add to MetaCart
The use of types in capturing program invariants is overwhelming in practical programming. The type systems in languages such as ML and Java scale convincingly to realistic programs but they are of relatively limited expressive power. In this paper, we show that the use of a restricted form of dependent types can enable us to capture many more program invariants such as memory safety while retaining practical type-checking. The programmer can encode program invariants with type annotations and then verify these invariants through static type-checking. Also the type annotations can serve as informative program documentation, which are mechanically verified and can thus be fully trusted. We argue with realistic examples that this restricted form of dependent types can significantly facilitate program verification as well as program documentation.
Admissibility of Fixpoint Induction over Partial Types
- Automated deduction --- CADE-15. Lect. Notes in Comp. Sci
, 1998
"... Partial types allow the reasoning about partial functions in type theory. The partial functions of main interest are recursively computed functions, which are commonly assigned types using fixpoint induction. However, fixpoint induction is valid only on admissible types. Previous work has shown many ..."
Abstract
-
Cited by 6 (2 self)
- Add to MetaCart
Partial types allow the reasoning about partial functions in type theory. The partial functions of main interest are recursively computed functions, which are commonly assigned types using fixpoint induction. However, fixpoint induction is valid only on admissible types. Previous work has shown many types to be admissible, but has not shown any dependent products to be admissible. Disallowing recursion on dependent product types substantially reduces the expressiveness of the logic; for example, it prevents much reasoning about modules, objects and algebras. In this paper I present two new tools, predicate-admissibility and monotonicity, for showing types to be admissible. These tools show a wide class of types to be admissible; in particular, they show many dependent products to be admissible. This alleviates difficulties in applying partial types to theorem proving in practice. I also present a general least upper bound theorem for fixed points with regard to a computational approxim...
Hybrid Partial-Total Type Theory
, 1995
"... In this paper a hybrid type theory HTT is defined which combines the programming language notion of partial type with the logical notion of total type into a single theory. A new partial type constructor A is added to the type theory: objects in A may diverge, but if they converge, they must be memb ..."
Abstract
-
Cited by 5 (0 self)
- Add to MetaCart
In this paper a hybrid type theory HTT is defined which combines the programming language notion of partial type with the logical notion of total type into a single theory. A new partial type constructor A is added to the type theory: objects in A may diverge, but if they converge, they must be members of A. A fixed point typing rule is given to allow for typing of fixed points. The underlying theory is based on ideas from Feferman's Class Theory and Martin Lof's Intuitionistic Type Theory. The extraction paradigm of constructive type theory is extended to allow direct extraction of arbitrary fixed points. Important features of general programming logics such as LCF are preserved, including the typing of all partial functions, a partial ordering ! ¸ on computations, and a fixed point induction principle. The resulting theory is thus intended as a general-purpose programming logic. Rules are presented and soundness of the theory established. Keywords: Constructive Type Theory, Logics...
Programming Language Semantics in Foundational Type Theory
- In Proc. the IFIP TC2/WG2.2,2.3 International Conference on Programming Concepts and Methods (PROCOMET’98
, 1996
"... There are compelling benefits to using foundational type theory as a framework for programming language semantics. I give a semantics of an expressive programming calculus in the foundational type theory of Nuprl. Previous typetheoretic semantics have used less expressive type theories, or have sacr ..."
Abstract
-
Cited by 5 (1 self)
- Add to MetaCart
There are compelling benefits to using foundational type theory as a framework for programming language semantics. I give a semantics of an expressive programming calculus in the foundational type theory of Nuprl. Previous typetheoretic semantics have used less expressive type theories, or have sacrificed important programming constructs such as recursion and modules. The primary mechanisms of this semantics are partial types, for typing recursion, set types, for encoding power and singleton kinds, which are used for subtyping and module programming, and very dependent function types, for encoding signatures. Keywords Semantics, program verification, type theory, functional programming 1 INTRODUCTION Type theory has become a popular framework for formal reasoning in computer science and has formed the basis for a number of automated deduction systems, including Automath, Nuprl, HOL and Coq, among others. In addition to formalizing mathematics, these systems are widely used for the a...
A data type of partial recursive functions in Martin-Löf Type Theory. 35pp, submitted
, 2007
"... In this article we investigate how to represent partial-recursive functions in Martin-Löf’s type theory. Our representation will be based on the approach by Bove and Capretta, which makes use of indexed inductive-recursive definitions (IIRD). We will show how to restrict the IIRD used so that we obt ..."
Abstract
-
Cited by 1 (0 self)
- Add to MetaCart
In this article we investigate how to represent partial-recursive functions in Martin-Löf’s type theory. Our representation will be based on the approach by Bove and Capretta, which makes use of indexed inductive-recursive definitions (IIRD). We will show how to restrict the IIRD used so that we obtain directly executable partial recursive functions, Then we introduce a data type of partial recursive functions. We show how to evaluate elements of this data type inside Martin-Löf’s type theory, and that therefore the functions defined by this data type are in fact partial-recursive. The data type formulates a very general schema for defining functions recursively in dependent type theory. The initial version of this data type, for which we introduce an induction principle, needs to be expanded, in order to obtain closure under composition. We will obtain two versions of this expanded data type, and prove that they define the same set of partial-recursive functions. Both versions will be large types. Next we prove a Kleene-style normal form theorem. Using it we will show how to obtain a data type of partial recursive functions which is a small set. Finally, we show how to define self-evaluation as a partial recursive function. We obtain a correct version of this evaluation function, which not only computes recursively a result, but as well a proof that the result is correct. Keywords: Martin-Löf type theory, computability theory, recursion theory, Kleene index, Kleene brackets, Kleene’s normal form theorem, partial recursive functions, inductive-recursive definitions, indexed induction-recursion, self-evaluation. 1
ATS/LF: a type system for constructing proofs as total functional programs
, 2004
"... The development of Applied Type System (ATS) [36, 31] stems from an earlier attempt to introduce dependent types into practical programming [38, 37]. While there is already a framework Pure Type System [4] (PTS) that offers a simple and general approach to designing and formalizing type systems, ..."
Abstract
-
Cited by 1 (1 self)
- Add to MetaCart
The development of Applied Type System (ATS) [36, 31] stems from an earlier attempt to introduce dependent types into practical programming [38, 37]. While there is already a framework Pure Type System [4] (PTS) that offers a simple and general approach to designing and formalizing type systems,
Holcf = Hol + Lcf
"... HOLCF is the definitional extension of Church's Higher-Order Logic with Scott's Logic for Computable Functions that has been implemented in the theorem prover Isabelle. This results in a flexible setup for reasoning about functional programs. HOLCF supports standard domain theory (in particular fixp ..."
Abstract
- Add to MetaCart
HOLCF is the definitional extension of Church's Higher-Order Logic with Scott's Logic for Computable Functions that has been implemented in the theorem prover Isabelle. This results in a flexible setup for reasoning about functional programs. HOLCF supports standard domain theory (in particular fixpoint reasoning and recursive domain equations) but also coinductive arguments about lazy datatypes. This paper describes in detail how domain theory is embedded in HOL and presents applications from functional programming, concurrency and denotational semantics. 1 Introduction HOLCF is a logic for reasoning about functional programs. It provides arbitrary forms of recursion (via a fixpoint operator) and a package for defining datatypes. The latter caters for infinite objects, induction and coinduction. HOLCF is a synthesis of two logical systems, HOL and LCF, combining the best of both worlds. Before we go into technicalities (of which there is no shortage), we sketch the historical and log...
Type Theory for Programming Languages
, 1994
"... Types 83 9.1 Syntax : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 83 9.2 Typing Rules : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 83 9.3 Operational Semantics : : : : : : : : : : : : : : : : : : : : : : : : 84 iv 9.4 Impredicative Existentials : : : : : : : : : : : ..."
Abstract
- Add to MetaCart
Types 83 9.1 Syntax : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 83 9.2 Typing Rules : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 83 9.3 Operational Semantics : : : : : : : : : : : : : : : : : : : : : : : : 84 iv 9.4 Impredicative Existentials : : : : : : : : : : : : : : : : : : : : : : 84 9.5 Representation Independence : : : : : : : : : : : : : : : : : : : : 85 9.6 Projection Notation : : : : : : : : : : : : : : : : : : : : : : : : : 85 9.7 References : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 87 10 Modularity 88 10.1 Introduction : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 88 10.2 A Critique of Some Modularity Mechanisms : : : : : : : : : : : : 88 10.3 Basic Modules : : : : : : : : : : : : : : : : : : : : : : : : : : : : 93 10.4 Module Hierarchies : : : : : : : : : : : : : : : : : : : : : : : : : : 97 10.5 Parameterized Modules : : : : : : : : : : : : : : : : : : : : : : : 98 10.6 References : : : : : : : : : : : ...
A Type of Partial Recursive Functions
"... Abstract. Our goal is to define a type of partial recursive functions in constructive type theory. In a series of previous articles, we studied two different formulations of partial functions and general recursion. In both cases, we could obtain a type only by extending the theory with either an imp ..."
Abstract
- Add to MetaCart
Abstract. Our goal is to define a type of partial recursive functions in constructive type theory. In a series of previous articles, we studied two different formulations of partial functions and general recursion. In both cases, we could obtain a type only by extending the theory with either an impredicative universe or with coinductive definitions. Here we present a new type constructor that eludes such entities of dubious constructive credentials. We start by showing how to break down a recursive function definition into three components: the first component generates the arguments of the recursive calls, the second one evaluates them, and the last one computes the output from the results of the recursive calls. We use this dissection as the basis for the introduction rule of the new type constructor: a partial recursive function is created by giving the first and third of the above components. As in one of our previous methods, every partial recursive function is associated with an inductive domain predicate and the evaluation of the function requires a proof that the predicate holds on the input values. We give a constructive justification for the new construct by means of an interpretation from the extended type theory into the base one. This shows that the extended theory is consistent and constructive. 1

