Results 1  10
of
161
Regular Expression Types for XML
, 2003
"... We propose regular expression types as a foundation for statically typed XML processing languages. Regular expression types, like most schema languages for XML, introduce regular expression notations such as repetition (*), alternation (), etc., to describe XML documents. The novelty of our type sy ..."
Abstract

Cited by 177 (20 self)
 Add to MetaCart
We propose regular expression types as a foundation for statically typed XML processing languages. Regular expression types, like most schema languages for XML, introduce regular expression notations such as repetition (*), alternation (), etc., to describe XML documents. The novelty of our type system is a semantic presentation of subtyping, as inclusion between the sets of documents denoted by two types. We give several examples illustrating the usefulness of this form of subtyping in XML processing. The decision problem for the subtype relation reduces to the inclusion problem between tree automata, which is known to be exptimecomplete. To avoid this high complexity in typical cases, we develop a practical algorithm that, unlike classical algorithms based on determinization of tree automata, checks the inclusion relation by a topdown traversal of the original type expressions. The main advantage of this algorithm is that it can exploit the property that type expressions being compared often share portions of their representations. Our algorithm is a variant of Aiken and Murphy’s setinclusion constraint solver, to which are added several new implementation techniques, correctness proofs, and preliminary performance measurements on some small programs in the domain of typed XML processing.
Simple unificationbased type inference for GADTs
, 2006
"... Generalized algebraic data types (GADTs), sometimes known as “guarded recursive data types ” or “firstclass phantom types”, are a simple but powerful generalization of the data types of Haskell and ML. Recent works have given compelling examples of the utility of GADTs, although type inference is k ..."
Abstract

Cited by 157 (35 self)
 Add to MetaCart
Generalized algebraic data types (GADTs), sometimes known as “guarded recursive data types ” or “firstclass phantom types”, are a simple but powerful generalization of the data types of Haskell and ML. Recent works have given compelling examples of the utility of GADTs, although type inference is known to be difficult. Our contribution is to show how to exploit programmersupplied type annotations to make the type inference task almost embarrassingly easy. Our main technical innovation is wobbly types, which express in a declarative way the uncertainty caused by the incremental nature of typical typeinference algorithms.
A New Approach to Generic Functional Programming
 In The 27th Annual ACM SIGPLANSIGACT Symposium on Principles of Programming Languages
, 1999
"... This paper describes a new approach to generic functional programming, which allows us to define functions generically for all datatypes expressible in Haskell. A generic function is one that is defined by induction on the structure of types. Typical examples include pretty printers, parsers, and co ..."
Abstract

Cited by 95 (13 self)
 Add to MetaCart
This paper describes a new approach to generic functional programming, which allows us to define functions generically for all datatypes expressible in Haskell. A generic function is one that is defined by induction on the structure of types. Typical examples include pretty printers, parsers, and comparison functions. The advanced type system of Haskell presents a real challenge: datatypes may be parameterized not only by types but also by type constructors, type definitions may involve mutual recursion, and recursive calls of type constructors can be arbitrarily nested. We show that despite this complexitya generic function is uniquely defined by giving cases for primitive types and type constructors (such as disjoint unions and cartesian products). Given this information a generic function can be specialized to arbitrary Haskell datatypes. The key idea of the approach is to model types by terms of the simply typed calculus augmented by a family of recursion operators. While co...
Grammatical Framework: A TypeTheoretical Grammar Formalism
, 2003
"... Grammatical Framework (GF) is a specialpurpose functional language for defining grammars. It uses a Logical Framework (LF) for a description of abstract syntax, and adds to this a notation for defining concrete syntax. GF grammars themselves are purely declarative, but can be used both for lineariz ..."
Abstract

Cited by 72 (19 self)
 Add to MetaCart
Grammatical Framework (GF) is a specialpurpose functional language for defining grammars. It uses a Logical Framework (LF) for a description of abstract syntax, and adds to this a notation for defining concrete syntax. GF grammars themselves are purely declarative, but can be used both for linearizing syntax trees and parsing strings. GF can describe both formal and natural languages. The key notion of this description is a grammatical object, which is not just a string, but a record that contains all information on inflection and inherent grammatical features such as number and gender in natural languages, or precedence in formal languages. Grammatical objects have a type system, which helps to eliminate runtime errors in language processing. In the same way as an LF, GF uses...
Accomplishments and Research Challenges in MetaProgramming
 In 2nd Int. Workshop on Semantics, Applications, and Implementation of Program Generation, LNCS 2196
, 2000
"... this paper into several sections. As an overview, in Section 2, I try and classify metaprograms into groups. The purpose of this is to provide a common vocabulary which we can use to describe metaprogramming systems in the rest of the paper ..."
Abstract

Cited by 71 (7 self)
 Add to MetaCart
this paper into several sections. As an overview, in Section 2, I try and classify metaprograms into groups. The purpose of this is to provide a common vocabulary which we can use to describe metaprogramming systems in the rest of the paper
Dependently Typed Functional Programs and their Proofs
, 1999
"... Research in dependent type theories [ML71a] has, in the past, concentrated on its use in the presentation of theorems and theoremproving. This thesis is concerned mainly with the exploitation of the computational aspects of type theory for programming, in a context where the properties of programs ..."
Abstract

Cited by 70 (13 self)
 Add to MetaCart
Research in dependent type theories [ML71a] has, in the past, concentrated on its use in the presentation of theorems and theoremproving. This thesis is concerned mainly with the exploitation of the computational aspects of type theory for programming, in a context where the properties of programs may readily be specified and established. In particular, it develops technology for programming with dependent inductive families of datatypes and proving those programs correct. It demonstrates the considerable advantage to be gained by indexing data structures with pertinent characteristic information whose soundness is ensured by typechecking, rather than human effort. Type theory traditionally presents safe and terminating computation on inductive datatypes by means of elimination rules which serve as induction principles and, via their associated reduction behaviour, recursion operators [Dyb91]. In the programming language arena, these appear somewhat cumbersome and give rise to unappealing code, complicated by the inevitable interaction between case analysis on dependent types and equational reasoning on their indices which must appear explicitly in the terms. Thierry Coquand’s proposal [Coq92] to equip type theory directly with the kind of
Generic Haskell: practice and theory
 In Generic Programming, Advanced Lectures, volume 2793 of LNCS
, 2003
"... Abstract. Generic Haskell is an extension of Haskell that supports the construction of generic programs. These lecture notes describe the basic constructs of Generic Haskell and highlight the underlying theory. Generic programming aims at making programming more effective by making it more general. ..."
Abstract

Cited by 65 (23 self)
 Add to MetaCart
Abstract. Generic Haskell is an extension of Haskell that supports the construction of generic programs. These lecture notes describe the basic constructs of Generic Haskell and highlight the underlying theory. Generic programming aims at making programming more effective by making it more general. Generic programs often embody nontraditional kinds of polymorphism. Generic Haskell is an extension of Haskell [38] that supports the construction of generic programs. Generic Haskell adds to Haskell the notion of structural polymorphism, the ability to define a function (or a type) by induction on the structure of types. Such a function is generic in the sense that it works not only for a specific type but for a whole class of types. Typical examples include equality, parsing and pretty printing, serialising, ordering, hashing, and so on. The lecture notes on Generic Haskell are organized into two parts. This first part motivates the need for genericity, describes the basic constructs of Generic Haskell, puts Generic Haskell into perspective, and highlights the underlying theory. The second part entitled “Generic Haskell: applications ” delves deeper into the language discussing three nontrivial applications of Generic Haskell: generic dictionaries, compressing XML documents, and a generic version of the zipper data type. The first part is organized as follows. Section 1 provides some background discussing type systems in general and the type system of Haskell in particular. Furthermore, it motivates the basic constructs of Generic Haskell. Section 2 takes a closer look at generic definitions and shows how to define some popular generic functions. Section 3 highlights the theory underlying Generic Haskell and discusses its implementation. Section 4 concludes. 1
An Effective Theory of Type Refinements
, 2002
"... We develop an explicit two level system that allows programmers to reason about the behavior of effectful programs. The first level is an ordinary MLstyle type system, which confers standard properties on program behavior. The second level is a conservative extension of the first that uses a logic ..."
Abstract

Cited by 62 (5 self)
 Add to MetaCart
We develop an explicit two level system that allows programmers to reason about the behavior of effectful programs. The first level is an ordinary MLstyle type system, which confers standard properties on program behavior. The second level is a conservative extension of the first that uses a logic of type refinements to check more precise properties of program behavior. Our logic is a fragment of intuitionistic linear logic, which gives programmers the ability to reason locally about changes of program state. We provide a generic resource semantics for our logic as well as a sound, decidable, syntactic refinementchecking system. We also prove that refinements give rise to an optimization principle for programs. Finally, we illustrate the power of our system through a number of examples.
Dependent types for lowlevel programming
 In European Symposium on Programming
, 2007
"... Abstract. In this paper, we describe the key principles of a dependent type system for lowlevel imperative languages. The major contributions of this work are (1) a sound type system that combines dependent types and mutation for variables and for heapallocated structures in a more flexible way th ..."
Abstract

Cited by 59 (13 self)
 Add to MetaCart
Abstract. In this paper, we describe the key principles of a dependent type system for lowlevel imperative languages. The major contributions of this work are (1) a sound type system that combines dependent types and mutation for variables and for heapallocated structures in a more flexible way than before and (2) a technique for automatically inferring dependent types for local variables. We have applied these general principles to design Deputy, a dependent type system for C that allows the user to describe bounded pointers and tagged unions. Deputy has been used to annotate and check a number of realworld C programs. 1
A theory of overloading
 ACM Transactions on Programming Languages and Systems (TOPLAS
, 2002
"... Abstract We introduce a novel approach for debugging illtyped programs in the Hindley/Milner system. We map the typing problem for a program to a system of constraints each attached to program code that generates the constraints. We use reasoning about constraint satisfiability and implication to f ..."
Abstract

Cited by 53 (18 self)
 Add to MetaCart
Abstract We introduce a novel approach for debugging illtyped programs in the Hindley/Milner system. We map the typing problem for a program to a system of constraints each attached to program code that generates the constraints. We use reasoning about constraint satisfiability and implication to find minimal justifications of type errors, and to explain unexpected types that arise. Through an interactive process akin to declarative debugging, a user can track down exactly where a type error occurs. We are able to capture various extensions of the Hindley/Milner system such as type annotations and Haskellstyle type class overloading. The approach has been implemented as part of the Chameleon system.