feat(types): wire backend consumers + fix z3 build + outcome module#24
Merged
hyperpolymath merged 2 commits intomainfrom Apr 20, 2026
Merged
feat(types): wire backend consumers + fix z3 build + outcome module#24hyperpolymath merged 2 commits intomainfrom
hyperpolymath merged 2 commits intomainfrom
Conversation
Step 3 of the native type-system plan: wire backends to consume TypeInfo
decorations, extend GNN graph awareness, and fix a pre-existing build
break.
Changes:
1. Fix pre-existing z3 build break:
- Create `src/rust/provers/outcome.rs` with `ProverOutcome` enum
(8 variants: Proved, InconsistentPremises, NoProofFound,
UnsupportedFeature, InvalidInput, Timeout, ProverError, SystemError)
- Move orphan `check` method from `impl ProverBackend for Z3Backend`
to its own `impl Z3Backend` block — it was not a trait member
- Result: `cargo check --lib` now passes cleanly (0 errors, 0 warnings)
2. Idris2 QTT multiplicity wiring:
- `export()` now reads `Definition.type_info.multiplicity` and emits
QTT annotations (`0 `, `1 `, or unrestricted) on type signatures
- Added `multiplicity_to_idris2()` helper mapping all Multiplicity
variants to Idris2 QTT syntax
- Removed duplicate local Multiplicity enum (now uses crate::types)
3. F* effect + refinement wiring:
- `to_input_format()` now reads `Definition.type_info.effects` and
emits F* effect prefixes (Tot, IO, ST, Exn, Div, GTot, ALL, Custom)
- Reads `type_info.refinement` and emits `{v:T | P}` syntax
- Added `effect_to_fstar()` helper
4. Dedukti exchange layer Sigma support:
- `term_to_dedukti()` renders `Term::Sigma` as `dk_sigma A (x => B)`
- `parse_dedukti_term()` parses `dk_sigma` back to `Term::Sigma`
5. GNN graph type-info awareness:
- Added `EdgeKind::HasMultiplicity`, `HasEffect`, `HasModality`
- `add_type_info_edges()` creates annotation nodes and edges from
hypothesis/definition type_info decorations
- Embeddings: added "sigma" label detection in feature extraction,
updated quantifier feature to include sigma binders
Test results: 587 passed, 0 failed, 0 clippy warnings.
https://claude.ai/code/session_01FYkVX52Tdn6Arp9dWfPLxq
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
Signed-off-by: Jonathan D.A. Jewell <6759885+hyperpolymath@users.noreply.github.com>
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.
Step 3 of the native type-system plan: wire backends to consume TypeInfo decorations, extend GNN graph awareness, and fix a pre-existing build break.
Changes:
Fix pre-existing z3 build break:
src/rust/provers/outcome.rswithProverOutcomeenum (8 variants: Proved, InconsistentPremises, NoProofFound, UnsupportedFeature, InvalidInput, Timeout, ProverError, SystemError)checkmethod fromimpl ProverBackend for Z3Backendto its ownimpl Z3Backendblock — it was not a trait membercargo check --libnow passes cleanly (0 errors, 0 warnings)Idris2 QTT multiplicity wiring:
export()now readsDefinition.type_info.multiplicityand emits QTT annotations (0,1, or unrestricted) on type signaturesmultiplicity_to_idris2()helper mapping all Multiplicity variants to Idris2 QTT syntaxF* effect + refinement wiring:
to_input_format()now readsDefinition.type_info.effectsand emits F* effect prefixes (Tot, IO, ST, Exn, Div, GTot, ALL, Custom)type_info.refinementand emits{v:T | P}syntaxeffect_to_fstar()helperDedukti exchange layer Sigma support:
term_to_dedukti()rendersTerm::Sigmaasdk_sigma A (x => B)parse_dedukti_term()parsesdk_sigmaback toTerm::SigmaGNN graph type-info awareness:
EdgeKind::HasMultiplicity,HasEffect,HasModalityadd_type_info_edges()creates annotation nodes and edges from hypothesis/definition type_info decorationsTest results: 587 passed, 0 failed, 0 clippy warnings.
https://claude.ai/code/session_01FYkVX52Tdn6Arp9dWfPLxq