Skip to content

fix(cli, docs): Refactor and enhance approximation modules and CLI support - #380

Merged
misonijnik merged 4 commits into
misonijnik/isolated-approximations-modelsfrom
misonijnik/isolated-approximations-cli
Oct 27, 2026
Merged

misonijnik merged 4 commits into
misonijnik/isolated-approximations-modelsfrom
misonijnik/isolated-approximations-cli

Conversation

@misonijnik

Copy link
Copy Markdown
Member

No description provided.

@misonijnik
misonijnik changed the base branch from main to misonijnik/isolated-approximations-models August 26, 2026 17:16
@misonijnik
misonijnik force-pushed the misonijnik/isolated-approximations-cli branch from 5b5afa3 to 7abd207 Compare August 26, 2026 17:25
@misonijnik
misonijnik force-pushed the misonijnik/isolated-approximations-cli branch from 7abd207 to 5e67311 Compare August 26, 2026 17:50
@misonijnik
misonijnik force-pushed the misonijnik/isolated-approximations-cli branch 2 times, most recently from cb6ae28 to dbe6bd4 Compare September 7, 2026 18:41
@misonijnik misonijnik changed the title fix(cli): Refactor and enhance approximation modules and CLI support fix(cli, docs): Refactor and enhance approximation modules and CLI support Sep 7, 2026
@misonijnik
misonijnik force-pushed the misonijnik/isolated-approximations-cli branch from dbe6bd4 to 6ef9469 Compare September 7, 2026 18:55
@misonijnik
misonijnik force-pushed the misonijnik/isolated-approximations-cli branch 2 times, most recently from 006bf14 to 3de3cc7 Compare October 12, 2026 09:01
@misonijnik misonijnik changed the title fix(cli, docs): Refactor and enhance approximation modules and CLI support fix(cli, ci, docs): Refactor and enhance approximation modules and CLI support Oct 12, 2026
@misonijnik
misonijnik force-pushed the misonijnik/isolated-approximations-cli branch from 3de3cc7 to 17681bd Compare October 12, 2026 10:10
@misonijnik misonijnik changed the title fix(cli, ci, docs): Refactor and enhance approximation modules and CLI support fix(cli, docs): Refactor and enhance approximation modules and CLI support Oct 12, 2026
misonijnik and others added 4 commits October 27, 2026 13:57
Add project scaffolding, pinned dependency builds, on-demand rebuilds, compiled-output resolution, diagnostics, and documentation for custom dataflow approximations.
Three defects found by the model in formal/Opentaint/Cli/Internal/Approximation,
each with the test the proof predicts.

A directory counted as compiled classes as soon as a .class file existed
anywhere below it. That is a test of the subtree, not a classification of the
directory: a tree holding both a model project and compiled classes collapsed to
one classpath root, the project was never compiled, and the scan ran without its
models and reported nothing about it. Classify only when nothing below still
needs building, and compute both facts in one walk rather than two
(Resolve.fixed_loses_nothing, Resolve.shipped_loses_a_project,
Resolve.fused_resolves_identically). A directory holding compiled classes of its
own next to a project has no valid classification at all, so report it by name
instead of dropping either side (Resolve.ambiguous_tree_drops_a_class).

Builds staged in a directory named after the output alone, so two builders of
one project shared it: one could delete the other's classes, contribute to them,
and publish the mixture under a stamp recording it as up to date. Stage under a
path carrying the builder's identity, and rename the previous output aside
rather than deleting it, so a reader sees the old output, the new one, or
nothing (Build.raceA_output_is_not_sound, Build.publishedOutputIsSound).

The rebuild stamp digested the model project but not the compiler that reads it,
so an upgraded CLI kept serving models compiled by the previous one. Carry the
autobuilder's identity in the stamp (Stamp.shipped_stamp_serves_a_stale_output,
Stamp.full_stamp_covers).
The remaining findings from the stack review.

Two resolved class directories could offer the same class with different
content, and nothing says which one an analysis reads, so the finding set
depended on a choice the CLI never made. ResolveAll resolves every
--dataflow-approximations path together, passes each directory once, and rejects
a classpath whose directories disagree about a class they share. Identical
copies are the ordinary result of overlapping paths and stay free
(Resolve.agreement_pins_the_choice, Resolve.identical_roots_agree,
Resolve.duplicate_root_is_harmless).

Staging directories now live in a .opentaint-staging directory beside the
output, on the skip list, so that what a killed build leaves behind is never
resolved as compiled models — half-built classes applied to a scan is the same
silent-loss shape as the rest of this review. The next build reclaims them, but
only once the owning process is gone, so a build in progress is never disturbed;
sweeping cannot reach the published output at all (Build.sweep_leaves_the_output).

A build output recorded the absolute path of the project it came from, so it
meant nothing on another machine. Record it relative to the output.

A javac error count is a trailer for the diagnostics above it, not a diagnostic:
a line that merely reads like one no longer stands in for the compiler output.
Also drop a redundant sort of os.ReadDir output and a deferred close inside a
loop.
Take the approximation project's pins from the batch's test project, drop
rationale and CLI internals that duplicate existing instructions, and keep
compilation feedback in the approximation test run.
@misonijnik
misonijnik force-pushed the misonijnik/isolated-approximations-cli branch from 9805d1b to 8d54627 Compare October 27, 2026 09:57
@misonijnik
misonijnik merged commit 344a9f4 into main Oct 27, 2026
14 checks passed
@misonijnik
misonijnik deleted the misonijnik/isolated-approximations-cli branch October 27, 2026 10:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants