Grant: Discovery Grants Program - Individual
The University of British Columbia
$52,000.00
Advances in Sound Gradual Typing
EF 2023-24
Résumé
To help developers prevent defects and ensure that software behaves properly, all programming languages provide compile-time (static) or runtime (dynamic) type checks. Static type checks, as seen in Java, guarantee the absence of some kinds of errors before a program is even run. However, programs cannot run until the entire program type checks, and some programs that have no errors are rejected when the type checker is not sophisticated enough. Dynamic type checks, as seen in JavaScript, catch errors as they happen at runtime. This allows programmers to quickly prototype, experiment with, and fix code in response to specific failures, but these runtime checks only detect errors encountered during a specific run of a program: errors they miss may strike users after the software is released. Programmers need both kinds of checks, and too often having to choose between them compromises the correctness and security of software. My research investigates gradual typing, which seamlessly integrates both static and dynamic checks into languages, to combine the benefits and mitigate the deficits of both. Increasingly popular languages like Microsoft's TypeScript partially support gradual typing, but they do not provide the same guarantees that static type systems do. My short-term objectives will help unlock the full potential of gradual typing by developing theory, design methodologies, and prototype implementations that support many gradual type disciplines. RO1: Language Implementation Methodology Language designers use formal specifications (specs) to prove that a gradual type system provides reliable guarantees, but these specs provide little guidance on how to effectively implement these languages. We will develop general principles for transforming language specs from a tool for proving language properties to a blueprint for practical implementation, and we will develop techniques for automatically and manually tuning the runtime behaviour of programs. RO2: Better Support for Dynamic Language Idioms New languages like TypeScript add static checks to older dynamic languages like JavaScript. However, people program differently in dynamic and static languages, so most static checking regimes reject too many correct dynamic language programs. We will extend gradual set-theoretic types to help language designers introduce static checks that accept dynamic idioms. RO3: Informative, Actionable Runtime Type Errors When gradual type checks fail at runtime, the resulting error reports often mislead developers by failing to identify the root causes of the failure. We will develop theories, methodologies, and tools that provide informative and actionable error diagnostics. Together, these advances will enable language designers and implementors to add powerful checking disciplines to languages, and enable developers to adopt these checks incrementally in existing systems and wholesale in new ones.
Programme
Discovery Grants Program - Individual
Bénéficiaire
Emplacement
British Columbia, Canada
Type de bénéficiaire
Academia
Type
Grant
Source
NSERC's Awards Data
Tel que publié
Application id
RGPIN-2023-05255
Name nom
Garcia, Ronald
Department département
Computer Science
Organization id
2
Institution établissement
The University of British Columbia
Province en
British Columbia
Province fr
Colombie-Britannique
Country en
CANADA
Country fr
CANADA
Fiscal year exercice financier
2023
Competition year année de concours
2023
Award amount
52000
Program id
RGPIN
Program name en
Discovery Grants Program - Individual
Program name fr
Programme de subventions à la découverte - individuelles
Group en
DISCOVERY RESEARCH
Group fr
RECHERCHE AXÉE SUR LA DÉCOUVERTE
Committee code
1507
Committee name en
Computer Science
Committee name fr
Sciences informatiques
Area of application code
801
Area of application group en
Information and communication services
Area of application group fr
Services d'information et de télécommunications
Area of application en
Computer software
Area of application fr
Logiciel
Research subject code
2700
Research subject group en
Information technology
Research subject group fr
Information technology
Research subject en
Technologie de l'information
Research subject fr
Technologie de l'information
Application title
Advances in Sound Gradual Typing
Keyword
Dynamic Languages; Gradual Typing; Semantics; Type Systems
Application summary
To help developers prevent defects and ensure that software behaves properly, all programming languages provide compile-time (static) or runtime (dynamic) type checks. Static type checks, as seen in Java, guarantee the absence of some kinds of errors before a program is even run. However, programs cannot run until the entire program type checks, and some programs that have no errors are rejected when the type checker is not sophisticated enough. Dynamic type checks, as seen in JavaScript, catch errors as they happen at runtime. This allows programmers to quickly prototype, experiment with, and fix code in response to specific failures, but these runtime checks only detect errors encountered during a specific run of a program: errors they miss may strike users after the software is released. Programmers need both kinds of checks, and too often having to choose between them compromises the correctness and security of software. My research investigates gradual typing, which seamlessly integrates both static and dynamic checks into languages, to combine the benefits and mitigate the deficits of both. Increasingly popular languages like Microsoft's TypeScript partially support gradual typing, but they do not provide the same guarantees that static type systems do. My short-term objectives will help unlock the full potential of gradual typing by developing theory, design methodologies, and prototype implementations that support many gradual type disciplines. RO1: Language Implementation Methodology Language designers use formal specifications (specs) to prove that a gradual type system provides reliable guarantees, but these specs provide little guidance on how to effectively implement these languages. We will develop general principles for transforming language specs from a tool for proving language properties to a blueprint for practical implementation, and we will develop techniques for automatically and manually tuning the runtime behaviour of programs. RO2: Better Support for Dynamic Language Idioms New languages like TypeScript add static checks to older dynamic languages like JavaScript. However, people program differently in dynamic and static languages, so most static checking regimes reject too many correct dynamic language programs. We will extend gradual set-theoretic types to help language designers introduce static checks that accept dynamic idioms. RO3: Informative, Actionable Runtime Type Errors When gradual type checks fail at runtime, the resulting error reports often mislead developers by failing to identify the root causes of the failure. We will develop theories, methodologies, and tools that provide informative and actionable error diagnostics. Together, these advances will enable language designers and implementors to add powerful checking disciplines to languages, and enable developers to adopt these checks incrementally in existing systems and wholesale in new ones.