Results 1  10
of
13
Semantic subtyping with an SMT solver
, 2010
"... We study a firstorder functional language with the novel combination of the ideas of refinement type (the subset of a type to satisfy a Boolean expression) and typetest (a Boolean expression testing whether a value belongs to a type). Our core calculus can express a rich variety of typing idioms; ..."
Abstract

Cited by 30 (1 self)
 Add to MetaCart
(Show Context)
We study a firstorder functional language with the novel combination of the ideas of refinement type (the subset of a type to satisfy a Boolean expression) and typetest (a Boolean expression testing whether a value belongs to a type). Our core calculus can express a rich variety of typing idioms; for example, intersection, union, negation, singleton, nullable, variant, and algebraic types are all derivable. We formulate a semantics in which expressions denote terms, and types are interpreted as firstorder logic formulas. Subtyping is defined as valid implication between the semantics of types. The formulas are interpreted in a specific model that we axiomatize using standard firstorder theories. On this basis, we present a novel typechecking algorithm able to eliminate many dynamic tests and to detect many errors statically. The key idea is to rely on an SMT solver to compute subtyping efficiently. Moreover, interpreting types as formulas allows us to call the SMT solver at runtime to compute instances of types.
Dependently Typed Programming with DomainSpecific Logics
 SUBMITTED TO POPL ’09
, 2008
"... We define a dependent programming language in which programmers can define and compute with domainspecific logics, such as an accesscontrol logic that statically prevents unauthorized access to controlled resources. Our language permits programmers to define logics using the LF logical framework, ..."
Abstract

Cited by 6 (3 self)
 Add to MetaCart
(Show Context)
We define a dependent programming language in which programmers can define and compute with domainspecific logics, such as an accesscontrol logic that statically prevents unauthorized access to controlled resources. Our language permits programmers to define logics using the LF logical framework, whose notion of binding and scope facilitates the representation of the consequence relation of a logic, and to compute with logics by writing functional programs over LF terms. These functional programs can be used to compute values at runtime, and also to compute types at compiletime. In previous work, we studied a simplytyped framework for representing and computing with variable binding [LICS 2008]. In this paper, we generalize our previous type theory to account for dependently typed inference rules, which are necessary to adequately represent domainspecific logics, and we present examples of using our type theory for certified software and mechanized metatheory.
Greedy Bidirectional Polymorphism
, 2009
"... Bidirectional typechecking has become popular in advanced type systems because it works in many situations where inference is undecidable. In this paper, I show how to cleanly handle parametric polymorphism in a bidirectional setting. The key contribution is a bidirectional type system for a subset ..."
Abstract

Cited by 6 (4 self)
 Add to MetaCart
Bidirectional typechecking has become popular in advanced type systems because it works in many situations where inference is undecidable. In this paper, I show how to cleanly handle parametric polymorphism in a bidirectional setting. The key contribution is a bidirectional type system for a subset of ML that supports firstclass (higherrank and even impredicative) polymorphism, and is complete for predicative polymorphism (including MLstyle polymorphism and higherrank polymorphism). The system’s power comes from bidirectionality combined with a “greedy ” method of finding polymorphic instances inspired by Cardelli’s early work on System F<:. This work demonstrates that bidirectionality is a good foundation for traditionally vexing features like firstclass polymorphism.
Positively Dependent Types
 SUBMITTED TO PLPV ’09
, 2008
"... This paper is part of a line of work on using the logical techniques of polarity and focusing to design a dependent programming language, with particular emphasis on programming with deductive systems such as programming languages and proof theories. Polarity emphasizes the distinction between posit ..."
Abstract

Cited by 5 (0 self)
 Add to MetaCart
This paper is part of a line of work on using the logical techniques of polarity and focusing to design a dependent programming language, with particular emphasis on programming with deductive systems such as programming languages and proof theories. Polarity emphasizes the distinction between positive types, which classify data, and negative types, which classify computation. In previous work, we showed how to use Zeilberger’s higherorder formulation of focusing to integrate a positive function space for representing variable binding, an essential tool for specifying logical systems, with a standard negative computational function space. However, our previous work considers only a simplytyped language. The central technical contribution of the present paper is to extend higherorder focusing with a form of dependency that we call positively dependent types: We allow dependency on positive data, but not negative computation, and we present the syntax of dependent pair and function types using an iterated inductive definition, mapping positive data to types, which gives an account of typelevel computation. We construct our language inside the dependently typed programming language Agda 2, making essential use of coinductive types and inductionrecursion.
REFINEMENT TYPES FOR LOGICAL FRAMEWORKS AND THEIR INTERPRETATION AS PROOF IRRELEVANCE
"... Abstract. Refinement types sharpen systems of simple and dependent types by offering expressive means to more precisely classify welltyped terms. We present a system of refinement types for LF in the style of recent formulations where only canonical forms are welltyped. Both the usual LF rules and ..."
Abstract

Cited by 2 (0 self)
 Add to MetaCart
Abstract. Refinement types sharpen systems of simple and dependent types by offering expressive means to more precisely classify welltyped terms. We present a system of refinement types for LF in the style of recent formulations where only canonical forms are welltyped. Both the usual LF rules and the rules for type refinements are bidirectional, leading to a straightforward proof of decidability of typechecking even in the presence of intersection types. Because we insist on canonical forms, structural rules for subtyping can now be derived rather than being assumed as primitive. We illustrate the expressive power of our system with examples and validate its design by demonstrating a precise correspondence with traditional presentations of subtyping. Proof irrelevance provides a mechanism for selectively hiding the identities of terms in type theories. We show that LF refinement types can be interpreted as predicates using proof irrelevance, establishing a uniform relationship between two previously studied concepts in type theory. The interpretation and its correctness proof are surprisingly complex, lending support to the claim that refinement types are a fundamental construct rather than just a convenient surface syntax for certain uses of proof irrelevance. 1.
Church and Curry: Combining Intrinsic and Extrinsic Typing
"... Church’s formulation of the simple theory of types [1] has the pleasing property that every wellformed term has a unique type. The type is thus an intrinsic attribute of a term. Furthermore, we can restrict attention to wellformed terms as the only meaningful ones, because the property of being ..."
Abstract
 Add to MetaCart
(Show Context)
Church’s formulation of the simple theory of types [1] has the pleasing property that every wellformed term has a unique type. The type is thus an intrinsic attribute of a term. Furthermore, we can restrict attention to wellformed terms as the only meaningful ones, because the property of being
Refinement Types as Proof Irrelevance
"... Abstract. Refinement types sharpen systems of simple and dependent types by offering expressive means to more precisely classify welltyped terms. Proof irrelevance provides a mechanism for selectively hiding the identities of terms in type theories. In this paper, we show that refinement types can ..."
Abstract
 Add to MetaCart
(Show Context)
Abstract. Refinement types sharpen systems of simple and dependent types by offering expressive means to more precisely classify welltyped terms. Proof irrelevance provides a mechanism for selectively hiding the identities of terms in type theories. In this paper, we show that refinement types can be interpreted as predicates using proof irrelevance in the context of the logical framework LF, establishing a uniform relationship between two previously studied concepts in type theory. The interpretation and its correctness proof are surprisingly complex, lending credence to the idea that refinement types are a fundamental construct rather than just a convenient surface syntax for certain uses of proof irrelevance. 1
Thesis Proposal: Refinement Types for LF
, 2008
"... The logical framework LF and its implementation as the Twelf metalogic provide both a practical system and a proven methodology for representing deductive systems and their metatheory in a machinecheckable way. An extension of LF with refinement types provides a convenient means for representing ce ..."
Abstract
 Add to MetaCart
The logical framework LF and its implementation as the Twelf metalogic provide both a practical system and a proven methodology for representing deductive systems and their metatheory in a machinecheckable way. An extension of LF with refinement types provides a convenient means for representing certain kinds of judgemental inclusions in an intrinsic manner. I propose to carry out such an extension in full, adapting as much of the Twelf metatheory engine as possible to the new system, and I intend to argue that the extension is both useful and practical. 1
Bidirectional polymorphism through greed and unions
, 2008
"... Bidirectional typechecking has become a popular technique for advanced type systems. In this paper, I show how to extend past work on bidirectional typechecking to handle parametric polymorphism bidirectionally. The first key contribution is a simple bidirectional type system that supports firstcla ..."
Abstract
 Add to MetaCart
(Show Context)
Bidirectional typechecking has become a popular technique for advanced type systems. In this paper, I show how to extend past work on bidirectional typechecking to handle parametric polymorphism bidirectionally. The first key contribution is a simple bidirectional type system that supports firstclass (higherrank and impredicative) polymorphism; its algorithm is complete for predicative polymorphism (including MLstyle polymorphism and higherrank polymorphism). The second key contribution extends that system with subtyping; the combination of bidirectional typechecking with intersection and union types fortuitously yields a simple but fairly powerful algorithm. Both of these systems, inspired by Cardelli’s early work on System F<:, rely on a “greedy ” method for finding polymorphic instances. Finally, I present a more powerful algorithm that forms intersections and unions automatically. 1
A Bidirectional Refinement Type System for LF Abstract
"... We present a system of refinement types for LF in the style of recent formulations where only canonical forms are welltyped. Both the usual LF rules and the rules for type refinements are bidirectional, leading to a straightforward proof of decidability of typechecking even in the presence of inte ..."
Abstract
 Add to MetaCart
We present a system of refinement types for LF in the style of recent formulations where only canonical forms are welltyped. Both the usual LF rules and the rules for type refinements are bidirectional, leading to a straightforward proof of decidability of typechecking even in the presence of intersection types. Because we insist on canonical forms, structural rules for subtyping can now be derived rather than being assumed as primitive. We illustrate the expressive power of our system with several examples in the domain of logics and programming languages.