diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index de0cdadb05..bf0e621ac0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -36,14 +36,17 @@ jobs: run_code=false while IFS= read -r -d '' path; do case "$path" in - README.md|*/README.md|docs/*.md|docs/assets/*.png|docs/ase2025/*.pdf) ;; + README.md|*/README.md|CONTRIBUTING.md|LICENSE|CITATION.cff) ;; + docs/*.md|docs/assets/*.png|docs/assets/*.svg|docs/ase2025/*.pdf) ;; + site/*|.github/workflows/pages.yml) ;; + .github/ISSUE_TEMPLATE/*|.github/pull_request_template.md) ;; *) run_code=true; break ;; esac done < <(git diff --name-only --no-renames -z "$BASE_SHA" HEAD) fi echo "run_code=$run_code" >> "$GITHUB_OUTPUT" if [[ "$run_code" == "false" ]]; then - echo "Documentation-only change: patch whitespace checked; Rust checks skipped." >> "$GITHUB_STEP_SUMMARY" + echo "Documentation, website, or repository metadata only: patch whitespace checked; Rust checks skipped." >> "$GITHUB_STEP_SUMMARY" fi - name: Install the pinned compiler and components if: steps.scope.outputs.run_code == 'true' diff --git a/.github/workflows/pages.yml b/.github/workflows/pages.yml index 34d09448c5..911b88eb09 100644 --- a/.github/workflows/pages.yml +++ b/.github/workflows/pages.yml @@ -22,6 +22,8 @@ jobs: - uses: actions/checkout@v4 with: persist-credentials: false + - name: Check JavaScript syntax + run: node --check site/main.js - name: Check static assets and fragment links run: | python3 - <<'PY' diff --git a/README.md b/README.md index cccd80c26b..8f44221bf1 100644 --- a/README.md +++ b/README.md @@ -1,16 +1,72 @@ -# PALM +

PALM

-**Rust tests, guided by program analysis.** +

Rust tests, guided by program analysis.

-[![Website](https://img.shields.io/badge/website-PALM-5941bc)](https://cppbear.github.io/PALM/) -[![License: MIT](https://img.shields.io/badge/license-MIT-5941bc)](LICENSE) -[![Build and test](https://github.com/cppbear/PALM/actions/workflows/ci.yml/badge.svg)](https://github.com/cppbear/PALM/actions/workflows/ci.yml) +

+ Website + License: MIT + Build and test +

+ +

+ Website & interactive demo · + Quick start · + Paper · + 中文技术指南 +

PALM generates Rust tests by combining program analysis with large language models. It extracts path constraints and code context, generates candidates, repairs compilation errors, and reports execution results and coverage with test code excluded. -This is the maintained implementation of ***PALM: Synergizing Program Analysis and LLMs to Enhance Rust Unit Test Coverage***, published at ASE 2025. The current code includes changes made after the paper's experiments. +This is the maintained implementation of the [ASE 2025 paper](#citation), with changes made after the paper's experiments. + + + + + Offline example: input 2 follows classify's true branch and returns 1; a fixed local response supplies assert_eq!(classify(2), 1). + + + +*Illustration of the [minimal offline fixture](examples/minimal/README.md), using fixed local responses. It does not measure model quality. [Explore both paths on the website](https://cppbear.github.io/PALM/).* + +## Quick start + +First complete the [prerequisites](#prerequisites): Git, Rust, a C linker, Python 3.9+, and the pinned analysis and coverage tools. Then run the minimal pipeline without API keys: + +```sh +git clone https://github.com/cppbear/PALM.git +cd PALM +cargo build --workspace --locked +python3 scripts/check_minimal.py +``` + +The script works in temporary copies, prints their location, and finishes with: + +```text +Minimal analysis/generation/repair/coverage checks passed. +``` + +See [minimal pipeline validation](docs/minimal-pipeline.md) for the checked scenarios. For a real model, [install PALM](#installation), [select a runtime configuration](utgen/README.md#prerequisites), and follow a [bounded example](examples/README.md). + +## Prerequisites + +Use a native build environment with Git, [rustup](https://rustup.rs/), stable Rust, a C linker, and Python 3.9 or later for the validation scripts. Tool and dependency downloads may require network access. -[Website](https://cppbear.github.io/PALM/) · [Quick start](#quick-start) · [Examples](examples/README.md) · [CLI reference](utgen/README.md) · [中文技术指南](docs/palm-rust-unit-test-generation.md) · [Paper](https://doi.org/10.1109/ASE63991.2025.00223) · [Preprint](https://arxiv.org/abs/2506.09002) +1. Install the pinned analysis toolchain and components: + + ```sh + rustup toolchain install nightly-2025-03-19 --profile minimal \ + --component rust-src --component rustc-dev --component llvm-tools-preview --component rust-analyzer + ``` + +2. Install [cargo-llvm-cov](https://github.com/taiki-e/cargo-llvm-cov): + + ```sh + cargo +stable install cargo-llvm-cov --version 0.6.16 --locked + ``` + +Use the same nightly for the target package. `rust-analyzer` provides editor support; compiler analysis uses components such as `rustc-dev`. Building, installation, and the offline checks need no model credentials. + +[Continue with the quick start](#quick-start) once the prerequisites are installed. ## What PALM does @@ -23,12 +79,24 @@ This is the maintained implementation of ***PALM: Synergizing Program Analysis a ```mermaid flowchart TD - A["Rust package"] --> B["Path constraints and code context"] - B --> C["Model-generated tests"] + A["Rust package"] --> P["Representative
path constraints"] + A --> X["Focal-function
context"] + P --> C["Model-generated
test candidates"] + X --> C C --> D["Compilation check"] + D -->|Compiles| F["Test execution
and coverage"] D -->|Compiler errors| E["Model repair"] - E --> D - D -->|Compiles| F["Test execution and coverage"] + E -.->|Recheck| D + classDef source fill:#f7f7fc,stroke:#8774ab,color:#222133 + classDef analysis fill:#eeebf8,stroke:#8774ab,color:#222133 + classDef generate fill:#5941bc,stroke:#5941bc,color:#ffffff + classDef repair fill:#f4eaf2,stroke:#854d79,color:#64375b + classDef result fill:#e8f2eb,stroke:#276047,color:#214f3a + class A,D source + class P,X analysis + class C generate + class E repair + class F result ``` Repair addresses compilation errors. Runtime assertion failures and candidate timeouts remain failed test outcomes. @@ -54,45 +122,14 @@ assert_eq!(classify(2), 1); assert_eq!(classify(-1), 0); ``` -The same check exercises compilation repair with an intentionally invalid candidate, then validates execution, coverage, and source restoration. It uses real Rust tools but does not measure model quality. [Run it below](#quick-start), then use the [validation guide](docs/minimal-pipeline.md#outputs-and-coverage-interpretation) to interpret its output. - -## Prerequisites - -Use a native build environment with Git, [rustup](https://rustup.rs/), stable Rust, a C linker, and Python 3.9 or later for the validation scripts. Tool and dependency downloads may require network access. - -1. Install the pinned analysis toolchain and components: - - ```sh - rustup toolchain install nightly-2025-03-19 --profile minimal \ - --component rust-src --component rustc-dev --component llvm-tools-preview --component rust-analyzer - ``` - -2. Install [cargo-llvm-cov](https://github.com/taiki-e/cargo-llvm-cov): - - ```sh - cargo +stable install cargo-llvm-cov --version 0.6.16 --locked - ``` - -Use the same nightly for the target package. `rust-analyzer` provides editor support; compiler analysis uses components such as `rustc-dev`. Building, installation, and the offline checks need no model credentials. - -## Quick start - -After installing the prerequisites, run the minimal pipeline without API keys: - -```sh -git clone https://github.com/cppbear/PALM.git -cd PALM -cargo build --workspace --locked -python3 scripts/check_minimal.py -``` - -The script works in temporary copies, prints their location, and finishes with: +In a separate case, `nested::double` takes an `i32`. The check supplies an intentionally invalid candidate and a fixed repair response: -```text -Minimal analysis/generation/repair/coverage checks passed. +```diff +- assert_eq!(double("bad"), 4); ++ assert_eq!(double(2), 4); ``` -See [minimal pipeline validation](docs/minimal-pipeline.md) for the checked scenarios. For a real model, install the tools below, [select a runtime configuration](utgen/README.md#prerequisites), and follow a [bounded example](examples/README.md). +The check validates compilation repair, execution, coverage, and source restoration with real Rust tools. Its fixed local responses do not measure model quality. [Explore the illustrated examples](https://cppbear.github.io/PALM/), [run the offline check](#quick-start), then use the [validation guide](docs/minimal-pipeline.md#outputs-and-coverage-interpretation) to interpret its output. ## Installation @@ -106,6 +143,12 @@ This installs brinfo, call_chain, focxt, and utgen. Ensure Cargo's binary direct Model configuration is loaded at runtime by `gen` and `fix`. Changing the API address, key, or model takes effect on the next command without rebuilding. +## Docker + +Run `docker/docker-build`, then `docker/docker-run` to open a shell with the repository mounted at `/home/palm/palm`. Follow [Installation](#installation) inside the container. The image includes the pinned compiler and coverage tools; files written in the mounted repository remain on the host after the container exits. + +Both scripts locate the repository from their own paths. See [Docker validation and CI scope](docs/build-validation.md#ci-and-further-checks) for the checked environment and optional container pipeline check. + ## Workflow Use a fresh working copy of the target package: preprocessing changes its source and test layout, and generation may add a test dependency. @@ -144,12 +187,6 @@ See the [CLI reference](utgen/README.md) for source-processing boundaries, cache | [docs](docs/README.md) | Technical, usage, validation, and research documentation. | | `docker/` | Container build and run scripts. | -## Docker - -Run `docker/docker-build`, then `docker/docker-run` to open a shell with the repository mounted at `/home/palm/palm`. Follow [Installation](#installation) inside the container. The image includes the pinned compiler and coverage tools; files written in the mounted repository remain on the host after the container exits. - -Both scripts locate the repository from their own paths. See [Docker validation and CI scope](docs/build-validation.md#ci-and-further-checks) for the checked environment and optional container pipeline check. - ## Development checks ```sh @@ -173,7 +210,7 @@ Bug reports and focused pull requests are welcome. Include a reproducer and rele ## Citation -If you use PALM in your research, please cite the ASE 2025 paper. [CITATION.cff](CITATION.cff) provides the machine-readable citation. +If you use PALM in your research, please cite **PALM: Synergizing Program Analysis and LLMs to Enhance Rust Unit Test Coverage** (ASE 2025). [Published paper](https://doi.org/10.1109/ASE63991.2025.00223) · [Open-access preprint](https://arxiv.org/abs/2506.09002). [CITATION.cff](CITATION.cff) provides the machine-readable citation. ```bibtex @inproceedings{Chu2025PALM, diff --git a/docs/ase2025/research-2647-poster.pdf b/docs/ase2025/research-2647-poster.pdf index f89495f2e7..913355db92 100644 Binary files a/docs/ase2025/research-2647-poster.pdf and b/docs/ase2025/research-2647-poster.pdf differ diff --git a/docs/assets/palm-example-mobile.svg b/docs/assets/palm-example-mobile.svg new file mode 100644 index 0000000000..d9a028aa74 --- /dev/null +++ b/docs/assets/palm-example-mobile.svg @@ -0,0 +1,20 @@ + + A PALM offline example: source, branch, and test assertion + For input 2, classify calls support::positive. The true branch returns 1; a fixed local response supplies assert_eq!(classify(2), 1). This illustration does not run code or call a model. + + + + Follow a path into a test. + Source · classify(value: i32)Extracted pathsFixed assertion · input = 2 + + + if support::positive(value) { 1 } + else { 0 } + support::positive(value) + + + true → 1false → 0 + assert_eq!(classify(2), 1); + + Offline example · fixed local response + diff --git a/docs/assets/palm-example.svg b/docs/assets/palm-example.svg new file mode 100644 index 0000000000..63f45a34b9 --- /dev/null +++ b/docs/assets/palm-example.svg @@ -0,0 +1,42 @@ + + A PALM offline example: source, branch, and test assertion + For input 2, classify calls support::positive. The true branch returns 1; a fixed local response supplies assert_eq!(classify(2), 1). This illustration does not run code or call a model. + + + + + + + + Follow a path into a test. + Offline example + + SourceExtracted pathsFixed assertion + + + + classify(value: i32) + + if support::positive(value) { + 1 + } else { + 0 + } + support::positive(value) + + + + + + true + false + + return 1return 0 + input = 2 + assert_eq!( + classify(2), + 1 + ); + + Excerpt from a fixed local response. + diff --git a/docs/build-validation.md b/docs/build-validation.md index 7cb1168839..6a6e148168 100644 --- a/docs/build-validation.md +++ b/docs/build-validation.md @@ -49,7 +49,15 @@ Model configuration is loaded only when generation or repair starts. See the [ru The [native CI workflow](../.github/workflows/ci.yml) checks builds, ordinary tests, CLI entry points, installer syntax/help, and example metadata on Linux. It also runs the [minimal pipeline and related regressions](minimal-pipeline.md) and [Bytes analysis checks](bytes-analysis.md). -Changes limited to READMEs and the documentation paths selected in the workflow receive a patch whitespace check. Other changes and manual workflow runs execute the full offline suite. A documentation-only CI result does not imply that Rust tests ran. +Changes limited to the following paths receive a patch whitespace check and skip the Rust steps: + +- READMEs, Markdown under `docs/`, PNG/SVG files under `docs/assets/`, and PDFs under `docs/ase2025/`. +- The static website under `site/` and its `.github/workflows/pages.yml` workflow. +- `CONTRIBUTING.md`, `LICENSE`, `CITATION.cff`, Issue templates under `.github/ISSUE_TEMPLATE/`, and `.github/pull_request_template.md`. + +The workflow checks all changed paths in the PR or push. Any path outside this list runs the full offline suite, including changes to Rust code, build configuration, generation templates, validation scripts, Docker files, or the native CI workflow itself. Manual runs and unavailable comparison commits also run the full suite. Renames are checked as a deletion and an addition. A successful result that reports skipped Rust steps does not imply that Rust tests ran. + +Website changes independently trigger the [Pages workflow](../.github/workflows/pages.yml), which checks JavaScript syntax, static assets, and fragment links before uploading the site artifact. Pull requests build and check the site; deployment is limited to `main`. The independent [Docker checks workflow](../.github/workflows/docker.yml) builds a Linux AMD64 image, checks its Python, compiler, and coverage tools, installs all four PALM tool packages, and checks their command entry points. It runs for changes to Docker files, toolchain files, Cargo manifests/lockfiles, build scripts, build-utils, root Cargo configuration, the installer, or its own workflow. Ordinary Rust logic and documentation changes do not trigger it. The image uses BuildKit's GitHub Actions layer cache and is loaded only into the runner's local Docker engine. diff --git a/site/README.md b/site/README.md index 2c936dc242..1893d5e923 100644 --- a/site/README.md +++ b/site/README.md @@ -6,8 +6,18 @@ The GitHub Pages site is plain HTML, CSS, and JavaScript. Preview from the repos python3 -m http.server 8000 --directory site ``` -Open `http://localhost:8000`. The branch selector is an illustration of `examples/minimal`, not a live model or Rust execution. Keep detailed instructions in the repository and link to them from the site. +Open `http://localhost:8000`. Keep detailed instructions in the repository and link to them from the site. + +The page illustrates the offline fixture in `examples/minimal`; it does not execute Rust or call a model. The source, branch choices, and assertions come from `examples/minimal/src/lib.rs` and `scripts/check_minimal.py`. The extracted conditions are `support::positive(value)` being true or false. The context excerpt marks the omitted `threshold` body explicitly; its arithmetic behavior is explained using the original source, not presented as a normalized analysis result. + +The optional path walkthrough highlights source, branch, and assertion in sequence. It can be stopped or replayed; changing the input cancels the current sequence. At the single-column breakpoint (760px and below), or with reduced-motion preferences, **Show path summary** displays the complete explanation immediately. Switching into either mode ends an active sequence. Without JavaScript, the fixed example and native context disclosure remain available, while inactive controls stay hidden. + +The `nested::double` compilation repair is a separate fixed-response example from that script. Status labels describe the fixture checks, not a live execution or a measurement of model quality. Display snippets omit test wrappers and helper assertions. The Pages workflow publishes only this directory after relevant changes reach `main`. In repository **Settings → Pages**, select **GitHub Actions** as the source. Project-relative asset URLs work under `/PALM/`. -The self-hosted Sora semibold font is from [Google Fonts](https://github.com/google/fonts/tree/main/ofl/sora), licensed under the [SIL Open Font License](assets/OFL-Sora.md). The geometric PALM mark is part of this project's MIT-licensed source. +The self-hosted Sora semibold font is from [Google Fonts](https://github.com/google/fonts/tree/main/ofl/sora), licensed under the [SIL Open Font License](assets/OFL-Sora.md). The geometric PALM mark and interface icons are part of this project's MIT-licensed source. + +Sharing metadata uses the canonical URL `https://cppbear.github.io/PALM/` and `assets/social-preview.png`. The 1200 × 630 PNG is a browser export of the editable `assets/social-preview.svg`, which embeds the same licensed Sora font. To refresh it, open the SVG in a browser at 1200 × 630, wait for fonts to load, and capture the viewport at device scale 1. Keep the image dimensions and descriptions in `index.html` in sync. These assets are static; no build step is needed to serve the site. Social-platform previews can be checked after deployment. + +The research section links to the maintained paper, poster, presentation, and citation. The poster and presentation describe the paper’s experiments rather than a new evaluation of the maintained implementation. diff --git a/site/assets/icons.svg b/site/assets/icons.svg new file mode 100644 index 0000000000..c4c3365fa6 --- /dev/null +++ b/site/assets/icons.svg @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + diff --git a/site/assets/social-preview.png b/site/assets/social-preview.png new file mode 100644 index 0000000000..c3691a684f Binary files /dev/null and b/site/assets/social-preview.png differ diff --git a/site/assets/social-preview.svg b/site/assets/social-preview.svg new file mode 100644 index 0000000000..11700e38f5 --- /dev/null +++ b/site/assets/social-preview.svg @@ -0,0 +1,24 @@ + + PALM — Rust tests, guided by analysis + A fixed offline example follows input 2 through the true branch and asserts that classify(2) equals 1. + + + + + + + + PALM + cppbear.github.io/PALM + Rust tests. + Guided by analysis. + Program analysis + language models, from paths to test candidates. + + Rust inputSelected pathTest assertion + classify(2)true → return 1classify(2) == 1 + input = 2 + support::positive(2) + Fixed local response + + Illustrative offline fixture · No model-quality claim + diff --git a/site/index.html b/site/index.html index a3471c9f42..171211c5f8 100644 --- a/site/index.html +++ b/site/index.html @@ -5,10 +5,50 @@ PALM — Rust tests, guided by program analysis + + + + + + + + + + + + + + + + Skip to content
-

- Rust tests.
Grounded in your code. -

-
-

- PALM combines program analysis with language models to turn path - constraints and code context into test candidates. -

- Try the offline example - + +
+

+ Rust tests.
Guided by analysis. +

+
+

+ Give language models the paths and context behind your Rust code. + PALM generates test candidates, repairs compilation errors, and + measures the results. +

+ +
-
-
-

One function. Two paths to test.

- Explore the fixture - +
+
+

Follow a path into a test.

+ + +
+ -
-
-
- Rust source classify(value) +
+
+
+ +

Source

+ src/lib.rs
-
pub fn classify(value: i32) -> i32 {
-    if support::positive(value) {
-        1
-    } else {
-        0
-    }
-}
-

- support::positive checks value > 0. -

+
pub fn classify(value: i32) -> i32 {
+    if support::positive(value) {
+        1
+    } else {
+        0
+    }
+}
+ View the source +
-
- - + + +

One condition chain per path.

+
+
+
+ +

Test assertion

+
+
-
-
- -
- Path conditionvalue > 0 -
-
-
- -
- Example assertionassert_eq!(classify(2), 1); -
-
+

+ Selected condition true +

+
assert_eq!(
+    classify(2),
+    1
+);
+

+ Expected return 1 +

+

+ Assertion excerpt from a fixed local model response. +

-

- Interactive illustration of the minimal fixture. Its offline check - uses fixed local model responses; this page does not run Rust or +

+ + See the context behind this functionpositive → threshold + +
+
pub fn positive(value: i32) -> bool {
+    threshold(value)
+}
+
+fn threshold(value: i32) -> bool {
+    // body omitted in the extracted context
+}
+
+

A function has dependencies.

+

+ PALM supplies related code alongside the focal function. This + extracted-context excerpt includes positive; the + body of threshold is omitted. +

+

+ In the + original source, threshold checks value > 0. +

+
+
+
+
+
+

+ Illustration of the + minimal offline fixture, using fixed local responses. This page does not execute Rust or call a model.

-
-
- Open source · MIT licensedRead the ASE 2025 paper - + Open source · MIT
-
-
+

- Give the model
more than a signature. + Analysis and generation,
working together.

- PALM brings the function’s paths and dependencies into the prompt, - then checks the generated tests with the Rust toolchain. + Representative paths tell the model what to exercise. Code context + tells it what the function depends on. The Rust toolchain checks + what comes back.

-
    -
  1. - -

    Analyze the code

    -

    - Extract representative path constraints, calls, and type - dependencies for the focal function. -

    - Explore code context +
    + +
    + +

    Rust package

    +

    Your source code

    +
    +
    +
    + +

    Path constraints

    +

    Representative paths

    +
    +
    + +

    Code context

    +

    Calls & types

    +
    +
    +
    + +

    Generate tests

    +

    LLM + analysis

    +
    +
    +
    + +

    Compile

    +

    Check each candidate

    +
    +
    + +
    +

    Repair & retry

    +

    LLM + diagnostics

    +
    + On compiler errors +
    +
    +
    + +

    Run & measure

    +

    Test results · Coverage

    + After compilation passes +
    +
    +
    + Analysis guides + generationCompiler feedback + guides repair -
  2. -
  3. - -

    Generate & repair

    + + +
    +

    + Inspect outcomes per function, with test code excluded from + coverage. +

    + Explore the architecture + +
    +
+
+
+
+
+

+ A compiler error becomes a concrete repair. +

+

+ A separate fixture example starts with the wrong argument type. + Compiler feedback guides a correction, then PALM checks the + candidate again. +

+
+

+ Expected i32.
Found &str. +

+

+ The argument "bad" does not match the function + signature. +

+
+ "bad"2 +
+
+
+
+
+
+ Source · nested::double +
+ pub fn double(value: i32) -> i32 { value * 2 } +
+
+
+
+

Before repair

+ Compile error +
+
assert_eq!(double("bad"), 4);
+
+
+
+

After repair

+ Compiles +
+
assert_eq!(double(2), 4);
+
+ +
+ Passes the fixture check +

The corrected input produces the expected value.

+
+
+
+
+
+
+

- Generate candidates with a language model. Use compiler - diagnostics to repair compilation errors. + Fixed-response example from the + offline validation script. Excerpts omit test wrappers and helper assertions.

- Explore the CLI - -
  • - -

    Run & measure

    - Inspect compilation, execution, and coverage per function, with - test code excluded from coverage. + Repair handles compilation errors. Assertion failures and + candidate timeouts remain failed outcomes.

    - Understand the results -
  • - -

    - Repair addresses compilation errors. Assertion failures and candidate - timeouts remain failed test outcomes. -

    +
    +
    -
    -
    +

    Start small.
    See the whole pipeline.

    - The minimal example checks analysis, generation, compilation - repair, execution, coverage, and source restoration. No model - credentials needed. -

    -

    - First install the - prerequisites: Git, Rust and a C linker, Python 3.9+, the pinned nightly, and - cargo-llvm-cov. Downloads may need network access. + Run the minimal fixture through analysis, generation, repair, + execution, and coverage. No model credentials needed.

    +
    + +

    + First install the + prerequisites: Git, Rust and a C linker, Python 3.9+, the pinned nightly, + and cargo-llvm-cov. Downloads may need network access. +

    +
    - Run from your terminalRun from your terminal
    git clone https://github.com/cppbear/PALM.git
     cd PALM
     cargo build --workspace --locked
     python3 scripts/check_minimal.py
    -

    Expected completion

    -

    - Minimal analysis/generation/repair/coverage checks passed. -

    -

    +
    + Expected completion +

    + Minimal analysis/generation/repair/coverage checks + passed. +

    +
    +

    -

    Ready for your own package?

    -

    - Install the tools, configure a model, and begin with a small - function list and request budget. Preprocessing changes source and - tests, so use a fresh working copy. -

    +
    +

    Then try your own package.

    +

    + Install the tools, configure a model, and begin with a few + functions and a request budget. Preprocessing changes source and + tests; use a fresh working copy. +

    +
    Follow a bounded example - +
    - -
    -
    +
    +

    Know where it fits.

    -

    - Start with one standalone Cargo package and a few functions. Expand - after checking the results. -

    +

    A few boundaries to check
    before your first run.

    + Full scope and limitations +
    -
    +
    -
    Unit & integration tests
    +
    One Cargo package
    - Unit tests use the recorded library or binary target. - Function-level integration tests require a library and check - external access. + Ordinary lib/bin targets, including custom names and entry files. + The complete workflow does not support multi-package workspaces.
    -
    One package at a time
    +
    Unit & integration tests
    - Ordinary lib/bin targets are supported, including custom names and - entry files. The complete workflow does not support multi-package - workspaces. + Unit tests use the recorded target. Function-level integration + tests require a library and check external access.
    -
    Explicit analysis boundaries
    +
    The active build configuration
    - Analysis follows the active build configuration. Definitions - shared by lib and bin prefer lib; this does not cover every binary - variant. + Shared lib/bin definitions prefer lib. Analysis does not explore + every binary variant or feature combination.
    -
    A pinned Rust toolchain
    +
    Pinned tools
    - Uses nightly-2025-03-19 and cargo-llvm-cov - 0.6.16. Linux CI and local macOS Apple Silicon have - been exercised; Windows has not been validated. + nightly-2025-03-19 and cargo-llvm-cov + 0.6.16. Exercised on Linux CI and macOS Apple + Silicon; Windows has not been validated.
    - Full scope and limitations -
    - -
    -
    -

    - Built on research.
    Open for exploration. -

    -

    - PALM: Synergizing Program Analysis and LLMs to Enhance Rust Unit - Test Coverage. -

    -

    - Published at ASE 2025. This maintained implementation includes - changes made after the paper’s experiments. -

    -
    -
    -