refactor: make things monadic (rebased from PR #17)#22
Merged
GasStationManager merged 1 commit intomainfrom Mar 7, 2026
Merged
refactor: make things monadic (rebased from PR #17)#22GasStationManager merged 1 commit intomainfrom
GasStationManager merged 1 commit intomainfrom
Conversation
Port of monadic branch onto current main with all security hardening. Three-layer monad stack: ReaderT Settings (ReaderT Decls (StateT State IO)) - Settings: CLI config, allowed axioms (immutable) - Decls: parsed target/submission declarations (immutable after setup) - State: check outcomes + axiom violations (mutable) Key changes from original PR #17: - Integrated all security checks (import superset, Nat literal validation, Level/Expr rebuild, kernel re-verification, inductive/constructor checking) - Fixed axiom violation tracking: violations are now recorded in State.axiomViolations and checked in runMain, so submissions using disallowed axioms correctly fail (previously they were only logged to stderr) - checkAxioms and Info.toFailureMode take allowedAxioms as parameter - checkTargets reads from Decls context and writes to State - replayChallenges/replaySolutions read settings from ReaderT context - settingsFromParsed consolidates CLI argument parsing Co-authored-by: Paul Lezeau Supersedes #17.
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.
Rebased port of #17 (
monadicbranch by Paul Lezeau) onto current main with all security hardening integrated.Architecture
Three-layer monad stack:
ReaderT Settings (ReaderT Decls (StateT State IO))Changes from original PR #17
State.axiomViolationsand checked inrunMain, so submissions using disallowed axioms correctly exit 1checkAxiomsandInfo.toFailureModetakeallowedAxiomsas parameter (no global)checkTargetsreads from Decls context and writes outcomes to StatesettingsFromParsedconsolidates CLI argument parsingCo-authored-by: Paul Lezeau
Supersedes #17.
Test results (13 cases)
All 12 standard tests pass + dedicated axiom violation test confirms fix.