
Matthew Flatt
· ProfessorVerifiedUniversity of Utah · Computer Science
Active 1993–2024
About
Matthew Flatt is a professor at the School of Computing at the University of Utah. His work involves programming languages, as indicated by his association with courses such as CS 3520/6520 Programming Languages and his publications related to programming language design and implementation. He is involved with projects and resources like PLT Racket, How to Design Programs, Program by Design, and PLT Redex, which suggest a focus on programming language development, teaching, and formal modeling. His research and teaching activities are centered around programming languages, their design, and educational approaches to understanding programming concepts.
Research topics
- Computer Science
- Programming language
- Data Mining
- Mathematics
- Artificial Intelligence
- Machine Learning
- Geometry
- Human–computer interaction
- Parallel computing
- Software engineering
- Data science
Selected publications
DSLs in Racket: You Want It How, Now?
2024-10-17
articleOpen accessDomain-Specific Languages (DSLs) are a popular way to simplify and streamline programmatic solutions of commonly occurring yet specialized tasks. While the design of frameworks for implementing DSLs has been a popular topic of study in the research community, significantly less attention has been given to studying how those frameworks end up being used by practitioners and assessing utility of their features for building DSLs "in the wild". In this paper, we conduct such a study focusing on a particular framework for DSL construction: the Racket programming language. We provide (a) a novel taxonomy of language design intents enabled by Racket-embedded DSLs, and (b) a classification of ways to utilize Racket's mechanisms that make the implementation of those intents possible. We substantiate our taxonomy with an analysis of 30 popular Racket-based DSLs, discussing how they make use of the available mechanisms and accordingly achieve their design intents. The taxonomy serves as a reusable measure that can help language designers to systematically develop, compare, and analyze DSLs in Racket as well as other frameworks.
A Calculus for Unreachable Code
arXiv (Cornell University) · 2024-07-06
preprintOpen accessIn Racket, the LLVM IR, Rust, and other modern languages, programmers and static analyses can hint, with special annotations, that certain parts of a program are unreachable. Same as other assumptions about undefined behavior; the compiler assumes these hints are correct and transforms the program aggressively. While compile-time transformations due to undefined behavior often perplex compiler writers and developers, we show that the essence of transformations due to unreachable code can be distilled in a surprisingly small set of simple formal rules. Specifically, following the well-established tradition of understanding linguistic phenomena through calculi, we introduce the first calculus for unreachable. Its term-rewriting rules that take advantage of unreachable fall into two groups. The first group allows the compiler to delete any code downstream of unreachable, and any effect-free code upstream of unreachable. The second group consists of rules that eliminate conditional expressions when one of their branches is unreachable. We show the correctness of the rules with a novel logical relation, and we examine how they correspond to transformations due to unreachable in Racket and LLVM.
Rhombus: A New Spin on Macros without All the Parentheses
Proceedings of the ACM on Programming Languages · 2023 · 4 citations
1st authorCorresponding- Computer Science
- Computer Science
- Programming language
Rhombus is a new language that is built on Racket. It offers the same kind of language extensibility as Racket itself, but using traditional (infix) notation. Although Rhombus is far from the first language to support Lisp-style macros without Lisp-style parentheses, Rhombus offers a novel synthesis of macro technology that is practical and expressive. A key element is the use of multiple binding spaces for context-specific sublanguages. For example, expressions and pattern-matching forms can use the same operators with different meanings and without creating conflicts. Context-sensitive bindings, in turn, facilitate a language design that reduces the notational distance between the core language and macro facilities. For example, repetitions can be defined and used in binding and expression contexts generally, which enables a smoother transition from programming to metaprogramming. Finally, since handling static information (such as types) is also a necessary part of growing macros beyond Lisp, Rhombus includes support in its expansion protocol for communicating static information among bindings and expressions. The Rhombus implementation demonstrates that all of these pieces can work together in a coherent and user-friendly language.
Artifact for "Rhombus: A New Spin on Macros without All the Parentheses"
Artifact Digital Object Group · 2023-10-16 · 1 citations
datasetOpen access1st authorCorrespondingRuntime and compiler support for HAMTs
2021-10-15
articleSenior authorMany functional languages---including Racket, Clojure, and Scala---provide a persistent-map datatype with an implementation based on Hash Array Mapped Tries (HAMTs). HAMTs enable efficient functional lookup, insertion, and deletion operations with a small memory footprint, especially when taking advantage of implementation techniques that have been developed since the original HAMT implementation. Racket's latest HAMT implementation is based on an intermediate data structure, a stencil vector, that supports an especially compact representation of HAMTs with help from the compiler and memory manager. That is, stencil vectors provide an abstraction to improve HAMT performance without burdening the compiler with all of the complexity and design choices of a HAMT implementation. Benchmark measurements show that HAMTs in Racket have performance comparable to other state-of-the-art implementations, while stencil-vector HAMTs are more compact and run as fast as alternative representations in Racket. Although we only report on Racket, our experience suggests that a stencil-vector datatype in other dynamic-language implementations might improve HAMT performance in those implementations.
SweetPea: A standard language for factorial experimental design
Behavior Research Methods · 2021-08-06 · 5 citations
articleOpen accessSweetPea: A standard language for factorial experimental design.
2020 · 1 citations
- Computer Science
- Artificial Intelligence
- Computer Science
Experimental design is a key ingredient of reproducible empirical research. Yet, given the increasing complexity of experimental designs, researchers often struggle to implement ones that allow them to measure their variables of interest without confounds. SweetPea is an open-source declarative language in Python, in which researchers can describe their desired experiment as a set of factors and constraints. The language leverages advances in areas of computer science to sample experiment sequences in an unbiased way. In this article, we provide an overview of SweetPea’s capabilities, and demonstrate its application to the design of psychological experiments. Finally, we discuss current limitations of SweetPea, as well as potential applications to other domains of empirical research, such as neuroscience and machine learning.
Compiler and runtime support for continuation marks
2020 · 9 citations
1st authorCorresponding- Computer Science
- Computer Science
- Programming language
Continuation marks enable dynamic binding and context inspection in a language with proper handling of tail calls and first-class, multi-prompt, delimited continuations. The simplest and most direct use of continuation marks is to implement dynamically scoped variables, such as the current output stream or the current exception handler. Other uses include stack inspection for debugging or security checks, serialization of an in-progress computation, and run-time elision of redundant checks. By exposing continuation marks to users of a programming language, more kinds of language extensions can be implemented as libraries without further changes to the compiler. At the same time, the compiler and runtime system must provide an efficient implementation of continuation marks to ensure that library-implemented language extensions are as effective as changing the compiler. Our implementation of continuation marks for Chez Scheme (in support of Racket) makes dynamic binding and lookup constant-time and fast, preserves the performance of Chez Scheme's first-class continuations, and imposes negligible overhead on program fragments that do not use first-class continuations or marks.
Replication Package for Article: Compiler and Runtime Support for Continuation Marks
Artifact Digital Object Group · 2020-06-24
dataset1st authorCorrespondingRacket’s intermediate language for control (invited talk)
2020-11-15
article1st authorCorrespondingAs a language that is intended for building languages in a composable way, Racket provides an especially rich set of constructs for control, including delimited continuations and efficient reflection on continuations. This talk will explain Racket’s constructs for control and describe how the implementation is built in layers.
Recent grants
SHF:Small:A Domain-Specific Language for Designing Cognitive-Science Experiments
NSF · $424k · 2018–2022
SoD: Language Towers as Design Frameworks
NSF · $180k · 2005–2007
NSF · $120k · 2015–2018
SHF: Small: An Extensible Gradual Type System via Compile-Time Meta-Programming
NSF · $419k · 2009–2013
Frequent coauthors
- 105 shared
Robert Bruce Findler
Northwestern University
- 83 shared
Matthias Felleisen
- 70 shared
Shriram Krishnamurthi
- 17 shared
Sam Tobin-Hochstadt
Indiana University Bloomington
- 8 shared
Ryan Culpepper
Czech Technical University in Prague
- 7 shared
Vincent St-Amour
- 6 shared
J. M. Swaine
Northwestern University
- 6 shared
Kathryn E. Gray
University of Cambridge
Education
- 1994
Ph.D., Computer Science
University of California, San Diego
- 1989
B.S., Computer Science
Brigham Young University
- Resume-aware match score
- Save to shortlist
- AI-drafted outreach
See your match with Matthew Flatt
PhdFit ranks faculty by your research interests, methods, and publications — grounded in their actual work, not templates.
- Free to start
- No credit card
- 30-second signup