feat(check): report a feature-owned multiplicity's featuring types and record type-system validation status - #503
Merged
Conversation
Co-Authored-By: jason.han <hanhuijun@gmail.com>
…model Co-Authored-By: jason.han <hanhuijun@gmail.com>
Co-Authored-By: jason.han <hanhuijun@gmail.com>
Contributor
Author
|
I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".
|
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
docs/project/spec-compliance.mdlisted four Type System items as not implemented — "Full generic/specialization validation", "Interface realization", "Redefinition conformance checking", "Subsetting validation". An audit of each against the pilot's namedvalidate*constraints found the list stale: every named specialization, redefinition and subsetting constraint is already reported (✅ in the census), one KerML rule was genuinely missing, and "interface realization" is not a SysML v2 concept.validateFeatureMultiplicityDomain(KerML 1.0 §8.3.3.3.4): a feature-ownedmultiplicitymust have the same featuring types as its feature. The only textual way to violate it is a standalonefeaturing of C::x::m by D;on the multiplicity, whichMultiplicityDomainPass(constraint tier, error, pilot wordingMultiplicity must have same featuring types as it feature) now reports on the relationship member. A target that is one of the feature's featuring contexts, or specializes one, is accepted; classifier-owned multiplicities (validateClassifierMultiplicityDomain, ⛔ deliberate) and unresolved ends are left alone. Census row ❌ → ✅ with a probe; the pipeline self-model gains the pass (56 → 57).validation-constraints.md:validateBindingConnectorTypeConformance(the value/feature typing judgment is the type tier's, where a mismatch is an error — a constraint-tier warning would let the constraint tier run over an ill-typed model),validateClassifierDefaultSupertype(theLinks::BinaryLinkrequirement is KerML §8.3.4.7 and is kept),validateFlowEndImplicitSubsetting(the same end is already rejected as inaccessible; the pilot's warning beside it would report one defect twice),validateExposeOwningNamespaceandvalidateRequirementConstraintMembershipOwningType(deliberate extensions: warning by default,-strictmatches the pilot),validateTransitionUsageSuccession(the state-machine reading is what the state executor runs).file:functionand test per rule; "Interface realization" is removed (UMLInterfaceRealizationhas no v2 counterpart — aninterface defis a connection between ports, and the two sides of an interaction are port conjugation); roadmap Track V figures updated; census counts regenerated.Audit summary (rule → pilot constraint → status):
validate{Class,DataType,Structure,Behavior}Specialization,validate{Association,Connector}BinarySpecialization,validateSpecializationSpecificNotConjugated,validateTypeAtMostOneConjugator,validateFeatureHasType,validate*UsageType,validate{Definition,Usage}VariationSpecializationvalidateClassifierDefaultSupertypevalidateInterface{Definition,Usage}End,validateInterfaceUsageType,validatePortUsage*— are ✅validateRedefinition{FeaturingTypes,EndConformance,DirectionConformance,MultiplicityConformance},validateSubsetting{Constant,Uniqueness}Conformance,validateFeatureValueOverridingvalidateSubsetting{FeaturingTypes,MultiplicityConformance},validateFeatureOwned{Reference,Cross}Subsetting,validateCrossSubsetting*,validateFeatureCrossFeature*,validateFlowEndSubsetting,validateFeatureMultiplicityDomainvalidateFlowEndImplicitSubsettingvalidateSubsettingPortionConformanceis a no-op in the pinned pilotCensus: 162 → 163 of 217 reported; 156 → 157 ✅; 6⚠️ ; 1 → 0 ❌; 1 ⛔; 0 🚧; 53 ❔.
Specification basis
KerML 1.0 §8.3.3.3.4 (Feature:
multiplicity.featuringType = featuringType), the pilot'sKerMLValidator.validateFeatureMultiplicityDomain. Moves the census row indocs/project/validation-constraints.mdand rewrites the Type System entries indocs/project/spec-compliance.md.How it was verified
internal/check/passes/multiplicity_domain_test.go: package-level and body-level standalone featuring are reported once each; a target that is the feature's owner, a featuring on the feature itself, a classifier-owned multiplicity and an unresolved target are silent.tools/census/validation/testdata/probes/validateFeatureMultiplicityDomain.kerml;go run -C tools ./cmd/validation-census -checkandgo test -C tools ./census/validationpass. The pinned pilot KerML validator was run over the probe and both negative shapes by hand: silent on all three (itsfeaturingTypereads only owned type featurings; its only trigger for this constraint is the defective alias/reference derivation recorded inomg-issues.md, which stays a valid model here).featuringoccurs in the corpora only inkerml-examples/Simple Tests/Features.kermland two rejection fixtures; a sweep overexamples/,tests/testdata/and the fixtures reports zeromultiplicity-featuring-typediagnostics.jar not found: 0):378 file(s), 347 fully agreeing; 38 agreed diagnostic(s), 38 only ours, 1185 only the pilot's429 .xt file(s), 0 unparsed; 1264 assertion(s), 1326 expectation(s): 1296 agree (of which 248 wording-only), 30 disagree, 0 unlocated, 0 not adjudicated306 case(s): 297 both reject, 0 only the pilot rejects, 9 only we reject, 0 both acceptpilot-differential-baseline.jsonprovenance.inputs[examples].digest: the self-model gained the new pass; no diagnostic or total moved. No rejection case was added — the pilot accepts the model, which the rejection corpus's policy records as a coverage gap rather than a case.training_examples_expected.txtis untouched.Checklist
make testandmake lintpass locallychanges/unreleased/<slug>.<section>.md, not as an edit toCHANGELOG.mdmake docs-countsrun if a gate count moved (compliance rows need nothing: the census is counted at docs build)F4,K5) in the body, docs, or changelog