Ronald GarciaAssistant Professor
Software Practices Lab
Department of Computer Science
University of British Columbia
201-2366 Main Mall
Vancouver, B.C., Canada V6T 1Z4
Building on the work in our ECOOP '11 paper, this paper presents a comprehensive theory of static and gradual typestate-oriented programming. It presents Featherweight Typestate (FT) and Gradual Featherweight Typestate (GFT) as core calculi for languages with integrated support for typestate. The relationship between the two languages is demonstrated, explained, and formalized.Confined Gradual Typing
Adding gradual types introduces the potential for performance-sapping and reliability-compromising function wrappers to be implicitly introduced at unforeseen places in user code. This paper presents a type system with simple flow annotations that allow programmer to precisely control which program values are subject to wrapping. The need for this control is validates using Gradualtalk, a Gradually typed dialect of Smalltalk.A Theory of Gradual Effect Systems
Effect systems are a powerful tool for imposing effect disciplines on programming languages, but they have failed to make much headway in programming languages. We conjecture that this is in part due to their inflexibility. To support incremental adoption of checked effect disciplines, this paper presents a general framework for developing gradually checked effect systems.The Reaction of Open-Source Projects to New Language Features: An Empirical Study of C#
Generics have become viewed as a crucial feature of object oriented languages, and as such have been added to both Java and C#. This paper presents an empirical study of how generics have been adopted over time in ongoing open source projects, and to what extent the available data supports or undercuts language designers' claims about their benefits.Calculating Threesomes, with Blame
The coercion calculus of Henglein is a pleasant framework in which to design space-efficient cast calculi that embody particular blame strategies, but implementing coercions directly and correctly is challenging. The threesome calculus of Siek and Wadler also supports space-efficient casts and is straightforward to implement, but is tricky to endow with a blame strategy. This paper shows that you can enjoy the best of both worlds by designing your blame strategy using coercions, and then calculate a corresponding notion of threesomes using correctness-preserving transformations. The concrete result is three new threesome calculi that cover the design space of casts identified by Siek, Garcia, and Wadler.Gradual Typestate
This paper presents Gradual Featherweight Typestate (GFT), a formal model of a language for Typestate-oriented programming. Though powerful, static typestate checkers, like the one built into GFT, are sometimes too weak to recognize correct programs, and sometimes too complex for programmers to use. This work averts this limitation by developing a model of combined static and dynamic typestate checking. The result is a language that provides powerful static safety and program structuring facilities with tractable and flexible type checking.Permission-Based Programming Languages
This paper proposes access permissions as a powerful extension to programming language type systems. They can be used to support stronger safety checks, more flexible program structure, and safe concurrency.Lazy Evaluation and Delimited Control
This journal paper extends the results of the 2009 POPL paper with more language features and an abstract machine for cyclic call-by-need evaluation.
C++ template metaprogramming is a suite of techniques for compile-time computation that leverage the expressive power of C++'s type system. Because it relies on emergent properties of language features that were originally intended for other purposes, template metaprogramming suffers practical shortcomings and is not well-understood in theory. In this paper, we analyze core capabilities of template metaprogramming apart from the particular C++ features that support them. Guided by this analysis we develop and study a foundational language semantics that directly captures those capabilities.Exploring the Design Space of Casts
Variants of the lambda calculus augmented with a dynamic type and cast expressions (cast calculi) have been used to formalize languages that combine dynamic and static type disciplines. Due to the diversity of requirements imposed by these languages, no single cast calculus design suffices. In this paper, we develop a modular semantic framework that captures a number of cast calculi, some novel and some extending or matching results from the literature. Each calculus supports space-efficient implementation and tracks blame for cast failures. Furthermore, we introduce a novel and intuitive blame-assignment strategy that respects traditional subtyping.
This paper formalizes the connection between lazy evaluation and coroutine-like control operations, both of which are often used to solve the same problems. Starting from a variant of the call-by-need lambda calculus, we produce a novel heap-less abstract machine that uses control operations to locally manage laziness. We then recast the machine's operational behavior as a simulation of call-by-need evaluation in a call-by-value language with delimited control operations and first-class generative prompts. Both semantic artifacts cast lazy evaluation as an elegant expression of control operations.An extended comparative study of language support for generic programming
This paper extends the work presented in the OOPSLA 2003 paper. It adds explorations of the generic programming style using the class system of Objective Caml and the symmetric multi-methods of Cecil. The analysis of the previously studied languages has been updated to reflect changes since 2003, some of which were inspired by that work.
Type classes without types
Ronald Garcia and Andrew Lumsdaine. In Scheme '05: the 2005 ACM SIGPLAN Workshop on Scheme and Functional Programming.
Haskell type classes are an interesting example of how static type information can be used to enhance the expressiveness of a programming language. Scheme macros are a powerful mechanism for developing syntactic abstractions. This paper explores how far macros can go toward extending a dynamically typed language with a feature normally associated with static typing.
MultiArray: a C++ library for generic programming with arrays
Ronald Garcia and Andrew Lumsdaine. In Software: Practice and Experience, Volume 35, Number 2, 2005.
This paper reports on the design and implementation of MultiArray, a library for multi-dimensional array programming. This library is based on the generic programming style popularized by the Standard Template Library. It provides array containers, adaptors, and views, all built on a consistent conceptual basis.
Both research and mainstream programming languages now provide mechanisms for type-based abstraction, including templates, parametric polymorphism, and sophisticated module systems. This paper uses a case-study to explore the capabilities and shortcomings of several programming languages with respect to their ability to express libraries of generic data structures and algorithms.
Concepts for C++0x
Jeremy Siek, Douglas Gregor, Ronald Garcia, Jeremiah Willcock, Jaakko Järvi, and Andrew Lumsdaine. Technical report N1758=05-0018, ISO/IEC JTC 1, Information Technology, Subcommittee SC 22, Programming Language C++, 2005.
C++ has been a very capable language for implementing generic libraries, but provides limited explicit support for generic programming. Based on our experiences implementing C++ libraries and studying language support for the generic programming style, we designed C++ language extensions to directly support concepts, a modular constraint formalism for generics. The design has since evolved into a joint proposal with colleagues at Texas A&M, and is expected to be part of the next C++ standard (so-called C++0X).
I am an active participant in the Boost C++ Libraries project. I serve (with John Phillips) as Review Wizard, primarily responsible for coordinating review managers and library reviews.
I am the primary developer of the
Boost MultiArray Library.
MultiArray is a library of multi-dimensional array
abstractions. MultiArray is based on generic programming. It
provides a number of array types (self-managed containers, adaptors,
and views) as well as a type-generic programming interface
I've contributed code to a variety of other Boost projects. For example, I implemented a flexible GraphViz parser for the Boost Graph Library. I have also provided an IOStreams codecvt facet for the Unicode UTF-8 encoding. This facet is used in several Boost libraries including the Serialization and Program Options libraries.
I am an avid fan and player of ultimate frisbee. I also like to run and ride my bike around interesting places. While not particularly fond of cooking, I'm a big fan of eating.