116 research outputs found
Polymorphic Endpoint Types for Copyless Message Passing
We present PolySing#, a calculus that models process interaction based on
copyless message passing, in the style of Singularity OS. We equip the calculus
with a type system that accommodates polymorphic endpoint types, which are a
variant of polymorphic session types, and we show that well-typed processes are
free from faults, leaks, and communication errors. The type system is
essentially linear, although linearity alone may leave room for scenarios where
well-typed processes leak memory. We identify a condition on endpoint types
that prevents these leaks from occurring.Comment: In Proceedings ICE 2011, arXiv:1108.014
Type Soundness for Path Polymorphism
Path polymorphism is the ability to define functions that can operate
uniformly over arbitrary recursively specified data structures. Its essence is
captured by patterns of the form which decompose a compound data
structure into its parts. Typing these kinds of patterns is challenging since
the type of a compound should determine the type of its components. We propose
a static type system (i.e. no run-time analysis) for a pattern calculus that
captures this feature. Our solution combines type application, constants as
types, union types and recursive types. We address the fundamental properties
of Subject Reduction and Progress that guarantee a well-behaved dynamics. Both
these results rely crucially on a notion of pattern compatibility and also on a
coinductive characterisation of subtyping
Typing Copyless Message Passing
We present a calculus that models a form of process interaction based on
copyless message passing, in the style of Singularity OS. The calculus is
equipped with a type system ensuring that well-typed processes are free from
memory faults, memory leaks, and communication errors. The type system is
essentially linear, but we show that linearity alone is inadequate, because it
leaves room for scenarios where well-typed processes leak significant amounts
of memory. We address these problems basing the type system upon an original
variant of session types.Comment: 50 page
Cogent: uniqueness types and certifying compilation
This paper presents a framework aimed at significantly reducing the cost of proving functional correctness for low-level operating systems components. The framework is designed around a new functional programming language, Cogent. A central aspect of the language is its uniqueness type system, which eliminates the need for a trusted runtime or garbage collector while still guaranteeing memory safety, a crucial property for safety and security. Moreover, it allows us to assign two semantics to the language: The first semantics is imperative, suitable for efficient C code generation, and the second is purely functional, providing a user-friendly interface for equational reasoning and verification of higher-level correctness properties. The refinement theorem connecting the two semantics allows the compiler to produce a proof via translation validation certifying the correctness of the generated C code with respect to the semantics of the Cogent source program. We have demonstrated the effectiveness of our framework for implementation and for verification through two file system implementations
System with Context-free Session Types
We study increasingly expressive type systems, from -- an extension
of the polymorphic lambda calculus with equirecursive types -- to
-- the higher-order polymorphic lambda calculus with
equirecursive types and context-free session types. Type equivalence is given
by a standard bisimulation defined over a novel labelled transition system for
types. Our system subsumes the contractive fragment of as
studied in the literature. Decidability results for type equivalence of the
various type languages are obtained from the translation of types into objects
of an appropriate computational model: finite-state automata, simple grammars
and deterministic pushdown automata. We show that type equivalence is decidable
for a significant fragment of the type language. We further propose a
message-passing, concurrent functional language equipped with the expressive
type language and show that it enjoys preservation and absence of runtime
errors for typable processes.Comment: 38 pages, 13 figure
Formal foundations for hybrid effect analysis
Type-and-effect systems are a powerful tool for program construction and verification. Type-and-effect systems are useful because it can help reduce bugs in computer programs, enable compiler optimizations and also provide sort of program documentation. As software systems increasingly embrace dynamic features and complex modes of compilation, static effect systems have to reconcile over competing goals such as precision, soundness, modularity, and programmer productivity. In this thesis, we propose the idea of combining static and dynamic analysis for effect systems to improve precision and flexibility.
We describe intensional effect polymorphism, a new foundation for effect systems that integrates static and dynamic effect checking. Our system allows the effect of polymorphic code to be intensionally inspected. It supports a highly precise notion of effect polymorphism through a lightweight notion of dynamic typing. When coupled with parametric polymorphism, the powerful system utilizes runtime information to enable precise effect reasoning, while at the same time retains strong type safety guarantees. The technical innovations of our design include a relational notion of effect checking, the use of bounded existential types to capture the subtle interactions between static typing and dynamic typing, and a differential alignment strategy to achieve efficiency in dynamic typing.
We introduce the idea of first-class effects, where the computational effect of an expression can be programmatically reflected, passed around as values, and analyzed at run time. A broad range of designs “hard-coded in existing effect-guided analyses can be supported through intuitive programming abstractions. The core technical development is a type system with a couple of features. Our type system provides static guarantees to application-specific effect management properties through refinement types, promoting “correct-by-design effect-guided programming. Also, our type system computes not only the over-approximation of effects, but also their under-approximation. The duality unifies the common theme of permission vs. obligation in effect reasoning.
Finally, we show the potential benefit of intensional effects by applying it to an event-driven system to obtain safe concurrency. The technical innovations of our system include a novel effect system to soundly approximate the dynamism introduced by runtime handlers registration, a static analysis to precompute the effects and a dynamic analysis that uses the precomputed effects to improve concurrency. Our design simplifies modular concurrency reasoning and avoids concurrency hazards
Programming Languages and Systems
This open access book constitutes the proceedings of the 28th European Symposium on Programming, ESOP 2019, which took place in Prague, Czech Republic, in April 2019, held as Part of the European Joint Conferences on Theory and Practice of Software, ETAPS 2019
Type Directed Specification Refinement
Specification languages serve a fundamentally different purpose than general-purpose programming languages, and their type systems reflect these needs. Specification type systems must record and track more information for us to reason about a system adequately, and this added expressiveness may lead to an undecidable typing analysis. System level design begins with a high-level specification that is continually refined and expanded with implementation details, constraints, and typing information, down to a concrete specification. During this refinement process, the system is underspecified, and many static analyses aren't applicable until the system is fully specified. However, partial specifications contain valuable information that can inform the refinement process--we can locally inspect parts of the specification from a typing perspective to look for inferrable information or inconsistencies early on to aid the refinement process. This work defines a typing analysis that gathers constraints and typing information to inform the specification refinement process. It explores localized techniques such as local type inference and tracking of values as a means of influencing the specification refinement process
- …