Time Travel: Applying Gradual Typing to Time Types with Clang's LibTooling
summary
Google runs clang-tidy and Clang's libTooling over ~250M lines to migrate ints/doubles to absl::Time/absl::Duration, using expression simplifiers, factory-distribution, variable and inter-function rewrites and seeded overloads. Automated passes catch real bugs: mistaken milliseconds-vs-seconds that lengthen timeouts by 1000× and absurd deadlines (years instead of seconds). Tooling is mostly autonomous and converges to safer code, but requires manual seeding and work on corner cases and has cross-translation-unit limits that still need engineering.
AI-written summary · about
chapters (21)
- 0:00Introduction
- 0:50Dynamically typed code
- 3:17Types
- 9:35Time Programming Fundamentals
- 10:06Abseil Time Library
- 14:33Gradual Typing
- 17:13Things that dont work
- 20:58Expressionbased transformations
- 22:29Simplification
- 30:08Addition
- 33:36Distribution
- 35:58Conversion
- 37:10Timeout
- 38:06Class variables
- 41:09Return Values
- 43:56RPC Framework
- 44:40RPC Configuration
- 45:03The Bug
- 46:46The Point
- 51:47What do people think
- 54:53How hard was it
related talks
24mRefactoring Legacy Codebases with LibTooling
01h 01mHow to Refactor Millions of Line of Code Without Alienating your Colleagues
01h 01mTools from the C++ Ecosystem to save a leg
01h 05mImprove your code with Clang Tooling
49mPets, Cattle and Automatic Clang Operations with C++ Code
01h 00mAdvanced Tools for Better Productivity
59mMechanical C++ Refactoring in the Present and in the Future
57mHow Hard Could It Be? int64 → int64_t
