A new arXiv paper describes a way to audit code using large language models. The core idea is to read code not just for what it does, but for what it reveals about what the developer expected could happen. A null pointer check, for example, signals that the developer believed a pointer might not be initialized.
The paper argues that once such assumptions are inferred, later code can be checked against them. If the same pointer is used later without a null pointer check, that is a potential violation of the developer's own implicit contract. The proposed system uses an LLM to carry out this inference and evaluation.
The example in the abstract is specific to null pointer checks, but the framing suggests a broader principle: code auditing can be reframed as consistency checking between assumptions and usage. As an arXiv preprint, the work has not yet undergone formal peer review.