2,140 research outputs found
Gradual Program Analysis
Dataflow analysis and gradual typing are both well-studied methods to gain information about computer programs in a finite amount of time. The gradual program analysis project seeks to combine those two techniques in order to gain the benefits of both. This thesis explores the background information necessary to understand gradual program analysis, and then briefly discusses the research itself, with reference to publication of work done so far. The background topics include essential aspects of programming language theory, such as syntax, semantics, and static typing; dataflow analysis concepts, such as abstract interpretation, semilattices, and fixpoint computations; and gradual typing theory, such as the concept of an unknown type, liftings of predicates, and liftings of functions
Gradual Liquid Type Inference
Liquid typing provides a decidable refinement inference mechanism that is
convenient but subject to two major issues: (1) inference is global and
requires top-level annotations, making it unsuitable for inference of modular
code components and prohibiting its applicability to library code, and (2)
inference failure results in obscure error messages. These difficulties
seriously hamper the migration of existing code to use refinements. This paper
shows that gradual liquid type inference---a novel combination of liquid
inference and gradual refinement types---addresses both issues. Gradual
refinement types, which support imprecise predicates that are optimistically
interpreted, can be used in argument positions to constrain liquid inference so
that the global inference process e effectively infers modular specifications
usable for library components. Dually, when gradual refinements appear as the
result of inference, they signal an inconsistency in the use of static
refinements. Because liquid refinements are drawn from a nite set of
predicates, in gradual liquid type inference we can enumerate the safe
concretizations of each imprecise refinement, i.e. the static refinements that
justify why a program is gradually well-typed. This enumeration is useful for
static liquid type error explanation, since the safe concretizations exhibit
all the potential inconsistencies that lead to static type errors. We develop
the theory of gradual liquid type inference and explore its pragmatics in the
setting of Liquid Haskell.Comment: To appear at OOPSLA 201
Call-by-name Gradual Type Theory
We present gradual type theory, a logic and type theory for call-by-name
gradual typing. We define the central constructions of gradual typing (the
dynamic type, type casts and type error) in a novel way, by universal
properties relative to new judgments for gradual type and term dynamism, which
were developed in blame calculi and to state the "gradual guarantee" theorem of
gradual typing. Combined with the ordinary extensionality () principles
that type theory provides, we show that most of the standard operational
behavior of casts is uniquely determined by the gradual guarantee. This
provides a semantic justification for the definitions of casts, and shows that
non-standard definitions of casts must violate these principles. Our type
theory is the internal language of a certain class of preorder categories
called equipments. We give a general construction of an equipment interpreting
gradual type theory from a 2-category representing non-gradual types and
programs, which is a semantic analogue of Findler and Felleisen's definitions
of contracts, and use it to build some concrete domain-theoretic models of
gradual typing
The Dynamic Practice and Static Theory of Gradual Typing
We can tease apart the research on gradual types into two `lineages\u27: a pragmatic, implementation-oriented dynamic-first lineage and a formal, type-theoretic, static-first lineage. The dynamic-first lineage\u27s focus is on taming particular idioms - `pre-existing conditions\u27 in untyped programming languages. The static-first lineage\u27s focus is on interoperation and individual type system features, rather than the collection of features found in any particular language. Both appear in programming languages research under the name "gradual typing", and they are in active conversation with each other.
What are these two lineages? What challenges and opportunities await the static-first lineage? What progress has been made so far
- …