Chen, Xiao 陈骁

Ph.D. Student in Computer Science

I am Chen, Xiao (陈骁), a Ph.D. student in Computer Science at Indiana University Bloomington, advised by Prof. Sam Tobin-Hochstadt. My research in programming languages focuses on supporting advanced type features in gradually typed languages, where programs are partially typed, without sacrificing soundness. In particular, I am interested in designing language mechanisms and establishing formal guarantees for migratory typing — interoperability between typed and untyped modules.

The central question of my research is: How should the guarantees of advanced type features be formalized in a migratory setting, and how can operational semantics faithfully enforce those guarantees? My work addresses different dimensions of this question, from defining correctness criteria to designing enforcement mechanisms.

  • My Type as Obligations project proposes Obligation Soundness, a correctness criterion stronger than type soundness. It formalizes the type annotations associated with a value during execution as its type obligations. These obligations capture the complete runtime typing history of each value and, collectively, of an entire evaluation. This leads to the notion of obligation soundness for migratory typing semantics: throughout the evaluation of any valid input program, intermediate values must not violate their type obligations. We also propose a new criterion for blame theorems, using violated obligations as the ground truth for blame assignment.

  • My Effect-Typed-Racket project retrofits polymorphic algebraic effect handlers into Typed Racket, a production-quality typed counterpart of the Racket language, using Racket’s macro system. In addition to developing a formal semantics and establishing its correctness guarantees, we aim to show that the implementation faithfully realizes that semantics. Our approach introduces a second formal model based on Racket primitives, including delimited continuations and runtime contracts. The goal is to prove that the two models agree on the results of evaluating the same valid input, thereby establishing the correctness of the implementation.

  • For a future project, I am exploring a framework that automatically generates coordinated resource-enforcement mechanisms for the family of substructural type systems across a range of operational semantics for migratory typing. The framework would take two parameters: a substructural specification R, which determines resource obligations, and a value-enforcement semantics S, which determines ordinary type checks. It would produce an enriched semantics E(R, S). The intended composition theorem would establish that, under suitable compatibility conditions, E(R, S) enforces R while retaining the appropriate safety guarantee of S, with resource violations reported as explicit errors.

Ph.D. Opportunities — 2027 Entry

I am currently on leave from IU due to prolonged U.S. visa processing delays. I am applying for fully funded Ph.D. opportunities outside the United States for 2027 entry, with the aim of continuing and building on my existing research.

I would welcome the opportunity to discuss research fit and potential supervision with faculty working on type systems, effect handlers, or formal verification.

I received my M.S. in Computer Science from Northwestern University in 2024, where I worked with Prof. Christos Dimoulas on gradual typing and Prof. Simone Campanoni on program analysis and parallelizing compilers.

Interests
  • Programming Languages
  • Gradual Typing
  • Effect Handlers
  • Formal Verification

Ongoing Research Projects

My research in programming languages connects formal semantics with language implementation. I study how types and effects govern interactions between typed and untyped code, using operational models, runtime contracts, and mechanized proofs to understand the guarantees these interactions provide.

Type as Obligations

Migratory Typing · Interoperability · Type Obligations · Blame Theorems · Bisimulation · Vigilance · Formal Verification

Mechanized proofs in Rocq complete; manuscript in preparation.

Languages that combine static and dynamic typing use different runtime enforcement strategies: some wrap values in contracts, some merge casts, and others insert shallow checks. These choices affect not only type safety but also which boundary violations are detected and whether blame identifies the responsible boundaries. Comparing these guarantees is difficult when each semantics is analyzed using different definitions and proof techniques.

My work develops Type as Obligations (TAO), a common framework for formalizing these guarantees. Its central idea is to distinguish what a program owes to its types from how a particular semantics enforces those requirements.

Previous work on vigilance provides a related perspective: values should respect their runtime typing histories, not merely their final types. However, vigilance characterizes this requirement through a logical relation indexed by a proof-level typing history, leaving blame outside its analysis. My framework reifies typing-history obligations into an explicit obligation store, maintained by an executable profiler semantics. This makes the propagation and violation of obligations directly inspectable and brings type enforcement and blame into the same analysis.

Core Contributions

1. A uniform, executable profiler semantics for type obligations.

I introduce a profiler semantics that records the typing history of values, i.e., the type-induced boundaries they have crossed. Type obligations originate at these typed–untyped boundaries and propagate through function arguments, results, and pair projections, including higher-order interactions where runtime proxies are created, merged, or discarded. This provides a common basis for defining obligation soundness and blame correctness independently of a particular enforcement mechanism.

The profiler also makes counterexamples operationally explainable. A language designer can execute a program and inspect which requirements were violated, how they reached the affected value, and whether the reported blame matches the violated obligations. This exposes enforcement failures even when ordinary evaluation returns successfully.

2. Mechanical construction of the profiler semantics, with a proof of bidirectional correspondence.

For ordinary semantics expressed through TAO’s common interface, TAO mechanically constructs the corresponding profiler semantics by intercepting reduction steps, inserting profiling commands at appropriate points, and delegating the computational reductions back to the ordinary semantics. Individual programs require no manual instrumentation; the framework determines where obligations must be recorded and propagated.

Moreover, I prove a bidirectional correspondence between ordinary and profiler evaluation. The correspondence accommodates additional obligation-bookkeeping steps and differences in allocated locations between the two semantics. In particular, a well-typed, uniquely labeled source program terminates with a resolved value in the ordinary semantics exactly when it terminates with that same value in the profiler semantics.

This bidirectional correspondence theorem justifies using the profiler semantics to reason about ordinary evaluation. On the one hand, “profiler evaluation implies ordinary evaluation” shows that the profiler faithfully simulates ordinary evaluation without introducing behavior, apart from additional obligation-bookkeeping steps. On the other hand, “ordinary evaluation implies profiler evaluation” ensures that the profiler captures ordinary evaluation without omitting behavior; such omissions would limit the conclusions drawn from the profiler. Thus, the profiler supports reasoning about the original semantics rather than replacing it with a different computation.

3. Obligation soundness: a new enforcement criterion that implies type soundness.

We propose obligation soundness for ordinary migratory typing semantics: throughout the profiler evaluation of any valid input program, no intermediate value may violate its type obligations. Although obligation soundness is a property of the ordinary semantics, it is defined using the type obligations recorded across all possible profiler evaluations. This definition is supported by the bidirectional correspondence theorem, which connects ordinary and profiler evaluation in both directions.

I prove that obligation soundness implies type soundness. The converse does not hold: a type-sound semantics may preserve a value’s final type while discarding that value’s typing history. This distinguishes returning a correctly typed result from respecting the requirements imposed throughout execution.

4. Blame correctness: a new ground truth for blame theorems.

We also propose a new criterion for blame theorems, using violated obligations as the ground truth for blame assignment.

An obligation violation represents an unfulfilled duty; its recorded boundary provenance identifies a candidate for blame. Accordingly, blame soundness means that blamed boundaries correspond to a subsequence of violated obligations, while blame completeness means that violated obligations correspond to a subsequence of the blamed boundaries. An ordinary semantics is blame correct if and only if it is both blame sound and blame complete.

5. A formal comparison of four enforcement strategies.

We apply TAO to four enforcement strategies for migratory typing: Natural, Threesomes, Forgetful, and Transient. Using the same property definitions, we establish both positive results and explicit counterexamples for the modeled semantics:

Strategy Type Soundness Obligation Soundness Blame Soundness Blame Completeness
Natural Yes Yes Yes Yes
Threesomes Yes Yes No Yes
Forgetful Yes No Yes No
Transient No No Yes No

These results reveal substantive differences. Natural, a standard proxy-based strategy, enforces all type obligations and assigns blame correctly. Threesomes’ cast merging can report a conflict before an obligation is actually violated. Forgetful preserves result typing but loses obligation enforcement and blame completeness because it discards intermediate proxies. Transient does not use proxies to project untyped values or record their typing histories, which weakens its enforcement.

6. Mechanized metatheory and an executable model.

The framework, metatheory, and counterexamples are formalized in Rocq/Coq, with an accompanying executable Racket/Redex model. The broader contribution is a common semantic account that makes the guarantees of different enforcement strategies explicit, comparable, and machine-checked, while making their failures accessible through execution.

Migratory Typing for Algebraic Effects and Handlers

Migratory Typing · Interoperability · Effect Handlers · Typed Racket · Runtime Contracts

Prototype implemented; formal semantics and proofs in progress.

Algebraic effect handlers separate a computation’s requests from their interpretation. A computation can request an operation, such as reading input or choosing between alternatives, while an enclosing handler determines how to respond and whether to resume the computation. An effect system statically describes which operations may escape a computation and require handling by its surrounding context.

These guarantees become harder to maintain when typed code interacts with untyped code. A function declared to perform only input operations might call an untyped function that unexpectedly performs an output operation. Checking ordinary argument and result types does not detect this violation. Moreover, an effect request can pass through several function calls and module boundaries before reaching its handler.

My work investigates how to enforce effect specifications in this mixed setting of migratory typing. I am extending Typed Racket, which supports interoperability between statically typed and dynamically typed modules, with effect typing and runtime contracts. The project connects source-level effect guarantees with their realization using delimited continuations.

Core Contributions

1. Retrofitting effect typing into an existing typed language.

The prototype extends Typed Racket’s type checker to track both the values that expressions produce and the effects those expressions may perform. Function types describe the effects of calling a function; handler types describe the effects a handler handles, the result it produces, and the effects that may remain afterward.

This information must survive the existing compiler pipeline, including higher-order function calls, polymorphic instantiation, and module imports. The implementation integrates effect information into these mechanisms, allowing typed programs to check effectful computations while continuing to use Racket’s existing language infrastructure.

2. Runtime contracts that enforce escaping-effect specifications.

I implement contracts that monitor effect requests as they cross protected boundaries. For example, a function contracted to allow only a read effect is rejected if a write request escapes its execution, even when an outer handler could handle that request. Conversely, an operation handled entirely inside the function does not violate its external effect specification.

The central challenge is deciding which boundaries an operation actually crosses. Handler forwarding and continuation resumption complicate this accounting: resuming a suspended computation should not automatically attribute that computation’s effects to the handler implementation.

The contracts use Racket’s continuation mechanisms to maintain this distinction. Separate contract components check effect allowances and the values exchanged through operations and handlers. These contracts are available as a reusable library, while Typed Racket generates them from boundary types.

3. Effect declarations that work across module boundaries.

Effects must retain their identity when separately defined components interact. A handler imported from one module must recognize the same operation performed in another, including when imports are renamed or re-exported.

The prototype associates an effect declaration’s static information with its lexical binding and carries that information through Racket’s module system. This connects the operation known to the type checker with the operation recognized by the runtime, allowing effectful components to be organized and reused through ordinary module interfaces.

4. Effect-row polymorphism across typed/untyped boundaries.

Reusable higher-order functions often need to accommodate the effects of their arguments. For example, the same runner may invoke a callback that reads input or one that writes a log. Effect-row polymorphism expresses this relationship without fixing one effect allowance for every use.

The prototype supports explicit row instantiation and contracts for polymorphic functions crossing typed/untyped boundaries. Its current enforcement checks the concrete effect allowance selected at instantiation. This provides a foundation for, but does not yet establish, relational effect-row parametricity.

5. Ongoing formal work.

I am developing a high-level calculus for typed/untyped interaction with effect handlers and a lower-level calculus exposing the continuation and contract mechanisms used by the implementation. The intended results are type and effect soundness, together with a behavioral correspondence between the two levels.

A central next step is preserving effect-row abstraction across boundaries. Beyond checking a concrete set of permitted operations, this requires understanding how polymorphic code may generate, forward, or intercept effects belonging to an abstract row. The broader goal is a semantic account that connects these abstraction guarantees to an executable implementation in an existing language.

Past Research Activities

Parallelizing compilersShow detailsHide details

Program analysis · NOELLE

Previously, under the supervision of Prof. Simone Campanoni, I worked on a privatizer as part of the NOELLE project. NOELLE is a parallelizing compiler that maps sequential programs to multicore platforms to achieve nontrivial speedups.

The privatizer converts dynamic memory allocations and global variables into local variables while preserving program semantics. Local variables are more predictable than dynamically allocated memory and global variables: other functions may access that memory or those global variables even after the current function returns, making their behavior difficult to analyze. The privatizer can therefore reduce false dependencies caused by global variables and help downstream analyses identify more parallelization opportunities.

The key idea is to check that each function uses a global variable independently. Only then can we privatize the variable within the functions that use it without changing program semantics. Functions can access global variables directly by name or indirectly through pointers; our implementation must handle both cases.

For direct access, the privatizer checks that functions accessing the same global variable do not depend on values written by other functions. Each function that uses the variable must initialize it before reading its value and must not invoke other functions that use it, since those calls could change its value. For indirect access, I helped design and implement a new intraprocedural points-to analysis that checks that values written by the current function do not leak to other functions.

This work helps remove overly conservative loop-carried memory dependencies from the program dependence graph, enabling further optimizations. For example, on a loop-intensive MiBench benchmark for which NOELLE previously achieved no speedup, the privatizer enabled roughly a threefold speedup on an eight-core architecture.

Academic background

Indiana University Bloomington

Ph.D. in Computer Science

Bloomington, IN, US

Sep. 2024 - Present

Northwestern University

M.S. in Computer Science

Evanston, IL, US

Sep. 2022 - Jun. 2024

Nanjing University

M.Eng. in Electronic Information

Nanjing, Jiangsu, China

Sep. 2020 - Jun. 2022

Nanjing University

B.Eng. in Software Engineering

Nanjing, Jiangsu, China

Sep. 2016 - Jun. 2020

Misc

  • I hold a JLPT N1 certificate and have recently started learning French. 🤓
  • I have started building my own functional language, Lumière, with two intermediate representations (IRs) tentatively named Fresnel and Poisson. 🤣
  • Together with my friends, I formalized System F in Agda and proved its type soundness. 😎