Skip to content

Port partial atomic integer specs to libstdc++ - #127

Merged
pgiarrusso-sl merged 4 commits into
mainfrom
paolo/atomic-specs
Oct 24, 2026
Merged

pgiarrusso-sl merged 4 commits into
mainfrom
paolo/atomic-specs

Conversation

@pgiarrusso-sl

@pgiarrusso-sl pgiarrusso-sl commented Aug 21, 2026 •

Copy link
Copy Markdown
Contributor

By Codex

Port the current partial atomic integer specifications from fmdeps/auto/rocq-skylabs-cpp-stdlib to libstdc++, replacing the stale snapshot and unfinished experiments in the initial port.

Details The first commit is a byte-for-byte copy of all five atomic source/test files from SkyLabsAI/auto at `9008c20b7`. The remaining commits relocate imports and tests, regenerate Dune rules, and adapt libc++'s two base classes and `std::__1` namespace to libstdc++'s single `std::__atomic_base` base and `std` namespace. Changes already included in [SkyLabsAI/auto#391](https://github.com/SkyLabsAI/auto/pull/391) are omitted from the replay. Original contributor attribution is preserved.

Coverage is limited to integral atomic specializations excluding bool. Pointer, primary-template, and thread-ID atomics remain outside this port. The original PR head, including the thread-ID experiments, is preserved at backup/atomic-specs-2026-10-22.

The regression checks default/value construction, load/conversion, store/assignment, compare-exchange, exchange, arithmetic, and pre/post increment. main now also runs the existing fetch-add test. The coverage changes are isolated in the final test commit and mirrored in SkyLabsAI/auto#637. That PR also fixes the libc++ assignment-spec receiver exposed by the new assignment test.

Validation in the composed workspace build container:

  • make ide-prepare (with writable uv cache/data directories).
  • dune build of proof/atomic/spec.vo and test/atomic/test_cpp_proof.vo: passed, including all regression proofs.
  • Atomic installed .vo targets, followed by a separate regression proof build: passed.
  • proof/dune_inc and test/dune_inc generated-rule checks: passed.
  • Compile and run the C++ regression with clang++ -std=c++20 -stdlib=libstdc++: passed.

The atomic regression proof omits ten confirmed no-op normalize_ptrs calls and four redundant work invocations. Temporary progress checks verified all ten call sites and rejected a negative control that changes the goal; the cleaned proof then compiled without warnings. The standalone C++ compile emits the existing unused msg parameter warning.

An additional package-wide @fmdeps/brick-libcpp/install check was interrupted after several minutes in the unchanged iostream/spec.v proof; the targeted atomic build and installation checks pass.

@pgiarrusso-sl pgiarrusso-sl self-assigned this Aug 21, 2026
@skylabs-ai-ci

skylabs-ai-ci Bot commented Aug 21, 2026

Copy link
Copy Markdown

CI summary (Details)

Active Repos

Repo Job Branch Job Commit Branch Tip Base branch Base commit PR
fmdeps/brick-libcpp/ paolo/atomic-specs f4b43fc 2ed73a1 main 5a18322 #127

Passive Repos

Repo Job Branch Job Commit
./ main f5283df
fmdeps/BRiCk/ main 4d8da54
fmdeps/auto/ main 14f9ff8
fmdeps/auto-docs/ main f3ece99
bluerock/NOVA/ skylabs-proof d802253
bluerock/bhv/ skylabs-main bd2be4a
fmdeps/ci/ main 1092b1e
vendored/elpi/ skylabs-master c0b9653
vendored/flocq/ skylabs-master cf9cc84
psi/data/ main b5b4e45
vendored/rocq/ skylabs-master bef7df5
fmdeps/rocq-agent-toolkit/ main 227bb83
vendored/rocq-elpi/ skylabs-master 7dee592
vendored/rocq-equations/ skylabs-main 9cf8471
vendored/rocq-ext-lib/ skylabs-master a31ad69
vendored/rocq-iris/ skylabs-master a7af9f7
vendored/rocq-lsp/ skylabs-main 64ef78a
vendored/rocq-stdlib/ skylabs-master 00897b3
vendored/rocq-stdpp/ skylabs-master 0c5e505
fmdeps/skylabs-fm/ main 8b34b7a
vendored/vsrocq/ skylabs-main ee79e7a

Performance

Relative Master MR Change Filename
-0.00% 145998.9 145998.9 -0.0 total
-0.00% 32793.6 32793.6 -0.0 ├ translation units
+0.00% 113205.3 113205.3 +0.0 └ proofs and tests
Full Results
Relative Master MR Change Filename
-0.00% 145998.9 145998.9 -0.0 total
-0.00% 32793.6 32793.6 -0.0 ├ translation units
+0.00% 113205.3 113205.3 +0.0 └ proofs and tests

@pgiarrusso-sl
pgiarrusso-sl force-pushed the paolo/atomic-specs branch 2 times, most recently from fbc8ea5 to 8a640b9 Compare August 21, 2026 16:49
@skylabs-ai-ci

skylabs-ai-ci Bot commented Aug 21, 2026

Copy link
Copy Markdown

CI summary (Details)

Active Repos

Repo Job Branch Job Commit Branch Tip Base branch Base commit PR
fmdeps/brick-libcpp/ paolo/atomic-specs 9a3a353 8a640b9 main ce20cb8 #127

Passive Repos

Repo Job Branch Job Commit
./ main f5283df
fmdeps/BRiCk/ main 4d8da54
fmdeps/auto/ main 14f9ff8
fmdeps/auto-docs/ main f3ece99
bluerock/NOVA/ skylabs-proof d802253
bluerock/bhv/ skylabs-main bd2be4a
fmdeps/ci/ main 1092b1e
vendored/elpi/ skylabs-master c0b9653
vendored/flocq/ skylabs-master cf9cc84
psi/data/ main b5b4e45
vendored/rocq/ skylabs-master bef7df5
fmdeps/rocq-agent-toolkit/ main 227bb83
vendored/rocq-elpi/ skylabs-master 7dee592
vendored/rocq-equations/ skylabs-main 9cf8471
vendored/rocq-ext-lib/ skylabs-master a31ad69
vendored/rocq-iris/ skylabs-master a7af9f7
vendored/rocq-lsp/ skylabs-main 64ef78a
vendored/rocq-stdlib/ skylabs-master 00897b3
vendored/rocq-stdpp/ skylabs-master 0c5e505
fmdeps/skylabs-fm/ main 856c831
vendored/vsrocq/ skylabs-main ee79e7a

Performance

Relative Master MR Change Filename
+0.00% 145998.9 145998.9 +0.0 total
+0.00% 32793.6 32793.6 +0.0 ├ translation units
+0.00% 113205.3 113205.3 +0.0 └ proofs and tests
Full Results
Relative Master MR Change Filename
+0.00% 145998.9 145998.9 +0.0 total
+0.00% 32793.6 32793.6 +0.0 ├ translation units
+0.00% 113205.3 113205.3 +0.0 └ proofs and tests

@pgiarrusso-sl
pgiarrusso-sl force-pushed the paolo/atomic-specs branch 3 times, most recently from dbc8b33 to 7967331 Compare September 1, 2026 09:09
@skylabs-ai-ci

skylabs-ai-ci Bot commented Sep 1, 2026

Copy link
Copy Markdown

CI summary (Details)

Active Repos

Repo Job Branch Job Commit Branch Tip Base branch Base commit PR
fmdeps/brick-libcpp/ paolo/atomic-specs 054036b 7967331 main fb24904 #127
fmdeps/auto/ paolo/atomic-specs a8ed62b 5af05fd main d3a8984 #391

Passive Repos

Repo Job Branch Job Commit
./ main fc2860d
fmdeps/BRiCk/ main f8dc05c
fmdeps/auto-docs/ main 6490c5f
bluerock/NOVA/ skylabs-proof eb2fd0d
bluerock/bhv/ skylabs-main e6646bb
fmdeps/ci/ main 6a09c2f
vendored/elpi/ skylabs-master c0b9653
vendored/flocq/ skylabs-master cf9cc84
vendored/rocq/ skylabs-master bef7df5
fmdeps/rocq-agent-toolkit/ main 227bb83
vendored/rocq-elpi/ skylabs-master 7dee592
vendored/rocq-equations/ skylabs-main 9cf8471
vendored/rocq-iris/ skylabs-master a7af9f7
vendored/rocq-lsp/ skylabs-main 64ef78a
vendored/rocq-stdlib/ skylabs-master 00897b3
vendored/rocq-stdpp/ skylabs-master 0c5e505
fmdeps/skylabs-fm/ main c8da9fd
vendored/vsrocq/ skylabs-main ee79e7a

Changes in Warnings or Errors

Before New Fixed After
Errors 0 ${\color{red}2}$ 0 2
Warnings 118 0 0 118
Code quality details

Rocq Files with Errors (2)

# Files with new errors
- fmdeps/auto/rocq-skylabs-cpp-stdlib/tests/atomic/test_cpp_proof.v
- fmdeps/brick-libcpp/rocq-brick-libstdcpp/proof/atomic/test_cpp_proof.v

❌ New Errors (2)

File "./fmdeps/auto/rocq-skylabs-cpp-stdlib/tests/atomic/test_cpp_proof.v", line 171, characters 6-16:
Error: The reference spec.do_op was not found in the current environment.
File "./fmdeps/brick-libcpp/rocq-brick-libstdcpp/proof/atomic/test_cpp_proof.v", line 77, characters 4-5:
Error: Syntax error: [lconstr] expected after '(' (in [elpi_cmd_arg]).

Performance

Relative Master MR Change Filename
+0.97% 194408.4 196303.2 +1894.8 total
-0.41% 814.9 - -814.9 ├ disappeared files (1)
+1.37% - 2705.9 +2705.9 ├ newly appeared files (8)
+0.00% 193593.5 193597.3 +3.7 └ common files
+0.00% 52863.1 52863.4 +0.3 ├ translation units
+0.00% 140730.4 140733.9 +3.5 └ proofs and tests
Full Results
Relative Master MR Change Filename
+11.32% 13.0 14.4 +1.5 fmdeps/auto/rocq-skylabs-cpp-stdlib/theories/atomic/pred.v
+16.61% 12.1 14.1 +2.0 fmdeps/auto/rocq-skylabs-cpp-stdlib/theories/atomic/spec.v
+0.97% 194408.4 196303.2 +1894.8 total
-0.41% 814.9 - -814.9 ├ disappeared files (1)
+1.37% - 2705.9 +2705.9 ├ newly appeared files (8)
+0.00% 193593.5 193597.3 +3.7 └ common files
+0.00% 52863.1 52863.4 +0.3 ├ translation units
+0.00% 140730.4 140733.9 +3.5 └ proofs and tests

@pgiarrusso-sl
pgiarrusso-sl deleted the paolo/atomic-specs branch September 4, 2026 17:52
@pgiarrusso-sl
pgiarrusso-sl restored the paolo/atomic-specs branch October 22, 2026 14:33
Relocate imports and tests and regenerate the Dune rules, replacing the temporary build setup from the initial port.
@pgiarrusso-sl pgiarrusso-sl changed the title WIP on atomic specs Port partial atomic integer specs to libstdc++ Oct 22, 2026
@pgiarrusso-sl pgiarrusso-sl reopened this Oct 22, 2026
@skylabs-ai-ci

skylabs-ai-ci Bot commented Oct 22, 2026

Copy link
Copy Markdown

CI summary (Details)

Active Repos

Repo Job Branch Job Commit Branch Tip Base branch Base commit PR
fmdeps/brick-libcpp/ paolo/atomic-specs be356d4 97b6ad3 main 44eb191 #127

Passive Repos

Repo Job Branch Job Commit
./ main 781c507
fmdeps/BRiCk/ main f08d690
fmdeps/auto/ main 9008c20
fmdeps/auto-docs/ main 5a40c23
bluerock/NOVA/ skylabs-proof 0573bd1
bluerock/bhv/ skylabs-main 3704d69
fmdeps/brick-libgtest/ main aeeddad
fmdeps/ci/ main 2b73b2d
vendored/elpi/ skylabs-master c0b9653
vendored/flocq/ skylabs-master cf9cc84
vendored/rocq/ skylabs-master 7c6eef8
fmdeps/rocq-agent-toolkit/ main 3369c0f
vendored/rocq-elpi/ skylabs-master 7dee592
vendored/rocq-equations/ skylabs-main 9cf8471
vendored/rocq-iris/ skylabs-master a7af9f7
vendored/rocq-stdlib/ skylabs-master 00897b3
vendored/rocq-stdpp/ skylabs-master 0c5e505
fmdeps/skylabs-fm/ main 20adfbb
vendored/vsrocq/ skylabs-main 03db19e

Changes in Warnings or Errors

Before New Fixed After
Errors 0 0 0 0
Warnings 77 ${\color{red}1}$ 0 78

Performance

Relative Master MR Change Filename
+0.20% 193951.2 194348.6 +397.4 total
+0.20% - 397.4 +397.4 ├ newly appeared files (6)
+0.00% 193951.2 193951.2 +0.0 └ common files
+0.00% 50229.4 50229.4 +0.0 ├ translation units
+0.00% 143721.8 143721.8 +0.0 └ proofs and tests
Full Results
Relative Master MR Change Filename
+0.20% 193951.2 194348.6 +397.4 total
+0.20% - 397.4 +397.4 ├ newly appeared files (6)
+0.00% 193951.2 193951.2 +0.0 └ common files
+0.00% 50229.4 50229.4 +0.0 ├ translation units
+0.00% 143721.8 143721.8 +0.0 └ proofs and tests

@pgiarrusso-sl
pgiarrusso-sl marked this pull request as ready for review October 22, 2026 15:16
@skylabs-ai-ci

skylabs-ai-ci Bot commented Oct 24, 2026

Copy link
Copy Markdown

CI summary (Details)

Active Repos

Repo Job Branch Job Commit Branch Tip Base branch Base commit PR
fmdeps/brick-libcpp/ paolo/atomic-specs 2d72bdd 7d603cd main 3ac8d52 #127

Passive Repos

Repo Job Branch Job Commit
./ main 781c507
fmdeps/BRiCk/ main f054b14
fmdeps/auto/ main 693d659
fmdeps/auto-docs/ main 918aa33
bluerock/NOVA/ skylabs-proof 0573bd1
bluerock/bhv/ skylabs-main 42f282b
fmdeps/brick-libgtest/ main 495b855
fmdeps/ci/ main c1e1292
vendored/elpi/ skylabs-master c0b9653
vendored/flocq/ skylabs-master cf9cc84
vendored/rocq/ skylabs-master 7c6eef8
fmdeps/rocq-agent-toolkit/ main b307188
vendored/rocq-elpi/ skylabs-master 7dee592
vendored/rocq-equations/ skylabs-main 9cf8471
vendored/rocq-iris/ skylabs-master a7af9f7
vendored/rocq-stdlib/ skylabs-master 00897b3
vendored/rocq-stdpp/ skylabs-master 0c5e505
fmdeps/skylabs-fm/ main 4cd041a
vendored/vsrocq/ skylabs-main 03db19e

No Changes in Warnings or Errors

Before New Fixed After
Errors 0 0 0 0
Warnings 76 0 0 76

Performance

Relative Master MR Change Filename
+0.20% 195113.9 195511.1 +397.2 total
+0.20% - 397.2 +397.2 ├ newly appeared files (6)
-0.00% 195113.9 195113.9 -0.0 └ common files
-0.00% 49173.2 49173.2 -0.0 ├ translation units
+0.00% 145940.7 145940.7 +0.0 └ proofs and tests
Full Results
Relative Master MR Change Filename
+0.20% 195113.9 195511.1 +397.2 total
+0.20% - 397.2 +397.2 ├ newly appeared files (6)
-0.00% 195113.9 195113.9 -0.0 └ common files
-0.00% 49173.2 49173.2 -0.0 ├ translation units
+0.00% 145940.7 145940.7 +0.0 └ proofs and tests

Comment on lines 42 to +89
@@ -84,5 +86,6 @@ main() {
TestStore();
TestCAS();
TestArith();
TestFetchAdd();

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These test changes (and associated proof changes) should live in a separate commit, and be replicated in the other copy?

Reapply the namespace and base-class adaptations from the original port to the refreshed specs and proof tests.
Check assignment return and stored values, execute TestFetchAdd from main, and verify arithmetic and fetch-add cases separately.
@skylabs-ai-ci

skylabs-ai-ci Bot commented Oct 24, 2026

Copy link
Copy Markdown

CI summary (Details)

Active Repos

Repo Job Branch Job Commit Branch Tip Base branch Base commit PR
fmdeps/brick-libcpp/ paolo/atomic-specs 832f677 51896e0 main 3ac8d52 #127

Passive Repos

Repo Job Branch Job Commit
./ main 781c507
fmdeps/BRiCk/ main 1fa93cf
fmdeps/auto/ main b110d1c
fmdeps/auto-docs/ main 918aa33
bluerock/NOVA/ skylabs-proof 0573bd1
bluerock/bhv/ skylabs-main 42f282b
fmdeps/brick-libgtest/ main 495b855
fmdeps/ci/ main c1e1292
vendored/elpi/ skylabs-master c0b9653
vendored/flocq/ skylabs-master cf9cc84
vendored/rocq/ skylabs-master 7c6eef8
fmdeps/rocq-agent-toolkit/ main b307188
vendored/rocq-elpi/ skylabs-master 7dee592
vendored/rocq-equations/ skylabs-main 9cf8471
vendored/rocq-iris/ skylabs-master a7af9f7
vendored/rocq-stdlib/ skylabs-master 00897b3
vendored/rocq-stdpp/ skylabs-master 0c5e505
fmdeps/skylabs-fm/ main 4cd041a
vendored/vsrocq/ skylabs-main 03db19e

No Changes in Warnings or Errors

Before New Fixed After
Errors 0 0 0 0
Warnings 76 0 0 76

Performance

Relative Master MR Change Filename
+0.20% 194923.0 195304.5 +381.6 total
+0.20% - 397.2 +397.2 ├ newly appeared files (6)
-0.01% 194923.0 194907.3 -15.6 └ common files
-0.00% 49173.2 49173.2 -0.0 ├ translation units
-0.01% 145749.8 145734.1 -15.6 └ proofs and tests
Full Results
Relative Master MR Change Filename
+0.20% 194923.0 195304.5 +381.6 total
+0.20% - 397.2 +397.2 ├ newly appeared files (6)
-0.01% 194923.0 194907.3 -15.6 └ common files
-0.00% 49173.2 49173.2 -0.0 ├ translation units
-0.01% 145749.8 145734.1 -15.6 └ proofs and tests

@pgiarrusso-sl
pgiarrusso-sl merged commit d745fec into main Oct 24, 2026
1 check passed
@pgiarrusso-sl
pgiarrusso-sl deleted the paolo/atomic-specs branch October 24, 2026 13:14
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.

1 participant