Repository Analysis

verus-lang/verus

Verified Rust for low-level systems code

2.7 Likely human-written View on GitHub

Analysis Overview

This report presents the forensic synthetic code analysis of verus-lang/verus, a Rust project with 2,722 GitHub stars. SynthScan v2.0 examined 507,368 lines of code across 1278 source files, recording 1081 pattern matches distributed across 11 syntactic categories. The overall adjusted score of 2.7 places this repository in the Likely human-written band.

The scanner applied 160+ deterministic lexical heuristics, multi-line block detectors, abstract syntax tree depth profilers, and a cross-file Jaccard similarity matrix to construct a statistically normalised synthetic code estimate. All matches are individually weighted by severity coefficient and contextual multiplier before summation, and the resulting headline score is temporally discounted to account for the repository's development history relative to the commercial emergence of large language model coding tooling (November 2022 onward).

2.7
Adjusted Score
2.7
Raw Score
100%
Time Factor
2026-07-14
Last Push
2.7K
Stars
Rust
Language
507.4K
Lines of Code
1.3K
Files
1.1K
Pattern Hits
2026-07-14
Scan Date
0.01
HC Hit Rate

What These Metrics Mean

Adjusted Score
Primary synthetic code indicator. Raw score normalised per 1,000 lines of code and multiplied by the temporal discount factor. This is the definitive comparative metric — use it to rank repositories by AI authorship density.
Raw Score
The unmodified sum of all severity-weighted, context-multiplied pattern match scores before temporal discounting. Reflects the absolute signal strength independent of when the repository was last active.
Time Factor
The temporal discount multiplier (0–100%) applied to the raw score. Repositories last updated before ChatGPT's launch (Nov 2022) receive a 5% factor. Full signal is only assigned to repositories active in the post-adoption era (Jan 2024+).
Pattern Hits
Total count of individual pattern matches across all files and categories. A high hit count with a low score may indicate a very large codebase with isolated AI snippets; a low count with a high score indicates dense, concentrated AI signatures.
HC Hit Rate
High+Critical pattern hits per file, averaged across the repository. This orthogonal signal catches repositories where a few files are densely packed with high-severity AI tells — a strong indicator even when the normalised score appears moderate due to codebase size.
Lines of Code / Files
Total lines and files analysed. The scanner examines 94 file extensions. These denominators are used to normalise the score, enabling fair comparison between repositories of vastly different sizes.

Score History

Longitudinal tracking requires multiple scan runs. Once this repository is re-scanned after new commits land, this chart will visualise how the synthetic code signal evolves over time — enabling you to detect whether AI authorship is growing, stabilising, or being actively corrected by human engineers.

No multi-scan history yet — run the scanner again to build trend data.

Severity Breakdown

Classifies detected patterns by their diagnostic confidence and structural impact. CRITICAL patterns (coefficient 10) represent definitive synthetic signatures — hallucinated imports, explicit LLM attribution metadata — virtually never produced by human authors. HIGH (5) indicates strong structural tells such as cross-file repetition or cross-linguistic idioms. MEDIUM (2) covers recognisable conversational padding and AI-specific vocabulary. LOW (1) captures subtle indicators like tautological comments and generic boilerplate that require density to carry independent signal.

CRITICAL 19HIGH 0MEDIUM 54LOW 1008

Directory Score Breakdown

This horizontal bar chart decomposes the repository's raw synthetic code score by top-level directory, allowing you to pinpoint precisely which modules or components carry the highest AI authorship density. Directories with disproportionately high scores relative to their size warrant targeted manual review: concentrated AI signatures often trace back to mass-generated configuration layers, auto-ported test suites, LLM-scaffolded boilerplate classes, or entire subsystems authored under heavy copilot assistance. Use this view to prioritise your human code-review effort.

Pattern Findings

The scanner identified 1081 distinct pattern matches across 11 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a statistically significant AI authorship indicator. Expand any category row to inspect the individual file paths, line numbers, code snippets, and the lexical context (CODE, COMMENT, or STRING) in which each match was detected.

Reading the findings table: The Severity column indicates the diagnostic confidence level (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — comment-context matches receive a ×1.5 weight because LLMs systematically over-annotate. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier as dense clusters constitute far stronger evidence of synthetic authorship than isolated hits.

Over-Commented Block981 hits · 934 pts
SeverityFileLineSnippetContext
LOWtools/vargo/src/util.rs1// Some of the code in this file is copied from https://github.com/rust-lang/cargo/blob/cee088b0db01076deb11c037fe8b64b2COMMENT
LOWtools/verita/src/main.rs21 /// Base of the Verus repositoryCOMMENT
LOWsource/Cargo.toml41# correctness/perf/suspicious are the priority groupsCOMMENT
LOWsource/verusdoc/src/main.rs61COMMENT
LOWsource/verusdoc/src/main.rs81 // </div>COMMENT
LOWsource/tools/coverage.sh1#!/usr/bin/env bashCOMMENT
LOWsource/tools/bump_crate_versions/src/main.rs21/// is modified, we also update the version in the cargo-verus template. The code is optimizedCOMMENT
LOWsource/vstd/simple_pptr.rs1use super::layout::*;COMMENT
LOWsource/vstd/simple_pptr.rs21/// to and from the `usize` address. What _really_ matters is the type paramter of theCOMMENT
LOWsource/vstd/simple_pptr.rs41/// * [`MemContents::Init(v)`](raw_ptr::MemContents::Init) if the memory points-to theCOMMENT
LOWsource/vstd/simple_pptr.rs61/// // ALLOCATECOMMENT
LOWsource/vstd/simple_pptr.rs81///COMMENT
LOWsource/vstd/simple_pptr.rs101///COMMENT
LOWsource/vstd/simple_pptr.rs121/// // ALLOCATE pCOMMENT
LOWsource/vstd/simple_pptr.rs141/// * Since `PPtr` is just a pointer (represented by an integer), it can be `Copy`.COMMENT
LOWsource/vstd/simple_pptr.rs181 /// Cast a pointer to an integer.COMMENT
LOWsource/vstd/pervasive.rs61 spec fn ghost_ensures(&self) -> bool;COMMENT
LOWsource/vstd/pervasive.rs161/// if (a >= 50) {COMMENT
LOWsource/vstd/pervasive.rs221/// `assert_by_contradiction!(b, { /* proof */ });`COMMENT
LOWsource/vstd/pervasive.rs261/// level, while `K` allows the user to configure the invariant upon construction.COMMENT
LOWsource/vstd/pervasive.rs281///COMMENT
LOWsource/vstd/pervasive.rs301/// The user can also provide boolean predicate declarations, which are copied verbatimCOMMENT
LOWsource/vstd/pervasive.rs321///COMMENT
LOWsource/vstd/pervasive.rs341/// The graph of dependencies across all fields must be acyclic.COMMENT
LOWsource/vstd/pervasive.rs361///COMMENT
LOWsource/vstd/tokens.rs21};COMMENT
LOWsource/vstd/tokens.rs61 /// Though the first argument is mutable, the value is not really mutated;COMMENT
LOWsource/vstd/tokens.rs101COMMENT
LOWsource/vstd/tokens.rs181/// | VerusSync Strategy | Field type | Token trait |COMMENT
LOWsource/vstd/tokens.rs221/// Interface for VerusSync tokens created for a field marked with the `bool` orCOMMENT
LOWsource/vstd/layout.rs21COMMENT
LOWsource/vstd/layout.rs121 size_of::<V>() as usize as nat == size_of::<V>(),COMMENT
LOWsource/vstd/utf8.rs1//! Definitions for UTF-8 encoding and decoding of character sequences.COMMENT
LOWsource/vstd/iset_lib.rs41 /// we can write either `s.map(|i: int| (i, 10 * i))`COMMENT
LOWsource/vstd/iset_lib.rs1461}COMMENT
LOWsource/vstd/cell.rs21COMMENT
LOWsource/vstd/cell.rs41///COMMENT
LOWsource/vstd/set_lib.rs41 /// such that `rev(fwd(a)) == a`.COMMENT
LOWsource/vstd/set_lib.rs1361/// assert_sets_equal!(set1 == set2);COMMENT
LOWsource/vstd/thread.rs61///COMMENT
LOWsource/vstd/thread.rs81///COMMENT
LOWsource/vstd/vstd.rs1//! The "standard library" for [Verus](https://github.com/verus-lang/verus).COMMENT
LOWsource/vstd/vstd.rs141 std_specs::vecdeque::group_vec_dequeue_axioms,COMMENT
LOWsource/vstd/atomic_ghost.rs221/// [`AtomicI64`], [`AtomicI32`], [`AtomicI16`], [`AtomicI8`], and [`AtomicBool`].COMMENT
LOWsource/vstd/atomic_ghost.rs241/// Here, the `$operation_name` is one of `load`, `store`, etc. Meanwhile,COMMENT
LOWsource/vstd/atomic_ghost.rs261/// | `compare_exchange_weak(x, y)` | `prev == x && next == y && ret == Ok(prev)` ("success") OR<br> `next == prev && reCOMMENT
LOWsource/vstd/atomic_ghost.rs281///COMMENT
LOWsource/vstd/atomic_ghost.rs301/// let result = atomic_with_ghost!(COMMENT
LOWsource/vstd/imap.rs1#![allow(unused_imports)]COMMENT
LOWsource/vstd/imap.rs21/// * [`IMap::empty()`] constructs an empty map.COMMENT
LOWsource/vstd/imap.rs381///COMMENT
LOWsource/vstd/imap.rs401///COMMENT
LOWsource/vstd/seq.rs121 }COMMENT
LOWsource/vstd/seq.rs201 /// ```rustCOMMENT
LOWsource/vstd/seq.rs221 /// }COMMENT
LOWsource/vstd/seq.rs261 self.subrange(n, self.len() as int)COMMENT
LOWsource/vstd/function.rs1use super::prelude::*;COMMENT
LOWsource/vstd/multiset.rs21///COMMENT
LOWsource/vstd/multiset.rs41// (1) representing multiplicity by an ordinal or cardinal or somethingCOMMENT
LOWsource/vstd/multiset.rs81 /// the resulting multiset is the sum of its multiplicities in the operands.COMMENT
921 more matches not shown…
Hallucination Indicators19 hits · 190 pts
SeverityFileLineSnippetContext
CRITICALsource/vir/src/sst_to_air.rs2103 .map(|fun| fun.x.ret.x.typ.clone());CODE
CRITICALsource/vir/src/ast_simplify.rs1085 typ: function.x.ret.x.typ.clone(),CODE
CRITICALsource/vir/src/ast_simplify.rs1109 name: function.x.ret.x.name.clone(),CODE
CRITICALsource/vir/src/ast_simplify.rs1110 a: function.x.ret.x.typ.clone(),CODE
CRITICALsource/vir/src/headers.rs556 let mut name = method.x.name.path.segments.last().expect("method name last").to_string();CODE
CRITICALsource/vir/src/headers.rs565 let name = method.x.name.path.segments.last().expect("method name last").to_string();CODE
CRITICALsource/vir/src/ast_to_sst_func.rs278 function.x.ret.x.typ.clone(),CODE
CRITICALsource/vir/src/ast_to_sst_func.rs329 function.x.ret.x.typ.clone(),CODE
CRITICALsource/vir/src/ast_to_sst_func.rs373 name: function.x.ret.x.name.clone(),CODE
CRITICALsource/vir/src/ast_to_sst_func.rs375 typ: function.x.ret.x.typ.clone(),CODE
CRITICALsource/vir/src/ast_to_sst_func.rs678 .insert(trait_function.x.ret.x.name.clone(), function.x.ret.x.name.clone());CODE
CRITICALsource/vir/src/ast_to_sst_func.rs934 let non_default_ensure = &lo_inheritance.function.x.ensure.0.clone();CODE
CRITICALsource/vir/src/ast_to_sst_func.rs948 for expr in lo_current.function.x.ensure.0.iter().chain(lo_current.function.x.ensure.1.iter()) {CODE
CRITICALsource/state_machines_macros/src/lemmas.rs110 if l.func.sig.generics.params.len() > 0 {CODE
CRITICALsource/rustc_mir_build/src/builder/mod.rs272 let ids = (id.0.owner.def_id.local_def_index.as_usize(), id.0.local_id);CODE
CRITICALsource/rustc_mir_build/src/builder/mod.rs277 dbg!(real_id.0.owner.def_id.local_def_index.as_usize());CODE
CRITICAL…build_additional_files/verus_time_travel_prevention.rs1202 let v_id = v.0.owner.def_id.local_def_index.as_usize();CODE
CRITICAL…build_additional_files/verus_time_travel_prevention.rs1214 let v_id = v.0.owner.def_id.local_def_index.as_usize();CODE
CRITICAL…build_additional_files/verus_time_travel_prevention.rs1233 v.0.owner.def_id.local_def_index.as_usize() + mod_idx,CODE
Decorative Section Separators42 hits · 152 pts
SeverityFileLineSnippetContext
MEDIUMtools/verita/scripts/summarize.py124# ── Single-run output ──────────────────────────────────────────────────────────COMMENT
MEDIUMtools/verita/scripts/summarize.py195# ── Single-run Markdown output ────────────────────────────────────────────────COMMENT
MEDIUMtools/verita/scripts/summarize.py250# ── Error summary (Markdown only) ─────────────────────────────────────────────COMMENT
MEDIUMtools/verita/scripts/summarize.py295# ── Two-run comparison output ──────────────────────────────────────────────────COMMENT
MEDIUMtools/verita/scripts/summarize.py500# ── Two-run comparison Markdown output ────────────────────────────────────────COMMENT
MEDIUMtools/verita/scripts/summarize.py619# ── Main ───────────────────────────────────────────────────────────────────────COMMENT
MEDIUMtools/verita/src/dependencies.rs99 // ── String form ──────────────────────────────────────────────────────────COMMENT
MEDIUMtools/verita/src/dependencies.rs112 // ── Table form ───────────────────────────────────────────────────────────COMMENT
MEDIUMsource/docs/guide/custom-admonitions.py9# ---------------------------------------------------------------------------COMMENT
MEDIUMsource/docs/guide/custom-admonitions.py11# ---------------------------------------------------------------------------COMMENT
MEDIUMsource/docs/guide/verus-grammar.py67# ---------------------------------------------------------------------------COMMENT
MEDIUMsource/docs/guide/verus-grammar.py69# ---------------------------------------------------------------------------COMMENT
MEDIUMsource/docs/guide/verus-grammar.py188# ---------------------------------------------------------------------------COMMENT
MEDIUMsource/docs/guide/verus-grammar.py190# ---------------------------------------------------------------------------COMMENT
MEDIUMsource/docs/guide/verus-grammar.py299# ---------------------------------------------------------------------------COMMENT
MEDIUMsource/docs/guide/verus-grammar.py301# ---------------------------------------------------------------------------COMMENT
MEDIUMsource/rustc_mir_build/src/builder/block.rs111 // ┌─────────────────────────────────┐COMMENT
MEDIUMsource/rustc_mir_build/src/builder/block.rs114 // │ ┌───────────────────────────┐ │COMMENT
MEDIUMsource/rustc_mir_build/src/builder/block.rs116 // │ └───────────────────────────┘ │COMMENT
MEDIUMsource/rustc_mir_build/src/builder/block.rs117 // │ ┌───────────────────────────┐ │COMMENT
MEDIUMsource/rustc_mir_build/src/builder/block.rs120 // │ │ ┌─────────────────────┐ │ │COMMENT
MEDIUMsource/rustc_mir_build/src/builder/block.rs122 // │ │ └─────────────────────┘ │ │COMMENT
MEDIUMsource/rustc_mir_build/src/builder/block.rs126 // │ │ ┌─────────────────────┐ │ │COMMENT
MEDIUMsource/rustc_mir_build/src/builder/block.rs128 // │ │ └─────────────────────┘ │ │COMMENT
MEDIUMsource/rustc_mir_build/src/builder/block.rs129 // │ └───────────────────────────┘ │COMMENT
MEDIUMsource/rustc_mir_build/src/builder/block.rs130 // └─────────────────────────────────┘COMMENT
MEDIUMsource/rustc_mir_build/src/builder/block.rs134 // ┌────────▼───────┐COMMENT
MEDIUMsource/rustc_mir_build/src/builder/block.rs136 // └────────┬───────┘COMMENT
MEDIUMsource/rustc_mir_build/src/builder/block.rs137 // │ ┌────────────────┐COMMENT
MEDIUMsource/rustc_mir_build/src/builder/block.rs138 // ┌────────▼───────┐ │Drop temporaries│COMMENT
MEDIUMsource/rustc_mir_build/src/builder/block.rs139 // │Test the pattern├──────►in y() │COMMENT
MEDIUMsource/rustc_mir_build/src/builder/block.rs140 // └────────┬───────┘ │because breaking│COMMENT
MEDIUMsource/rustc_mir_build/src/builder/block.rs142 // ┌────────▼───────┐ │scope │COMMENT
MEDIUMsource/rustc_mir_build/src/builder/block.rs143 // │Move value into │ └───────┬────────┘COMMENT
MEDIUMsource/rustc_mir_build/src/builder/block.rs145 // └────────┬───────┘ ┌───────▼────────┐COMMENT
MEDIUMsource/rustc_mir_build/src/builder/block.rs147 // ┌────────▼───────┐ │temporaries in │COMMENT
MEDIUMsource/rustc_mir_build/src/builder/block.rs151 // │out of <expr> │ └───────┬────────┘COMMENT
MEDIUMsource/rustc_mir_build/src/builder/block.rs153 // └────────┬───────┘ ┌───────▼────────┐COMMENT
MEDIUMsource/rustc_mir_build/src/builder/block.rs154 // │ │Enter <else> ├────────►COMMENT
MEDIUMsource/rustc_mir_build/src/builder/block.rs155 // ┌────────▼───────┐ │block │ return;COMMENT
MEDIUMsource/rustc_mir_build/src/builder/block.rs156 // │Continue... │ └────────────────┘COMMENT
MEDIUMsource/rustc_mir_build/src/builder/block.rs157 // └────────────────┘COMMENT
AI Slop Vocabulary12 hits · 35 pts
SeverityFileLineSnippetContext
MEDIUMsource/vstd/arithmetic/internals/mod_internals.rs306/// and `r == x % n`. Essentially, this is the converse of theCOMMENT
MEDIUMsource/builtin_macros/src/attr_rewrite.rs1152// function body, to enable seamless use of unverified call to the function inCOMMENT
MEDIUMsource/builtin_macros/src/lib.rs591/// Below is a non-exhaustive list of supported spec expressions. Items marked with a \* utilize unverified translationsCOMMENT
MEDIUMsource/rust_verify_test/tests/bitvector.rs202 ensures(forall |i: u64| (1u64 << i) > 0); // Although this line should be reported instead of the above lineCODE
MEDIUMsource/vir/src/resolution_types.rs76 /// Definitely has no resolvedness, no need to recurse (e.g., &T)COMMENT
MEDIUMsource/vir/src/well_formed.rs797 // REVIEW: not robust to normalizationCOMMENT
MEDIUMsource/vir/src/interpreter.rs715// TODO: Make the matching here more robust to changes in vstdCOMMENT
MEDIUMsource/vir/src/interpreter.rs807// TODO: Make the matching here more robust to changes in vstdCOMMENT
MEDIUMsource/vir/src/interpreter.rs841// TODO: More robust way of pointing to vstd's sequence functionsCOMMENT
MEDIUMsource/state_machines_macros/src/simplify_asserts.rs8/// Essentially, we replaceCOMMENT
MEDIUMsource/rustc_mir_build/src/thir/pattern/check_match.rs308 // Essentially a field access.COMMENT
MEDIUMexamples/guide/higher_order_fns.rs183 // Inside the closure, we have seamless access toCOMMENT
Structural Annotation Overuse6 hits · 9 pts
SeverityFileLineSnippetContext
LOWBUILD.md18## Step 1: Setup Z3COMMENT
LOWBUILD.md35## Step 2: Ensure you have a recent rustup installedCOMMENT
LOWBUILD.md41## Step 3: Build VerusCOMMENT
LOWsource/state_machines_macros/src/simplification.rs180 // Step 1: Collect any field which is newly updated in any branch.COMMENT
LOWsource/state_machines_macros/src/simplification.rs192 // Step 2: For each field and each branch, check if it needs to beCOMMENT
LOWsource/rustc_mir_build_additional_files/verus.rs1208// Step 1: Get the Verus capture setCOMMENT
Example Usage Blocks4 hits · 6 pts
SeverityFileLineSnippetContext
LOWsource/rust_verify_test/tests/fndef_types.rs999 // Example usageCOMMENT
LOWsource/rust_verify_test/tests/fndef_types.rs1079 // Example usageCOMMENT
LOWexamples/statics.rs150// Example usageCOMMENT
LOWexamples/state_machines/tutorial/unverified_rc.rs61// Example usageCOMMENT
Verbosity Indicators4 hits · 6 pts
SeverityFileLineSnippetContext
LOWsource/state_machines_macros/src/simplification.rs180 // Step 1: Collect any field which is newly updated in any branch.COMMENT
LOWsource/state_machines_macros/src/simplification.rs192 // Step 2: For each field and each branch, check if it needs to beCOMMENT
LOWsource/rust_verify/src/external.rs645/// So when we come across an autoderive struct, we need to check ifCOMMENT
LOWsource/rustc_mir_build_additional_files/verus.rs1208// Step 1: Get the Verus capture setCOMMENT
Deep Nesting5 hits · 5 pts
SeverityFileLineSnippetContext
LOWtools/verita/scripts/summarize.py10CODE
LOWsource/docs/guide/custom-admonitions.py22CODE
LOWsource/docs/guide/verus-grammar.py71CODE
LOWsource/docs/guide/verus-grammar.py203CODE
LOWsource/docs/guide/verus-grammar.py78CODE
Fake / Example Data4 hits · 4 pts
SeverityFileLineSnippetContext
LOWsource/vstd/map.rs50 dummy_key: core::marker::PhantomData<K>,CODE
LOWsource/vstd/map.rs51 dummy_value: core::marker::PhantomData<V>,CODE
LOWsource/rustc_mir_build/src/builder/scope.rs299 let fake_data =CODE
LOWsource/rustc_mir_build/src/builder/scope.rs301 let drop_nodes = IndexVec::from_raw(vec![DropNode { data: fake_data, next: DropIdx::MAX }]);CODE
TODO Padding2 hits · 3 pts
SeverityFileLineSnippetContext
LOWsource/builtin_macros/src/contrib/exec_spec.rs164 // TODO: implement ExecSpecType for Option<T> so thatCOMMENT
LOWsource/builtin/src/lib.rs642 // TODO: implement this (using unsafe) or mark function as ghost (if supported by Rust)COMMENT
Hyper-Verbose Identifiers2 hits · 2 pts
SeverityFileLineSnippetContext
LOWtools/verita/scripts/summarize.py502def print_comparison_summary_md(old_results, new_results):CODE
LOWtools/verita/scripts/analyze.py75def read_json_files_into_projects(directory):CODE