Results 1  10
of
26
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.
Regular expression pattern matching for XML
, 2003
"... We propose regular expression pattern matching as a core feature of programming languages for manipulating XML. We extend conventional patternmatching facilities (as in ML) with regular expression operators such as repetition (*), alternation (), etc., that can match arbitrarily long sequences of ..."
Abstract

Cited by 111 (10 self)
 Add to MetaCart
We propose regular expression pattern matching as a core feature of programming languages for manipulating XML. We extend conventional patternmatching facilities (as in ML) with regular expression operators such as repetition (*), alternation (), etc., that can match arbitrarily long sequences of subtrees, allowing a compact pattern to extract data from the middle of a complex sequence. We then show how to check standard notions of exhaustiveness and redundancy for these patterns. Regular expression patterns are intended to be used in languages with type systems based on regular expression types. To avoid excessive type annotations, we develop a type inference scheme that propagates type constraints to pattern variables from the type of input values. The type inference algorithm translates types and patterns into regular tree automata, and then works in terms of standard closure operations (union, intersection, and difference) on tree automata. The main technical challenge is dealing with the interaction of repetition and alternation patterns with the firstmatch policy, which gives rise to subtleties concerning both the termination and precision of the analysis. We address these issues by introducing a data structure representing these closure operations
Coinductive bigstep operational semantics
 In European Symposium on Programming (ESOP 2006
, 2006
"... Abstract. This paper illustrates the use of coinductive definitions and proofs in bigstep operational semantics, enabling the latter to describe diverging evaluations in addition to terminating evaluations. We show applications to proofs of type soundness and to proofs of semantic preservation for ..."
Abstract

Cited by 36 (7 self)
 Add to MetaCart
Abstract. This paper illustrates the use of coinductive definitions and proofs in bigstep operational semantics, enabling the latter to describe diverging evaluations in addition to terminating evaluations. We show applications to proofs of type soundness and to proofs of semantic preservation for compilers. 1
Semantic Types: A Fresh Look at the Ideal Model for Types
, 2004
"... We present a generalization of the ideal model for recursive polymorphic types. Types are defined as sets of terms instead of sets of elements of a semantic domain. Our proof of the existence of types (computed by fixpoint of a typing operator) does not rely on metric properties, but on the fact tha ..."
Abstract

Cited by 23 (2 self)
 Add to MetaCart
We present a generalization of the ideal model for recursive polymorphic types. Types are defined as sets of terms instead of sets of elements of a semantic domain. Our proof of the existence of types (computed by fixpoint of a typing operator) does not rely on metric properties, but on the fact that the identity is the limit of a sequence of projection terms. This establishes a connection with the work of Pitts on relational properties of domains. This also suggests that ideals are better understood as closed sets of terms defined by orthogonality with respect to a set of contexts.
TinkerType: a language for playing with formal systems
, 2003
"... TinkerType is a pragmatic framework for compact and modular description of formal systems (type systems, operational semantics, logics, etc.). A family of related systems is broken down into a set of clauses – individual inference rules – and a set of features controlling the inclusion of clauses in ..."
Abstract

Cited by 20 (0 self)
 Add to MetaCart
TinkerType is a pragmatic framework for compact and modular description of formal systems (type systems, operational semantics, logics, etc.). A family of related systems is broken down into a set of clauses – individual inference rules – and a set of features controlling the inclusion of clauses in particular systems. Simple static checks are used to help maintain consistency of the generated systems. We present TinkerType and its implementation and describe its application to two substantial repositories of typed lambdacalculi. The first repository covers a broad range of typing features, including subtyping, polymorphism, type operators and kinding, computational effects, and dependent types. It describes both declarative and algorithmic aspects of the systems, and can be used with our tool, the TinkerType Assembler,to generate calculi either in the form of typeset collections of inference rules or as executable ML typecheckers. The second repository addresses a smaller collection of systems, and provides modularized proofs of basic safety properties.
Polymorphic Regular Tree Types and Patterns
, 2006
"... We propose a type system based on regular tree grammars, where algebraic datatypes are interpreted in a structural way. Thus, the same constructors can be reused for different types and a flexible subtyping relation can be defined between types, corresponding to the inclusion of their semantics. For ..."
Abstract

Cited by 15 (1 self)
 Add to MetaCart
We propose a type system based on regular tree grammars, where algebraic datatypes are interpreted in a structural way. Thus, the same constructors can be reused for different types and a flexible subtyping relation can be defined between types, corresponding to the inclusion of their semantics. For instance, one can define a type for lists and a subtype of this type corresponding to lists of even length. Patterns are simply types annotated with binders. This provides a generalization of algebraic patterns with the ability of matching arbitrarily deep in a value. Our main contribution, compared to languages such as XDuce and CDuce, is that we are able to deal with both polymorphism and function types.
Typed Compilation of Recursive Datatypes
 In ACM SIGPLAN Workshop on Types in Language Design and Implementation (TLDI
, 2003
"... Standard ML employs an opaque (or generative) semantics of datatypes, in which every datatype declaration produces a new type that is different from any other type, including other identically defined datatypes. A natural way of accounting for this is to consider datatypes to be abstract. When this ..."
Abstract

Cited by 13 (5 self)
 Add to MetaCart
Standard ML employs an opaque (or generative) semantics of datatypes, in which every datatype declaration produces a new type that is different from any other type, including other identically defined datatypes. A natural way of accounting for this is to consider datatypes to be abstract. When this interpretation is applied to typepreserving compilation, however, it has the unfortunate consequence that datatype constructors cannot be inlined, substantially increasing the runtime cost of constructor invocation compared to a traditional compiler. In this paper we examine two approaches to eliminating function call overhead from datatype constructors. First, we consider a transparent interpretation of datatypes that does away with generativity, altering the semantics of SML; and second, we propose an interpretation of datatype constructors as coercions, which have no runtime effect or cost and faithfully implement SML semantics.
Programming With Types
 CORNELL UNIVERSITY
, 2002
"... Runtime type analysis is an increasingly important linguistic mechanism in modern programming languages. Language runtime systems use it to implement services such as accurate garbage collection, serialization, cloning and structural equality. Component frameworks rely on it to provide reflection m ..."
Abstract

Cited by 11 (1 self)
 Add to MetaCart
Runtime type analysis is an increasingly important linguistic mechanism in modern programming languages. Language runtime systems use it to implement services such as accurate garbage collection, serialization, cloning and structural equality. Component frameworks rely on it to provide reflection mechanisms so they may discover and interact with program interfaces dynamically. Runtime type analysis is also crucial for large, distributed systems that must be dynamically extended, because it allows those systems to check program invariants when new code and new forms of data are added. Finally, many generic userlevel algorithms for iteration, pattern matching, and unification can be defined through type analysis mechanisms. However, existing frameworks for runtime type analysis were designed for simple type systems. They do not scale well to the sophisticated type systems of modern and nextgeneration programming languages that include complex constructs such as firstclass abstract types, recursive types, objects, and type parameterization. In addition, facilities to support type analysis often require complicated
Numbering matters: Firstorder canonical forms for secondorder recursive types
 In Proceedings of the 2004 ACM SIGPLAN International Conference on Functional Programming (ICFP’04
, 2004
"... We study a type system equipped with universal types and equirecursive types, which we refer to as Fµ. We show that type equality may be decided in time O(n log n), an improvement over the previous known bound of O(n 2). In fact, we show that two more general problems, namely entailment of type equa ..."
Abstract

Cited by 11 (1 self)
 Add to MetaCart
We study a type system equipped with universal types and equirecursive types, which we refer to as Fµ. We show that type equality may be decided in time O(n log n), an improvement over the previous known bound of O(n 2). In fact, we show that two more general problems, namely entailment of type equations and type unification, may be decided in time O(n log n), a new result. To achieve this bound, we associate, with every Fµ type, a firstorder canonical form, which may be computed in time O(n log n). By exploiting this notion, we reduce all three problems to equality and unification of firstorder recursive terms, for which efficient algorithms are known. 1
Subtyping Recursive Types modulo Associative Commutative Products
 Seventh International Conference on Typed Lambda Calculi and Applications (TLCA ’05
, 2003
"... We study subtyping of recursive types in the presence of associative and commutative productsthat is, subtyping modulo a restricted form of type isomorphisms. We show that this relation, which we claim is useful in practice, is a composition of the usual subtyping relation with the recently propo ..."
Abstract

Cited by 8 (0 self)
 Add to MetaCart
We study subtyping of recursive types in the presence of associative and commutative productsthat is, subtyping modulo a restricted form of type isomorphisms. We show that this relation, which we claim is useful in practice, is a composition of the usual subtyping relation with the recently proposed notion of equality up to associativity and commutativity of products, and we propose an efficient decision algorithm for it. We also provide an automatic way of constructing coercions between related types.