VarSem: Declarative Expression and Automated Inference of Variable Usage Semantics
summary
VarSem is a DSL that declaratively encodes variable-usage semantics and automatically infers likelihoods by combining textual NLP with data/control-flow context, implemented in Scala + LLVM. On eight real-world projects it achieves far higher precision and recall than name-only string matching (example: a variable scored 95.7% vs another at 0.3% for password likelihood), finds vulnerable cases in Yubico PAM, and requires little code to write rules — about 6 lines of VarSem versus hundreds or thousands otherwise.
AI-written summary · about
chapters (13)
- 0:00Intro
- 0:21Understand Words
- 0:56Variable Usage Semantic
- 3:03Scenario - Identify Passwords
- 5:41VarSem Overview
- 6:25Executing VarSem Programs
- 7:03Enabling Techniques
- 8:08NLP-Powered Textual Analysis --- Rationale
- 10:04Analysis Process - Preprocessing
- 10:47Analysis Process - Entire Process
- 13:29Evaluation --- Correctness Results
- 15:06Evaluation --- Effectiveness Results
- 15:28Evaluation - - Programming Efforts
related talks
57mVariant analysis
29mLanguage-parametric static semantic code completion
15mLanguage-Parametric Reference Synthesis
57mBuilding code analysis tools at Twitter
13mParrot: Efficient Serving of LLM-based Applications with Semantic Variable
22mEasier Lint Authoring with Semantic Search and (...)
09mHow patterns in variable names can make code easier to read
15mJoeWingbermuehle
