Repository navigation
Conversation
Resolve mapped target types before selecting a conversion sort. Accept only the typed identity operator promised by the mapping and keep arbitrary mapped instances unsupported. Add red/green coverage for cast constants, arithmetic and constructor read-back. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Lane: myia-po-2023:CoursIA
The resynchronized pile keeps the fork-only PartialEvaluator.PartialEval pre-pass in Theorem.TranslateConstraint. On a constraint such as t.X == (ExactReal)2.5 the fold turns the cast into a constant of the mapped type, which the visitor refuses, while the conversion node itself translates to the sort the mapping declares. The line cherry-picked from endjin#129 is therefore never reached on this pile. A constraint that mentions a conversion to a mapped type is now translated without the fold, the same shape as the existing exception-closure skip. Measured on 5071d6f with endjin#129 cherry-picked: 475 tests, 2 failures without the guard; 475/475 on net10.0 and 475/475 on net8.0 with it (the net8.0 leg on a probe-only multi-target scaffold, not committed). See jsboige/CoursIA#19237 See endjin#129 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Lane: myia-po-2023:CoursIA
The #40 row now names endjin#129 (OPEN) as the upstream correction and the fork-side fold guard as the second half of the fix. The net8.0 leg is stated as measured, on a probe-only multi-target scaffold, instead of pending; upstream is net10.0 by construction. See jsboige/CoursIA#19237 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Lane: myia-po-2023:CoursIA
… fix/40-mapped-type-conversion
Author
|
[ACTION] Pile remontée après le merge de #42 et la mise à jour de #49
Le build est relancé sur la nouvelle tête par le push ; je lis le verdict au prochain cycle et je corrige ici si une jambe tombe. Rien d'autre n'est attendu de vous sur cette PR pour l'instant. Lane myia-po-2023:CoursIA. |
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.
What and why
G4 follow-up for fork #40 on the resynchronized pile. On
endjin/main964f17704e, a constraint that converts a value to a mapped type —t.X == (ExactReal)2.5— raisesNotImplementedExceptioninVisitConvert. The upstream correction is endjin#129 (OPEN, basemain); this branch takes that line by cherry-pick (62e1bb1) and adds the piece the fork needs.The fork-specific second half
The cherry-pick alone does not fix this pile.
Theorem.TranslateConstraintkeeps the fork-onlyPartialEvaluator.PartialEvalpre-pass: on the cast, the host folds(ExactReal)2.5into aConstant<ExactReal>, and the visitor refuses that value beforeVisitConvert— the line endjin#129 corrects — is ever reached. The fork's residual defect therefore has a different signature than upstream's.ExpressionVisitor.MentionsMappedTypeConversionscans for a conversion whose target carries aTheoremVariableTypeMappingAttribute(Theorem.MappedType(node.Type) != node.Type), and the constraint is translated without the fold, the same shape as the existing exception-closure skip. An arbitrary instance of the mapped type stays unsupported, as endjin#129's fourth test asserts.Measurements
5071d6f+ endjin#129 cherry-picked, no guard62e1bb1adb7338System.NotSupportedException: Unsupported constant Z3.Linq.Tests.MappedTypeConversionTests+ExactRealatExpressionVisitor.VisitConstantValue; the 2 failing tests are Honour mapped types on conversion targets endjin/Z3.Linq#129's constant-cast and arithmetic pair —Solve_ConstantCastToMappedType_TranslatesUsingTheMappedSort(159 ms) andSolve_MappedSymbolsAndConstantsInArithmetic_RelateThem(152 ms).bin/Release/<tfm>/Z3.Linq.Tests.exe(MSTest/MTP): 5s 686ms atadb7338on net10.0, 4s 595ms on net8.0.Z3.Linq.TestsandZ3.Linq.Examplestemporarily multi-targeted in a probe worktree, not committed: upstream is net10.0-only bysolutions/Directory.Build.props, whileZ3.Linq.csprojalready replaces it withnet8.0;net10.0.Scope
5071d6f). If Resynchronize fork with endjin/main 964f177 #49 merges and its branch is deleted, GitHub retargets this PR tomain.DIVERGENCE_STATUS.md, the lane measures and proposes, it does not judge Howard's PRs. feat(theorem): Rational members as first-class exact real symbols (#39) #40's remaining defect is answered here on the resynchronized base; its symbol path is covered upstream byTheoremVariableTypeMappingAttribute, and the fork's exactRationalsupport stays local per the ledger.DIVERGENCE_STATUS.mdupdated: the feat(theorem): Rational members as first-class exact real symbols (#39) #40 row names Honour mapped types on conversion targets endjin/Z3.Linq#129 and the fold guard, the net8.0 leg is recorded as measured, and Honour mapped types on conversion targets endjin/Z3.Linq#129 is added to the open upstream PRs.🤖 Generated with Claude Code