Results 1  10
of
117
Efficient Static Analysis of XML Paths and Types
, 2008
"... We present an algorithm to solve XPath decision problems under regular tree type constraints and show its use to statically typecheck XPath queries. To this end, we prove the decidability of a logic with converse for finite ordered trees whose time complexity is a simple exponential of the size of ..."
Abstract

Cited by 94 (50 self)
 Add to MetaCart
We present an algorithm to solve XPath decision problems under regular tree type constraints and show its use to statically typecheck XPath queries. To this end, we prove the decidability of a logic with converse for finite ordered trees whose time complexity is a simple exponential of the size of a formula. The logic corresponds to the alternation free modal µcalculus without greatest fixpoint, restricted to finite trees, and where formulas are cyclefree. Our proof method is based on two auxiliary results. First, XML regular tree types and XPath expressions have a linear translation to cyclefree formulas. Second, the least and greatest fixpoints are equivalent for finite trees, hence the logic is closed under negation. Building on these results, we describe a practical, effective system for solving the satisfiability of a formula. The system has been experimented with some decision problems such as XPath emptiness, containment, overlap, and coverage, with or without type constraints. The benefit of the approach is that our system can be effectively used in static analyzers for programming languages
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 90 (22 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...
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 82 (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
TypeIndexed Data Types
 SCIENCE OF COMPUTER PROGRAMMING
, 2004
"... A polytypic function is a function that can be instantiated on many data types to obtain data type specific functionality. Examples of polytypic functions are the functions that can be derived in Haskell, such as show , read , and ` '. More advanced examples are functions for digital searching, ..."
Abstract

Cited by 61 (23 self)
 Add to MetaCart
A polytypic function is a function that can be instantiated on many data types to obtain data type specific functionality. Examples of polytypic functions are the functions that can be derived in Haskell, such as show , read , and ` '. More advanced examples are functions for digital searching, pattern matching, unification, rewriting, and structure editing. For each of these problems, we not only have to define polytypic functionality, but also a typeindexed data type: a data type that is constructed in a generic way from an argument data type. For example, in the case of digital searching we have to define a search tree type by induction on the structure of the type of search keys. This paper shows how to define typeindexed data types, discusses several examples of typeindexed data types, and shows how to specialize typeindexed data types. The approach has been implemented in Generic Haskell, a generic programming extension of the functional language Haskell.
Datatypegeneric programming
 Spring School on DatatypeGeneric Programming, volume 4719 of Lecture Notes in Computer Science
"... Abstract. Generic programming aims to increase the flexibility of programming languages, by expanding the possibilities for parametrization — ideally, without also expanding the possibilities for uncaught errors. The term means different things to different people: parametric polymorphism, data abst ..."
Abstract

Cited by 52 (12 self)
 Add to MetaCart
Abstract. Generic programming aims to increase the flexibility of programming languages, by expanding the possibilities for parametrization — ideally, without also expanding the possibilities for uncaught errors. The term means different things to different people: parametric polymorphism, data abstraction, metaprogramming, and so on. We use it to mean polytypism, that is, parametrization by the shape of data structures rather than their contents. To avoid confusion with other uses, we have coined the qualified term datatypegeneric programming for this purpose. In these lecture notes, we expand on the definition of datatypegeneric programming, and present some examples of datatypegeneric programs. We also explore the connection with design patterns in objectoriented programming; in particular, we argue that certain design patterns are just higherorder datatypegeneric programs. 1
The derivative of a regular type is its type of onehole contexts (extended abstract), 2001. Unpublished manuscript, available via http://strictlypositive.org/diff.pdf. Conor McBride and Ross Paterson. Applicative programming with effects
"... Polymorphic regular types are treelike datatypes generated by polynomial type expressions over a set of free variables and closed under least fixed point. The ‘equality types ’ of Core ML can be expressed in this form. Given such a type expression with free, this paper shows a way to represent the ..."
Abstract

Cited by 42 (8 self)
 Add to MetaCart
Polymorphic regular types are treelike datatypes generated by polynomial type expressions over a set of free variables and closed under least fixed point. The ‘equality types ’ of Core ML can be expressed in this form. Given such a type expression with free, this paper shows a way to represent the onehole contexts for elements of within elements of, together with an operation which will plug an element of into the hole of such a context. Onehole contexts are given as inhabitants of a regular type, computed generically from the syntactic structure of by a mechanism better known as partial differentiation. The relevant notion of containment is shown to be appropriately characterized in terms of derivatives and plugging in. The technology is then exploited to give the onehole contexts for subelements of recursive types in a manner similar to Huet’s ‘zippers’[Hue97]. 1
Indexed Containers
"... Abstract. The search for an expressive calculus of datatypes in which canonical algorithms can be easily written and proven correct has proved to be an enduring challenge to the theoretical computer science community. Approaches such as polynomial types, strictly positive types and inductive types h ..."
Abstract

Cited by 37 (5 self)
 Add to MetaCart
(Show Context)
Abstract. The search for an expressive calculus of datatypes in which canonical algorithms can be easily written and proven correct has proved to be an enduring challenge to the theoretical computer science community. Approaches such as polynomial types, strictly positive types and inductive types have all met with some success but they tend not to cover important examples such as types with variable binding, types with constraints, nested types, dependent types etc. In order to compute with such types, we generalise from the traditional treatment of types as free standing entities to families of types which have some form of indexing. The hallmark of such indexed types is that one must usually compute not with an individual type in the family, but rather with the whole family simultaneously. We implement this simple idea by generalising our previous work on containers to what we call indexed containers and show that they cover a number of sophisticated datatypes and, indeed, other computationally interesting structures such as the refinement calculus and interaction structures. Finally, and rather surprisingly, the extra structure inherent in indexed containers simplifies the theory of containers and thereby allows for a much richer and more expressive calculus. 1
Generic Haskell: applications
 In Generic Programming, Advanced Lectures, volume 2793 of LNCS
, 2003
"... Generic Haskell is an extension of Haskell that supports the construction of generic programs. These lecture notes discuss three advanced generic programming applications: generic dictionaries, compressing XML documents, and the zipper: a data structure used to represent a tree together with a s ..."
Abstract

Cited by 31 (15 self)
 Add to MetaCart
(Show Context)
Generic Haskell is an extension of Haskell that supports the construction of generic programs. These lecture notes discuss three advanced generic programming applications: generic dictionaries, compressing XML documents, and the zipper: a data structure used to represent a tree together with a subtree that is the focus of attention, where that focus may move left, right, up or down the tree. When describing and implementing these examples, we will encounter some advanced features of Generic Haskell, such as typeindexed data types, dependencies between and generic abstractions of generic functions, adjusting a generic function using a default case, and generic functions with a special case for a particular constructor.