Repository navigation
proof(SafeFPGA): add Proofs.idr — 17 structural invariants, 0 OWED - #34
Merged
Merged
Conversation
…132) `Proven.SafeFPGA` claimed "Invalid configurations are caught at validation time rather than during synthesis or at hardware programming time" but shipped no `Proofs.idr` — one of the ~30 named gaps under standards#132. This commit lands `src/Proven/SafeFPGA/Proofs.idr` with 17 machine-checked theorems. Zero believe_me, zero idris_crash, zero OWED postulates — every claim is type-level reducible. DISCHARGED (idris2 --check exit 0): Enum self-equality (6 + 5 = 11 cases): xilinx7SelfEq, ultraScaleSelfEq, versalSelfEq, cycloneVSelfEq, agilexSelfEq, latticeSelfEq (FPGAFamily) lutSelfEq, ffSelfEq, bramSelfEq, dspSelfEq, ioSelfEq (ResourceType) xilinx7VsVersalNotEq (cross-pair anchor) Resource-budget boundary (3): zeroUtilWithinBudget : 0% utilisation passes fullUtilWithinBudget : 100% utilisation passes (max-allowed) overUtilNotWithinBudget : 101% utilisation fails Bitstream-validator soundness (1): validateBitstreamPreservesConfig — `validateBitstream cfg = Just cfg' -> cfg' = cfg` (no silent mutation, clamping, or coercion of fields) Routing-congestion identity (1): emptyBudgetZeroCongestion : empty resource budget -> 0 congestion Timing-likely thresholds (2): emptyBudgetLowClockMeetsTiming : 500 MHz + empty -> True emptyBudgetHighClockMeetsTiming : 600 MHz + empty -> True Note: `IO` as a constructor of `ResourceType` is shadowed by `PrimIO.IO`, so `ioSelfEq` is qualified as `Proven.SafeFPGA.IO == Proven.SafeFPGA.IO`. This is a real ambiguity in the module's API that should be flagged for a future rename (e.g. `IOPin`). Verified locally: $ idris2 --check src/Proven/SafeFPGA/Proofs.idr 1/2: Building Proven.SafeFPGA 2/2: Building Proven.SafeFPGA.Proofs rc: 0 This closes one more of the ~30 named "no Proofs.idr" gaps under #132 — and this one cleanly, with no OWED debt. Refs metadatastician/standards#124, metadatastician/standards#132. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
| @@ -0,0 +1,168 @@ | |||
| -- SPDX-License-Identifier: PMPL-1.0-or-later | |||
🔍 Hypatia Security ScanFindings: 297 issues detected
View findings[
{
"reason": "Issue in quality.yml",
"type": "missing_workflow",
"file": "quality.yml",
"action": "create",
"rule_module": "workflow_audit",
"severity": "high"
},
{
"reason": "Issue in security-policy.yml",
"type": "missing_workflow",
"file": "security-policy.yml",
"action": "create",
"rule_module": "workflow_audit",
"severity": "medium"
},
{
"reason": "Action hyperpolymath/standards/.github/workflows/governance-reusable.yml@main needs attention",
"type": "unpinned_action",
"file": "governance.yml",
"action": "pin_sha",
"rule_module": "workflow_audit",
"severity": "high"
},
{
"reason": "Python file detected -- banned language",
"type": "banned_language_file",
"file": "/home/runner/work/proven/proven/bindings/python/benchmarks/test_benchmarks.py",
"action": "flag",
"rule_module": "cicd_rules",
"severity": "critical"
},
{
"reason": "Python file detected -- banned language",
"type": "banned_language_file",
"file": "/home/runner/work/proven/proven/bindings/python/proven/safe_email.py",
"action": "flag",
"rule_module": "cicd_rules",
"severity": "critical"
},
{
"reason": "Python file detected -- banned language",
"type": "banned_language_file",
"file": "/home/runner/work/proven/proven/bindings/python/proven/safe_retry.py",
"action": "flag",
"rule_module": "cicd_rules",
"severity": "critical"
},
{
"reason": "Python file detected -- banned language",
"type": "banned_language_file",
"file": "/home/runner/work/proven/proven/bindings/python/proven/safe_math.py",
"action": "flag",
"rule_module": "cicd_rules",
"severity": "critical"
},
{
"reason": "Python file detected -- banned language",
"type": "banned_language_file",
"file": "/home/runner/work/proven/proven/bindings/python/proven/safe_uuid.py",
"action": "flag",
"rule_module": "cicd_rules",
"severity": "critical"
},
{
"reason": "Python file detected -- banned language",
"type": "banned_language_file",
"file": "/home/runner/work/proven/proven/bindings/python/proven/safe_header.py",
"action": "flag",
"rule_module": "cicd_rules",
"severity": "critical"
},
{
"reason": "Python file detected -- banned language",
"type": "banned_language_file",
"file": "/home/runner/work/proven/proven/bindings/python/proven/safe_content_type.py",
"action": "flag",
"rule_module": "cicd_rules",
"severity": "critical"
}
]Powered by Hypatia Neurosymbolic CI/CD Intelligence |
|
🔍 Hypatia Security ScanFindings: 298 issues detected
View findings[
{
"reason": "Issue in quality.yml",
"type": "missing_workflow",
"file": "quality.yml",
"action": "create",
"rule_module": "workflow_audit",
"severity": "high"
},
{
"reason": "Issue in security-policy.yml",
"type": "missing_workflow",
"file": "security-policy.yml",
"action": "create",
"rule_module": "workflow_audit",
"severity": "medium"
},
{
"reason": "Action hyperpolymath/standards/.github/workflows/governance-reusable.yml@main needs attention",
"type": "unpinned_action",
"file": "governance.yml",
"action": "pin_sha",
"rule_module": "workflow_audit",
"severity": "high"
},
{
"reason": "Python file detected -- banned language",
"type": "banned_language_file",
"file": "/home/runner/work/proven/proven/bindings/python/benchmarks/test_benchmarks.py",
"action": "flag",
"rule_module": "cicd_rules",
"severity": "critical"
},
{
"reason": "Python file detected -- banned language",
"type": "banned_language_file",
"file": "/home/runner/work/proven/proven/bindings/python/proven/safe_email.py",
"action": "flag",
"rule_module": "cicd_rules",
"severity": "critical"
},
{
"reason": "Python file detected -- banned language",
"type": "banned_language_file",
"file": "/home/runner/work/proven/proven/bindings/python/proven/safe_retry.py",
"action": "flag",
"rule_module": "cicd_rules",
"severity": "critical"
},
{
"reason": "Python file detected -- banned language",
"type": "banned_language_file",
"file": "/home/runner/work/proven/proven/bindings/python/proven/safe_math.py",
"action": "flag",
"rule_module": "cicd_rules",
"severity": "critical"
},
{
"reason": "Python file detected -- banned language",
"type": "banned_language_file",
"file": "/home/runner/work/proven/proven/bindings/python/proven/safe_uuid.py",
"action": "flag",
"rule_module": "cicd_rules",
"severity": "critical"
},
{
"reason": "Python file detected -- banned language",
"type": "banned_language_file",
"file": "/home/runner/work/proven/proven/bindings/python/proven/safe_header.py",
"action": "flag",
"rule_module": "cicd_rules",
"severity": "critical"
},
{
"reason": "Python file detected -- banned language",
"type": "banned_language_file",
"file": "/home/runner/work/proven/proven/bindings/python/proven/safe_content_type.py",
"action": "flag",
"rule_module": "cicd_rules",
"severity": "critical"
}
]Powered by Hypatia Neurosymbolic CI/CD Intelligence |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Summary
`Proven.SafeFPGA` claimed "Invalid configurations are caught at validation time rather than during synthesis or at hardware programming time" but shipped no `Proofs.idr` — one of the ~30 named gaps under standards#132. This PR lands `src/Proven/SafeFPGA/Proofs.idr` with 17 machine-checked theorems and ZERO OWED postulates — every claim is type-level reducible.
Discharged (17)
Zero `believe_me`, zero `idris_crash`, zero OWED.
Note: latent API ambiguity flagged
`IO` as a constructor of `ResourceType` shadows `PrimIO.IO`, so `ioSelfEq` had to be qualified as `Proven.SafeFPGA.IO == Proven.SafeFPGA.IO`. This is a real ambiguity in the module's API and should be flagged for a future rename (e.g. `IOPin`).
Verification
```
$ idris2 --check src/Proven/SafeFPGA/Proofs.idr
1/2: Building Proven.SafeFPGA
2/2: Building Proven.SafeFPGA.Proofs
rc: 0
```
Refs
🤖 Generated with Claude Code