Cyrus Omar

dblp:21/4362 · DBLP profile ↗
← Back
24ranked-venue papers
10as first author
13since 2021 · last 2025
0000-0003-4502-7971ORCID · corroborated

Domains — the database's venue-derived domains; a paper can count in several

Software engineering, systems software and programming languages · 15 · 7 first-author · 8 since 2021Human-computer interaction and ubiquitous computing · 7 · 2 first-author · 5 since 2021Artificial intelligence and machine learning · 1Graphics, computer vision, multimedia, augmented reality and games · 1 · 1 first-author
YearPublicationVenuePosition
2025 DeckFlow: Specification Decomposition on a Multimodal Generative Canvas
Gregory Thomas Croisdale, Emily Huang, John Joon Young Chung, Anhong Guo, Xu Wang 0016, Austin Z. Henley, Cyrus Omar
VL/HCC7
2025 Hazel Deriver: A Live Editor for Constructing Rule-Based Derivations
Zhiyao Zhong, Cyrus Omar
VL/HCC2
2025 Grove: A Bidirectionally Typed Collaborative Structure Editor Calculus
abstract
Version control systems typically rely on a patch language , heuristic patch synthesis algorithms like diff , and three-way merge algorithms . Standard patch languages and merge algorithms often fail to identify conflicts correctly when there are multiple edits to one line of code or code is relocated. This paper introduces Grove, a collaborative structure editor calculus that eliminates patch synthesis and three-way merge algorithms entirely. Instead, patches are derived directly from the log of the developer’s edit actions and all edits commute, i.e. the repository state forms a commutative replicated data type (CmRDT). To handle conflicts that can arise due to code relocation, the core datatype in Grove is a labeled directed multi-graph with uniquely identified vertices and edges. All edits amount to edge insertion and deletion, with deletion being permanent. To support tree-based editing, we define a decomposition from graphs into groves , which are a set of syntax trees with conflicts–including local, relocation, and unicyclic relocation conflicts–represented explicitly using holes and references between trees. Finally, we define a type error localization system for groves that enjoys a totality property, i.e. all editor states in Grove are statically meaningful, so developers can use standard editor services while working to resolve these explicitly represented conflicts. The static semantics is defined as a bidirectional marking system in line with recent work, with gradual typing employed to handle situations where errors and conflicts prevent type determination. We then layer on a unification-based type inference system to opportunistically fill type holes and fail gracefully when no solution exists. We mechanize the metatheory of Grove using the Agda theorem prover. We implement these ideas as the Grove Workbench , which generates the necessary data structures and algorithms in OCaml given a syntax tree specification.
Michael D. Adams 0001, Eric Griffis, Thomas Porter, Sundara Vishnu Satish, Eric Zhao 0006, Cyrus Omar
Proc. ACM Program. Lang.6
2025 Syntactic Completions with Material Obligations
abstract
Code editors provide essential services that help developers understand, navigate, and modify programs. However, these services often fail in the presence of syntax errors. Existing syntax error recovery techniques, like panic mode and multi-option repairs, are either too coarse, e.g. in deleting large swathes of code, or lead to a proliferation of possible completions. This paper introduces tall tylr , an error-handling parser and editor generator that completes malformed code with syntactic obligations that abstract over many possible completions. These obligations generalize the familiar notion of holes in structure editors to cover missing operands, operators, delimiters, and sort transitions. tall tylr is backed by a novel theory of tile-based parsing, conceptually organized around a molder that turns tokens into tiles and a melder that completes and parses tiles into terms using an error-handling generalization of operator-precedence parsing. We formalize melding as a parsing calculus, meldr, that completes input tiles with additional obligations such that it can be parsed into a well-formed term, with success guaranteed over all inputs. We further describe how tall tylr implements molding and completionranking using the principle of minimizing obligations . Obligations offer a useful way to scaffold internal program representations, but in tall tylr we go further to investigate the potential of materializing these obligations visually to the programmer. We conduct a user study to evaluate the extent to which an editor like tall tylr that materializes syntactic obligations might be usable and useful, finding both points of positivity and interesting new avenues for future work.
David Moon, Andrew Blinn, Thomas Porter, Cyrus Omar
Proc. ACM Program. Lang.4
2025 Incremental Bidirectional Typing via Order Maintenance
abstract
Live programming environments provide various semantic services, including type checking and evaluation, continuously as the user is editing the program. The live paradigm promises to improve the developer experience, but liveness is an implementation challenge, particularly when working with large programs. This paper specifies and efficiently implements a system that is able to incrementally update type information for a live program in response to fine-grained program edits. This information includes type error marks and information about the expected and actual type of every expression. The system is specified type-theoretically as a small-step dynamics that propagates updates through the marked and annotated program. Most updates flow according to a base bidirectional type system. Additional pointers are maintained to connect bound variables to their binding locations, with type updates traversing these pointers directly. Order maintenance data structures are employed to efficiently maintain these pointers and to prioritize the order of update propagation. We prove this system is equivalent to naive reanalysis in the Agda theorem prover, along with other important metatheoretic properties. We then provide an efficient OCaml implementation, detailing a number of impactful optimizations. We evaluate this implementation’s performance with a large stress-test and find that it is able to achieve multiple orders of magnitude speed-up compared to from-scratch reanalysis.
Thomas Porter, Marisa Kirisame, Ivan Wei, Pavel Panchekha, Cyrus Omar
Proc. ACM Program. Lang.5
2024 Statically Contextualizing Large Language Models with Typed Holes
abstract
Large language models (LLMs) have reshaped the landscape of program synthesis. However, contemporary LLM-based code completion systems often hallucinate broken code because they lack appropriate code context, particularly when working with definitions that are neither in the training data nor near the cursor. This paper demonstrates that tighter integration with the type and binding structure of the programming language in use, as exposed by its language server, can help address this contextualization problem in a token-efficient manner. In short, we contend that AIs need IDEs, too! In particular, we integrate LLM code generation into the Hazel live program sketching environment. The Hazel Language Server is able to identify the type and typing context of the hole that the programmer is filling, with Hazel’s total syntax and type error correction ensuring that a meaningful program sketch is available whenever the developer requests a completion. This allows the system to prompt the LLM with codebase-wide contextual information that is not lexically local to the cursor, nor necessarily in the same file, but that is likely to be semantically local to the developer’s goal. Completions synthesized by the LLM are then iteratively refined via further dialog with the language server, which provides error localization and error messages. To evaluate these techniques, we introduce MVUBench, a dataset of model-view-update (MVU) web applications with accompanying unit tests that have been written from scratch to avoid data contamination, and that can easily be ported to new languages because they do not have large external library dependencies. These applications serve as challenge problems due to their extensive reliance on application-specific data structures. Through an ablation study, we examine the impact of contextualization with type definitions, function headers, and errors messages, individually and in combination. We find that contextualization with type definitions is particularly impactful. After introducing our ideas in the context of Hazel, a low-resource language, we duplicate our techniques and port MVUBench to TypeScript in order to validate the applicability of these methods to higher-resource mainstream languages. Finally, we outline ChatLSP, a conservative extension to the Language Server Protocol (LSP) that language servers can implement to expose capabilities that AI code completion systems of various designs can use to incorporate static context when generating prompts for an LLM.
Andrew Blinn, Xiang Li 0140, June Hyung Kim, Cyrus Omar
Proc. ACM Program. Lang.4
2024 Total Type Error Localization and Recovery with Holes
abstract
Type systems typically only define the conditions under which an expression is well-typed, leaving ill-typed expressions formally meaningless. This approach is insufficient as the basis for language servers driving modern programming environments, which are expected to recover from simultaneously localized errors and continue to provide a variety of downstream semantic services. This paper addresses this problem, contributing the first comprehensive formal account of total type error localization and recovery: the marked lambda calculus. In particular, we define a gradual type system for expressions with marked errors, which operate as non-empty holes, together with a total procedure for marking arbitrary unmarked expressions. We mechanize the metatheory of the marked lambda calculus in Agda and implement it, scaled up, as the new basis for Hazel, a full-scale live functional programming environment with, uniquely, no meaningless editor states. The marked lambda calculus is bidirectionally typed, so localization decisions are systematically predictable based on a local flow of typing information. Constraint-based type inference can bring more distant information to bear in discovering inconsistencies but this notoriously complicates error localization. We approach this problem by deploying constraint solving as a type-hole-filling layer atop this gradual bidirectionally typed core. Errors arising from inconsistent unification constraints are localized exclusively to type and expression holes, i.e., the system identifies unfillable holes using a system of traced provenances, rather than localized in an ad hoc manner to particular expressions. The user can then interactively shift these errors to particular downstream expressions by selecting from suggested partially consistent type hole fillings, which returns control back to the bidirectional system. We implement this type hole inference system in Hazel.
Eric Zhao 0006, Raef Maroof, Anand Dukkipati, Andrew Blinn, Zhiyi Pan 0004, Cyrus Omar
Proc. ACM Program. Lang.6
2023 Gradual Structure Editing with Obligations
abstract
Structure editors have long promised to facilitate a continuous dialogue between programmer and system-one uninterrupted by syntax errors, such that vital program analyses and editor services are always available. Unfortunately, structure editors are notoriously slow or difficult to use, particularly when it comes to modifying existing code. Prior designs often struggle to resolve the tension between maintaining a program's hierarchical structure and supporting the editing affordances expected of its linear projection. We propose the paradigm of gradual structure editing, which mitigates this tension by allowing for temporary disassembly of hierarchical structures as needed for text-like editing, while scaffolding these interactions by generating syntactic obligations that, once discharged, guarantee proper reassembly. This paper contributes the design and evaluation of a gradual structure editor called teen tylr. We conducted a lab study comparing teen tylr to a text editor and a traditional structure editor on structurally complex program editing tasks, and found that teen tylr helped resolve most usability problems we identified in prior work, though not all, while achieving competitive performance with text editing on most tasks. We conclude with a discussion of teen tylr's remaining limitations and design implications for future code editors and parsers.
David Moon, Andrew Blinn, Cyrus Omar
VL/HCC3
2023 Live Pattern Matching with Typed Holes
abstract
Several modern programming systems, including GHC Haskell, Agda, Idris, and Hazel, support typed holes . Assigning static and, to varying degree, dynamic meaning to programs with holes allows program editors and other tools to offer meaningful feedback and assistance throughout editing, i.e. in a live manner. Prior work, however, has considered only holes appearing in expressions and types. This paper considers, from type theoretic and logical first principles, the problem of typed pattern holes. We confront two main difficulties, (1) statically reasoning about exhaustiveness and irredundancy when patterns are not fully known, and (2) live evaluation of expressions containing both pattern and expression holes. In both cases, this requires reasoning conservatively about all possible hole fillings. We develop a typed lambda calculus, Peanut, where reasoning about exhaustiveness and redundancy is mapped to the problem of deriving first order entailments. We equip Peanut with an operational semantics in the style of Hazelnut Live that allows us to evaluate around holes in both expressions and patterns. We mechanize the metatheory of Peanut in Agda and formalize a procedure capable of deciding the necessary entailments. Finally, we scale up and implement these mechanisms within Hazel, a programming environment for a dialect of Elm that automatically inserts holes during editing to provide static and dynamic feedback to the programmer in a maximally live manner, i.e. for every possible editor state. Hazel is the first maximally live environment for a general-purpose functional language.
Yongwei Yuan, Scott Guest, Eric Griffis, Hannah Potter, David Moon, Cyrus Omar
Proc. ACM Program. Lang.6
2022 Contextualized Programming Language Documentation
abstract
Learning the syntax and semantics of a new programming language is a challenge. It is common for learners to refer to language documentation many times and in many contexts as they build comfort and understanding. We review existing functional language documentation, finding that it tends to be organized according to the structure of the language. Each section interleaves narrative explanations, which introduce precise terminology that is then used consistently, with code examples. Sections often start with simpler special cases of a construct before considering it in full generality.
Hannah Potter, Ardi Madadi, René Just, Cyrus Omar
Onward!4
2022 RustViz: Interactively Visualizing Ownership and Borrowing
abstract
Rust is an industrial systems programming language unique in achieving memory safety without the need for a garbage collector. Instead, Rust relies on a unique and sometimes subtle resource ownership and borrowing system. This system can make learning Rust a challenge, even for experienced programmers. Motivated by these challenges, we introduce RustViz, a tool that allows an instructor to generate custom interactive timelines depicting ownership and borrowing events alongside Rust code examples embedded within learning material. These visualizations makes visible the static events, and subsequent state changes, that a Rust programmer must otherwise track entirely mentally. We have used RustViz to build a week-long Rust unit in a large undergraduate programming languages course. We demonstrate that this learning material, and the RustViz visualizations in particular, were valuable to students and led to the development of an accurate mental model of the essentials of ownership and borrowing in Rust.
Marcelo Almeida, Grant Cole, Ke Du 0002, Gongming Luo, Shulin Pan, Vishnu Reddy, Cyrus Omar
VL/HCC11
2022 An Integrative Human-Centered Architecture for Interactive Programming Assistants
abstract
Programming has become a collaboration between human programmers, who drive intent, and interactive assistants that suggest contextually relevant editor actions. There has been considerable work on suggestion synthesis strategies—from semantic autocomplete to modern program synthesis, repair, and machine learning research. This diversity of contextually viable strategies creates a need for an integrative, human-centered perspective on the problem of programming assistant design that (1) confronts the problem of integrating a variety of synthesis strategies, fed by shared semantic analyses capable of operating on program sketches, and (2) centers the needs of the human programmer: comprehending, comparing, ranking, and filtering suggestions generated by various synthesizers, and in some cases participating in a synthesizer’s search by supplying additional expressions of intent. This paper contributes a conceptual architecture and API to guide programming assistant designers as they confront these integration and human-centered design challenges. We then instantiate this architecture with two prototype end-to-end assistant designs, both developed for the Hazel programming environment, that emphasize understudied design aspects, namely continuity, explainability, human-in-the-loop synthesis, and the integration of multiple analyses with multiple synthesis strategies.
Andrew Blinn, David Moon, Eric Griffis, Cyrus Omar
VL/HCC4
2021 Filling typed holes with live GUIs
abstract
Text editing is powerful, but some types of expressions are more naturally represented and manipulated graphically. Examples include expressions that compute colors, music, animations, tabular data, plots, diagrams, and other domain-specific data structures. This paper introduces live literals, or livelits, which allow clients to fill holes of types like these by directly manipulating a user-defined GUI embedded persistently into code. Uniquely, livelits are compositional: a livelit GUI can itself embed spliced expressions, which are typed, lexically scoped, and can in turn embed other livelits. Livelits are also uniquely live: a livelit can provide continuous feedback about the run-time implications of the client’s choices even when splices mention bound variables, because the system continuously gathers closures associated with the hole that the livelit is filling. We integrate livelits into Hazel, a live hole-driven programming environment, and describe case studies that exercise these novel capabilities. We then define a simply typed livelit calculus, which specifies how livelits operate as live graphical macros. The metatheory of macro expansion has been mechanized in Agda.
Cyrus Omar, David Moon, Andrew Blinn, Ian Voysey, Nick Collins, Ravi Chugh
PLDI1
2020 Program sketching with live bidirectional evaluation
abstract
We present a system called Smyth for program sketching in a typed functional language whereby the concrete evaluation of ordinary assertions gives rise to input-output examples, which are then used to guide the search to complete the holes. The key innovation, called live bidirectional evaluation, propagates examples "backward" through partially evaluated sketches. Live bidirectional evaluation enables Smyth to (a) synthesize recursive functions without trace-complete sets of examples and (b) specify and solve interdependent synthesis goals. Eliminating the trace-completeness requirement resolves a significant limitation faced by prior synthesis techniques when given partial specifications in the form of input-output examples. To assess the practical implications of our techniques, we ran several experiments on benchmarks used to evaluate Myth, a state-of-the-art example-based synthesis tool. First, given expert examples (and no partial implementations), we find that Smyth requires on average 66% of the number of expert examples required by Myth. Second, we find that Smyth is robust to randomly-generated examples, synthesizing many tasks with relatively few more random examples than those provided by an expert. Third, we create a suite of small sketching tasks by systematically employing a simple sketching strategy to the Myth benchmarks; we find that user-provided sketches in Smyth often further reduce the total specification burden (i.e. the combination of partial implementations and examples). Lastly, we find that Leon and Synquid, two state-of-the-art logic-based synthesis tools, fail to complete several tasks on which Smyth succeeds.
Justin Lubin, Nick Collins, Cyrus Omar, Ravi Chugh
Proc. ACM Program. Lang.3
2019 Live functional programming with typed holes
abstract
Live programming environments aim to provide programmers (and sometimes audiences) with continuous feedback about a program's dynamic behavior as it is being edited. The problem is that programming languages typically assign dynamic meaning only to programs that are complete, i.e. syntactically well-formed and free of type errors. Consequently, live feedback presented to the programmer exhibits temporal or perceptive gaps. This paper confronts this "gap problem" from type-theoretic first principles by developing a dynamic semantics for incomplete functional programs, starting from the static semantics for incomplete functional programs developed in recent work on Hazelnut. We model incomplete functional programs as expressions with holes, with empty holes standing for missing expressions or types, and non-empty holes operating as membranes around static and dynamic type inconsistencies. Rather than aborting when evaluation encounters any of these holes as in some existing systems, evaluation proceeds around holes, tracking the closure around each hole instance as it flows through the remainder of the program. Editor services can use the information in these hole closures to help the programmer develop and confirm their mental model of the behavior of the complete portions of the program as they decide how to fill the remaining holes. Hole closures also enable a fill-and-resume operation that avoids the need to restart evaluation after edits that amount to hole filling. Formally, the semantics borrows machinery from both gradual type theory (which supplies the basis for handling unfilled type holes) and contextual modal type theory (which supplies a logical basis for hole closures), combining these and developing additional machinery necessary to continue evaluation past holes while maintaining type safety. We have mechanized the metatheory of the core calculus, called Hazelnut Live, using the Agda proof assistant. We have also implemented these ideas into the Hazel programming environment. The implementation inserts holes automatically, following the Hazelnut edit action calculus, to guarantee that every editor state has some (possibly incomplete) type. Taken together with this paper's type safety property, the result is a proof-of-concept live programming environment where rich dynamic feedback is truly available without gaps, i.e. for every reachable editor state.
Cyrus Omar, Ian Voysey, Ravi Chugh, Matthew A. Hammer
Proc. ACM Program. Lang.1
2018 Reasonably programmable literal notation
abstract
General-purpose programming languages typically define literal notation for only a small number of common data structures, like lists. This is unsatisfying because there are many other data structures for which literal notation might be useful, e.g. finite maps, regular expressions, HTML elements, SQL queries, syntax trees for various languages and chemical structures. There may also be different implementations of each of these data structures behind a common interface that could all benefit from common literal notation. This paper introducestyped literal macros (TLMs), which allow library providers to define new literal notation of nearly arbitrary design at any specified type or parameterized family of types. Compared to existing approaches, TLMs are uniquelyreasonable. TLM clients can reason abstractly, i.e. without examining grammars or generated expansions, about types and binding. The system only needs to convey to clients, via secondary notation, the inferredsegmentationof each literal body, which gives the locations and types of spliced subterms. TLM providers can reason modularly about syntactic ambiguity and expansion correctness according to clear criteria. This paper incorporates TLMs into Reason, an emerging alternative front-end for OCaml, and demonstrates, through several non-trivial case studies, how TLMs integrate with the advanced features of OCaml, including pattern matching and the module system. We also discuss optional integration with MetaOCaml, which allows TLM providers to be more confident about type correctness. Finally, we establish these abstract reasoning principles formally with a detailed type-theoretic account of expression and pattern TLMs for “core ML”.
Cyrus Omar, Jonathan Aldrich
Proc. ACM Program. Lang.1
2017 Hazelnut: a bidirectionally typed structure editor calculus
abstract
Structure editors allow programmers to edit the tree structure of a program directly. This can have cognitive benefits, particularly for novice and end-user programmers. It also simplifies matters for tool designers, because they do not need to contend with malformed program text.
Cyrus Omar, Ian Voysey, Michael Hilton 0001, Jonathan Aldrich, Matthew A. Hammer
POPL1
2016 Programmable semantic fragments: the design and implementation of typy
abstract
This paper introduces typy, a statically typed programming language embedded by reflection into Python. typy features a fragmentary semantics, i.e. it delegates semantic control over each term, drawn from Python's fixed concrete and abstract syntax, to some contextually relevant user-defined semantic fragment. The delegated fragment programmatically 1) typechecks the term (following a bidirectional protocol); and 2) assigns dynamic meaning to the term by computing a translation to Python.
Cyrus Omar, Jonathan Aldrich
GPCE1
2014 Safely Composable Type-Specific Languages
Cyrus Omar, Darya Kurilova, Ligia Nistor, Benjamin Chung, Alex Potanin, Jonathan Aldrich
ECOOP1
2012 Active code completion
abstract
Code completion menus have replaced standalone API browsers for most developers because they are more tightly integrated into the development workflow. Refinements to the code completion menu that incorporate additional sources of information have similarly been shown to be valuable, even relative to standalone counterparts offering similar functionality. In this paper, we describe active code completion, an architecture that allows library developers to introduce interactive and highly-specialized code generation interfaces, called palettes, directly into the editor. Using several empirical methods, we examine the contexts in which such a system could be useful, describe the design constraints governing the system architecture as well as particular code completion interfaces, and design one such system, named Graphite, for the Eclipse Java development environment. Using Graphite, we implement a palette for writing regular expressions as our primary example and conduct a small pilot study. In addition to showing the feasibility of this approach, it provides further evidence in support of the claim that integrating specialized code completion interfaces directly into the editor is valuable to professional developers.
Cyrus Omar, YoungSeok Yoon, Thomas D. LaToza, Brad A. Myers
ICSE1
2011 Active code completion
abstract
In this paper, we propose a complementary technique called active code completion. When the developer invokes the code completion menu, the editor looks for a palette definition associated with the type of the expression being entered. If found, an option to use this palette is added to the code completion menu. When the developer selects this option, source code is not inserted immediately. Instead, the palette definition takes control of the code completion interface. The developer can then interact with this interface to provide parameters and other information related to her intent, and receive immediate feedback about the effect these choices will have on the object's behavior. When the developer indicates that she is satisfied with these choices, the palette generates code that is inserted at the cursor.
Cyrus Omar, YoungSeok Yoon, Thomas D. LaToza, Brad A. Myers
VL/HCC1
2011 A Feedback Information-Theoretic Approach to the Design of Brain-Computer Interfaces
abstract
This article presents a new approach to designing brain–computer interfaces (BCIs) that explicitly accounts for both the uncertainty of neural signals and the important role of sensory feedback. This approach views a BCI as the means by which users communicate intent to an external device and models intent as a string in an ordered symbolic language. This abstraction allows the problem of designing a BCI to be reformulated as the problem of designing a reliable communication protocol using tools from feedback information theory. Here, this protocol is given by a posterior matching scheme. This scheme is not only provably optimal but also easily understood and implemented by a human user. Experimental validation is provided by an interface for text entry and an interface for tracing smooth planar curves, where input is taken in each case from an electroencephalograph during left- and right-hand motor imagery.
Cyrus Omar, Abdullah Akce, Miles Johnson, Timothy Bretl, Rui Ma 0002, Edward L. Maclin, Martin McCormick, Todd P. Coleman
Int. J. Hum. Comput. Interact.1
2008 Querying the user properly for high-performance brain-machine interfaces: Recursive estimation, control, and feedback information-theoretic perspectives
abstract
We propose a complementary approach to the design of neural prosthetic interfaces that goes beyond the standard approach of estimating desired control signals from neural activity. We exploit the fact that the for a user's intended application, the dynamics of the prosthetic in fact impact subsequent desired control inputs. We illustrate that changing the dynamic response of a prosthetic device can make specific tasks significantly easier to accomplish. Our approach relies upon principles from stochastic control and feedback information theory, and we illustrate its effectiveness both theoretically and experimentally - in terms of spelling words from a menu of characters using binary surface electromyography classification.
Cyrus Omar, Miles Johnson, Timothy Bretl, Todd P. Coleman
ICASSP1
2008 Shedding weights: More with less
abstract
Traditional connectionist models place an emphasis on learned weights. Based on neurobiological evidence, a new approach is developed and experimentally shown to be more robust for disambiguating novel combinations of stimuli. It does not require variable weights and avoids many training related issues. This approach is compared with traditional weight-learning methods. The network is better able to function in different scenarios and can recognize multiple stimuli even if it is only trained on single stimuli.
Tsvi Achler, Cyrus Omar, Eyal Amir
IJCNN2