Skip to content

Commit 79f57ad

Browse files
Merge branch 'main' into dependabot/github_actions/actions/upload-artifact-7.0.0
2 parents 7492e23 + e854ec9 commit 79f57ad

6 files changed

Lines changed: 72 additions & 5 deletions

File tree

.github/workflows/codeql.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,12 @@ jobs:
2929
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
3030

3131
- name: Initialize CodeQL
32-
uses: github/codeql-action/init@0d579ffd059c29b07949a3cce3983f0780820c98 # v3.28.1
32+
uses: github/codeql-action/init@b1bff81932f5cdfc8695c7752dcee935dcd061c8 # v3.28.1
3333
with:
3434
languages: ${{ matrix.language }}
3535
build-mode: ${{ matrix.build-mode }}
3636

3737
- name: Perform CodeQL Analysis
38-
uses: github/codeql-action/analyze@0d579ffd059c29b07949a3cce3983f0780820c98 # v3.28.1
38+
uses: github/codeql-action/analyze@b1bff81932f5cdfc8695c7752dcee935dcd061c8 # v3.28.1
3939
with:
4040
category: "/language:${{ matrix.language }}"

.github/workflows/hypatia-scan.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ jobs:
130130
131131
- name: Comment on PR with findings
132132
if: github.event_name == 'pull_request' && steps.scan.outputs.findings_count > 0
133-
uses: actions/github-script@f28e40c7f34bde8b3046d885e986cb6290c5673b # v7
133+
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
134134
with:
135135
script: |
136136
const fs = require('fs');

.github/workflows/scorecard-enforcer.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
publish_results: true
3131

3232
- name: Upload SARIF
33-
uses: github/codeql-action/upload-sarif@0d579ffd059c29b07949a3cce3983f0780820c98 # v4
33+
uses: github/codeql-action/upload-sarif@b1bff81932f5cdfc8695c7752dcee935dcd061c8 # v4
3434
with:
3535
sarif_file: results.sarif
3636

.github/workflows/scorecard.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,6 @@ jobs:
2727
results_format: sarif
2828

2929
- name: Upload results
30-
uses: github/codeql-action/upload-sarif@0d579ffd059c29b07949a3cce3983f0780820c98 # v3.31.8
30+
uses: github/codeql-action/upload-sarif@b1bff81932f5cdfc8695c7752dcee935dcd061c8 # v3.31.8
3131
with:
3232
sarif_file: results.sarif
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
// SPDX-License-Identifier: PMPL-1.0-or-later
2+
= ppx-proven-record
3+
Jonathan D.A. Jewell <j.d.a.jewell@open.ac.uk>
4+
5+
ReScript PPX for verified record subset destructuring.
6+
7+
== Usage
8+
9+
[source,rescript]
10+
----
11+
@rest let { className, ?children, ...otherProps } = props
12+
----
13+
14+
Expands at compile time to explicit field extraction with a typed remainder.
15+
16+
== How It Works
17+
18+
The PPX implements the `computeComplement` algorithm from `proven/SafeRecord`,
19+
which is formally verified in Idris2 to produce exhaustive, disjoint partitions.
20+
The PPX is a direct transliteration — it does not call Idris2 at runtime, but
21+
implements the same algorithm the proofs guarantee correct.
22+
23+
== Formal Foundation
24+
25+
* Idris2 proofs: `proven/src/Proven/SafeRecord/`
26+
* Paper: `proven/docs/papers/safe-record-destructuring.adoc`
27+
* Ephapax linear spec: `nextgen-languages/ephapax/` (future)
28+
29+
== Build
30+
31+
[source,bash]
32+
----
33+
# The PPX is an OCaml binary (ReScript PPX convention)
34+
dune build
35+
----
36+
37+
== Status
38+
39+
Scaffolded. Implementation pending.
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
(* SPDX-License-Identifier: PMPL-1.0-or-later *)
2+
(* Copyright (c) 2026 Jonathan D.A. Jewell (hyperpolymath) <j.d.a.jewell@open.ac.uk> *)
3+
(*
4+
* ppx_proven_record — ReScript PPX for verified record subset destructuring.
5+
*
6+
* Transforms:
7+
* @rest let { className, ?children, ...otherProps } = props
8+
*
9+
* Into:
10+
* let className = props.className
11+
* let children = props.children
12+
* let otherProps = { onClick: props.onClick, style: props.style, ... }
13+
*
14+
* The algorithm is a direct transliteration of computeComplement from
15+
* proven/src/Proven/SafeRecord/Proofs.idr, which is formally verified
16+
* to produce exhaustive, disjoint partitions.
17+
*
18+
* Status: Scaffold — implementation pending.
19+
*)
20+
21+
(* TODO: Implement the PPX transformation using ppxlib *)
22+
(* Key steps:
23+
* 1. Find @rest attributes on let bindings
24+
* 2. Extract the requested field names from the pattern
25+
* 3. Look up the record type from the type environment
26+
* 4. Compute the complement (remaining fields)
27+
* 5. Generate explicit destructuring code
28+
*)

0 commit comments

Comments
 (0)