type-directed compilation

Designs and implements compiler passes, backends, or toolchain components that use type-system information to guide lowering and code generation, inserting runtime type conversions or adaptor methods where needed. Ensures these transformations preserve program semantics and support separate compilation.

type-directedcompilation

Recent Skill Trend

Momentum and market value over time
Trending
Score
No comparison yet
-0.08
Oct 01, 2026Oct 01, 2026
Career
Value
No comparison yet
$178K/year
Oct 01, 2026Oct 01, 2026

Must-Read Papers

Most classic and influential ideas
View more

Language-Parametric Reference Synthesis (Extended)

Feb 26, 2025
DA
Daniel A. A. Pelsmaeker
🏛️ Delft University of Technology | University Of Southern Denmark | Zürich University of Applied Sciences | TNO-ESI

Modern IDEs’ automated refactoring frequently introduces name-binding errors due to the difficulty of precisely resolving reference targets under complex language binding semantics. To address this, we propose a type-system-driven approach for automatically generating inverse name-lookup functions. Our method models language type specifications using the Statix meta-DSL and leverages scope graphs to infer the syntactic structure and scoping relationships of valid references—yielding, for the first time, a language-parametric reference synthesis framework. It replaces concrete references in refactorings with semantically locked abstract references and generates equivalent concrete references on demand. We validate correctness and cross-language generality on 2,528 Java, 196 ChocoPy, and 49 Featherweight Generic Java programs. Results demonstrate significant improvements in refactoring safety and tool portability across diverse type systems.

Automated refactorings in IDEs introduce name-binding errorsAutomatic derivation of inverse lookup from type specificationsManual inverse lookup functions are complex and error-prone

Existing compiler testing techniques are often ill-suited for transpilers, as they typically lack multiple equivalent implementations and may produce non-executable output code. This work introduces metamorphic testing to transpiler validation by proposing the notion of “mutation consistency”: it defines metamorphic relations at the source-code level to verify whether structurally consistent and expected changes manifest in the generated code when the input DSL program undergoes semantics-preserving mutations. This approach enables defect detection without requiring execution of the generated code. We develop a mutation-based modeling method for metamorphic relations, a source-level structural consistency analysis mechanism, and implement an automated tool, MCP-Tester. Evaluated on real-world technology migration cases, our method effectively uncovers transpiler bugs that elude conventional fuzzing approaches.

compiler testingdomain-specific languagesmetamorphic testing

Refinement-Types Driven Development: A study

Sep 18, 2025
FD
Facundo Domínguez
🏛️ Tweag

SMT solvers are traditionally confined to formal verification, limiting their utility in everyday programming tasks—particularly in enhancing standard type checkers’ capabilities for program composition and complex scoping (e.g., compiler binders). Method: We propose deep integration of refinement types into the compiler’s static checking pipeline, leveraging SMT solvers to automatically discharge refinement constraints. Building on Liquid Haskell, we design and implement an SMT encoding prototype supporting the theory of finite maps. Contribution/Results: Our approach significantly improves type-checking precision and developer experience by enabling richer behavioral specifications and more precise reasoning within the type system. Evaluation demonstrates substantial gains in correctness and constructibility for compiler binder scopes and other realistic scenarios. The resulting static assurance mechanism bridges practical usability with formal reliability, extending SMT-based reasoning beyond verification into mainstream compilation and development workflows.

Advocating broader SMT solver use beyond formal verificationEnhancing type checkers through SMT-integrated refinement typesSimplifying programming tasks with refinement types and solvers

Establishing tool support for a concept DSL

Mar 07, 2025
NK
Nikolaj Kuhne Jakobsen
🏛️ Aarhus University

To address the challenge in software design where abstract models struggle to simultaneously achieve intuitiveness, integrability, and code translatability, this paper introduces Conceptual—a novel behavioral modeling domain-specific language (DSL) grounded in self-contained, highly reusable “concepts.” Methodologically, it formalizes the DSL’s semantics based on concepts, establishes a rigorous semantic mapping from Conceptual to Alloy to leverage Alloy’s formal verification capabilities, and implements a VS Code–based prototype toolchain supporting syntax highlighting, parsing, and model transformation. Contributions include: (1) the first formal semantics for a concept-based DSL; (2) a sound, executable translation to Alloy enabling automated consistency checking; and (3) an integrated development environment demonstrating practical usability. Empirical evaluation shows that Conceptual accurately captures design intent across diverse domains; its prototype compiler has successfully detected multiple specification errors reported in prior literature, thereby validating its expressive power, logical consistency, and engineering feasibility.

Develops a DSL for modeling software system behavior.Implements compiler for Alloy analysis tool integration.Proposes mapping strategy from Conceptual to Alloy language.

Traditional compilers face limitations in development accessibility, optimization capabilities, and application scope. This work proposes the first multidimensional classification framework for large language model (LLM)-driven compilation, offering a systematic survey of existing research through four analytical dimensions: design philosophy, methodology, level of code abstraction, and task type. The study identifies three core design paradigms—Selector, Translator, and Generator—and highlights three transformative directions: democratizing compiler development, discovering novel optimization strategies, and expanding functional boundaries. It further argues that hybrid systems represent a critical pathway forward and provides a technical roadmap for building correct, scalable, and intelligent compilation tools.

compiler correctnesscompiler optimizationhybrid systems

Latest Papers

What's happening recently
View more

Existing direct code-to-code transformation approaches often suffer from semantic drift, implicit behavioral changes, and loss of traceability. To address these issues, this work proposes a specification-based Code2Text2Code refactoring framework that first translates source code into a neutral textual specification before generating target code. The approach integrates abstract syntax tree (AST) and dependency graph analysis, semantic-aware code chunking, retrieval-augmented generation, and DSPy-based prompt tuning, further enhanced by iterative validation and graph-based formal verification. This pipeline ensures high-fidelity semantic preservation and controllable evolution during code transformation. Experimental results demonstrate that the proposed method significantly reduces transformation loss and substantially improves semantic consistency, interface stability, and cross-language traceability of the refactored code.

behavioral changesCode2Code transformationdomain logic reconstruction

Debugging static and dynamic type errors is often hindered by the lack of intuitive explanations of type inference and coercion processes. This work proposes a decomposable type highlighting mechanism, integrated for the first time into a bidirectional type system coupled with a dynamic type coercion framework, to interactively visualize type inference paths and dynamic conversion behaviors in real time through a dedicated interface. A prototype implementation in the Hazel language demonstrates the effectiveness of this approach, significantly improving developers’ ability to understand and diagnose mixed-type errors. The proposed method establishes a novel paradigm for type-level debugging, offering enhanced transparency and interactivity in reasoning about type-related program behavior.

bidirectional type systemdynamic castsinteractive interface

This work addresses the inefficiency of modern JavaScript compilers, which often waste substantial computational resources by indiscriminately applying all downlevel transformations regardless of the actual language features used. To mitigate this, the authors propose a conditional transpilation mechanism that precisely detects and dynamically tracks the set of language features employed at the script level, triggering transformations only for those features that require them. Implemented within the Google Closure Compiler, the approach integrates feature set construction, strategic pass ordering, and post-transpilation feature validation to significantly reduce unnecessary abstract syntax tree (AST) traversals. Empirical evaluation on large-scale production codebases demonstrates that the proposed method effectively decreases compilation time while reducing both memory consumption and computational overhead.

compilation efficiencyECMAScriptfeature detection

Current Software Bill of Materials (SBOM) tools struggle to comprehensively identify security vulnerabilities due to the absence of a unified standard for component identification, thereby jeopardizing software supply chain security. This work introduces the Component Introduction Mechanism (CIM) analysis framework—the first of its kind—to systematically evaluate the component detection capabilities of cdxgen, syft, trivy, ORT, and Microsoft’s sbom-tool across real-world projects in six programming languages: Python, Java, Go, PHP, Rust, and C. The study reveals that existing tools commonly suffer from incomplete CIM coverage, ambiguous component definitions, and shared blind spots, leading to significant ambiguities and omissions in generated SBOMs. These findings underscore the urgent need for community-wide consensus on component identification and provide an empirical foundation and strategic guidance for developing more reliable SBOM technologies.

component identificationcomponent inclusionSBOM ambiguity

This study addresses the lack of systematic empirical evidence on how Rust design patterns influence code quality and compile-time invariant guarantees. For the first time in Rust backend systems, we construct an evaluation framework grounded in the SQuaRE quality model by applying the typestate and newtype patterns—combined with the “Parse, don’t validate” principle—across three representative components. Our assessment integrates benchmarking, static analysis, and expert interviews. Results demonstrate that typestate significantly enhances fault tolerance and testability, albeit potentially at the cost of readability, while newtype effectively eliminates invalid runtime states with negligible overhead, substantially improving overall software quality. This work provides the first empirical foundation for the engineering application of Rust design patterns.

backend applicationscode qualitycompile-time invariants

Hot Scholars

AC

Adam Chlipala

MIT CSAIL
Programming LanguagesFormal MethodsComputer Systems
RD

Ross Duncan

Lecturer at University of Strathclyde
Quantum ComputingQuantum FoundationsCategory TheoryLogic
PW

Philip Wadler

University of Edinburgh and IOHK/IOG
Programming LanguagesType SystemsFunctional ProgrammingFormal Methods
SD

Samuel Dodson

University at Buffalo
genre studiesinformation practicescience and technology studiesSTEM education
DR

David Richter

Associate Professor of Civil and Environmental Eng. and Earth Sciences, University of Notre Dame
Air/sea interactionmultiphase turbulence simulationscomputational fluid dynamics