Skip to content

Audit: are dependency arrays generated in deterministic order? (P14) #13

@astefano

Description

@astefano

Context

The probe KB property P14 (Deterministic output) now explicitly requires that array fields like dependencies, type-dependencies, and term-dependencies are sorted in a stable, deterministic order.

In both probe-verus and probe-rust, the dependencies-with-locations array was non-deterministic because it was built by iterating over a HashSet. probe-verus fixed this by sorting by (line, code-name).

Request

Audit the probe-lean extract implementation (ProbeLean/Atomize.lean and related files) to verify:

  1. Are dependencies, type-dependencies, and term-dependencies arrays generated in a deterministic order?
  2. If they use any unordered collection (e.g., HashMap, HashSet, or Lean's Std.HashMap), is the result sorted before serialization?
  3. If non-deterministic, apply a stable sort (e.g., by declaration name or source position).

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions