feat(tensor): runtime value #2137
All Vouch review confidence checks passed
Residual risk 0.18 = Change Risk (0.33) × (1 − Review Confidence (0.47)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.33 · 158 lines diff across 1 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.02 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Shallow Review Depth
shallow_review_depth
0.344
Diff Size
diff_size
0.303
Real PR Conversation Timeline
1 comments
"Review active on #2137"
general
weight: 0.35
math-fehr
Adding a runtime representation of tensors was requested by @SamuelLess
This PR:
RuntimeValue.tensoras a flat, row-major element array + static shapetensor.empty, representing an empty tensor as an array of poison of the element type (Should be enough for now for Samuel to build on this)RuntimeValuefor the new.tensorconstructor, including recursive cases where refinement and conformance descend into tensor elementstensor.emptyConformsandDecidableEqfor.tensor: shapes must match, length must matchnumElements, and both conformance and equality recurse into the elementsEDIT:
-After rebasing onto main, which included #2116, the new
proveCombineValidtactic unfoldedRuntimeValue.isRefinedByand got stuck on the irreducible _unary form introduced by the recursive tensor case.-> Fixed by adding constructor @[simp] lemmas for isRefinedBy and stopping that unfold in the RISC-V combine proofs and related unit tests (@math-fehr , as an author of #2116, could you check if the changes in commit 60a3028 of this PR are okay?)