fix(migrate): count only written sends as senders, note UI-posted specializations, keep a misrouted send's argument note, name only written clock waits - #804
Merged
Conversation
…ed multiplicity takes Co-Authored-By: jason.han <hanhuijun@gmail.com>
…cializations, keep a misrouted send's argument note, and name only written clock waits A send action refused as a placeholder performs nothing, so it no longer counts as a sender of its signal: an accept of a signal only the tool's UI prototype posts is noted once every send is written. A button posting a signal specializing the accepted one raises the same note, naming the specialization. A send on a port that is not the sender's keeps its argument note beside the port note. An entry, exit or transition effect is noted as waiting for the clock only for a wait the writer writes: a duration constraint written as a wait, a time event whose time is spelled, or a called behavior that has a v2 declaration. 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)".
|
HuiJun
marked this pull request as ready for review
October 1, 2026 23:18
…e call is written invoking it A clock wait in a behavior named by a call written as a placeholder — one the writer refuses, its context unbound or its callee undeclared — or by a call that never fires, its target pin fed by nothing, is no wait of the caller: the writer invokes nothing there. The clock-wait scan now links the caller's graph as the writer does and follows only the calls written as invocations, skipping a node whose pin nothing fills, as the writer writes it without its wait. Co-Authored-By: jason.han <hanhuijun@gmail.com>
Co-Authored-By: jason.han <hanhuijun@gmail.com>
6 tasks done
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
Follow-up to #791, addressing the four post-merge review findings on its ledger logic. All four are generic to the migrator's report; no notation changes (the TMT export migrates to a byte-identical
TMT.sysml,-validatestill 0 errors; only the order of two joined notes moves).A refused send no longer counts as a sender.
recordSenderindexed everySendSignalAction/BroadcastSignalActionduringprepare, including onesendRefusallater writes as a placeholder (absent/dry/misfit argument), so an accept of a signal only the tool's UI prototype posts went un-noted when such a placeholder existed. NowsendSignalmarkssenders.sent[sig]only after it emitssend new …;, and the UI-only notes are deferred:uiAcceptrecords each accept (transition trigger, accept action) during writing, anduiOnlyAccepts— run afterplaceholderEnds, when every send is decided — annotates them through the report's pending-note path, so timing and verdict are unchanged for the cases already covered.A button posting a specialization raises the note.
unsentNoteonly looked upbuttons[sig]; a button postingLong Pause :> Pauseleft an accept ofPauseunnoted although the accept takes the specialization.buttonsPostingnow counts buttons postingsigor a signal inheriting from it (m.inherits, the same testsentByActionalready used for sends) and the note names the specializations:no send action of the document sends 'Pause' or a signal specializing it ('Long Pause'), which only 1 button ….A send on a port that is not the sender's keeps its argument note. Both invalid-port branches of
sendSignalassignednote = …, overwriting the argument notesignalArgumentshad produced; they nowjoinNotes, like the target-pin branch already did.clockWaitInnames only waits the writer writes. It reported a duration constraint as a wait whenever it had an interval (waitBound), and a time-event accept whenever the trigger named aTimeEvent, and followed called behaviors/methods regardless of whether the callee is written. An entry/exit/effect whose only "wait" the writer leaves as a placeholder (interval open above, time it cannot spell, callee without a v2 declaration) was therefore noted as stopping a run at a wait that does not exist. The duration decision is now factored intomigration.waitOf, shared byactivity.waitFor(the writer) andclockWaitIn;acceptsTimeasksacceptClause(pure) whether the first trigger is writable, with the same scope the writer uses (n.Parentis the activity or structured node whoseactivity.actwrites it); and a call is followed to its callee only when the writer emits it as an invocation:clockWaitInlinks the caller's graph as the writer does (scanGraph:newActivity→link/resolveData/deaden, without writing) andactivity.invokesapplies the writer's own rules — a callrefusalrefuses (unbound context, undeclared callee, no operation) is a placeholder, a library primitive is no call, an operation written as a usage whose target pin resolves no receiver is written as the empty step; a node whose pin nothing fills is skipped, as the writer writes it without its wait.Also carries the one-line
shaped(mult, r, true, false)repair from #800, whichdevelopneeds to build; it drops out of this diff when #800 lands.Specification basis
No runtime behaviour or compliance row moves; this is the migrator's ledger. UML 2.5.1 §13.3.3 (an accept of a signal takes instances of its specializations) is why a specialized posting counts for an accept of the general signal, on the UI side as it already did on the send side (
docs/reference/sysml-v1-migration.md, SignalEvent and instant-wait rows updated).How it was verified
tests/migrate/ui_stimuli.xmi+TestSignalsOnlyTheToolsUIPostsAreLedgered: addedPause/Long Pause :> Pausewith a button postingLong Pause(finding 2), andResumewith a requireddelayattribute, a send of it without an argument (a placeholder) and a button posting it (finding 1);_trPauseand_trResumeare noted,_sendResumecarries its own argument note.tests/migrate/instant_waits.xmi+TestInstantBehaviorsWaitingForTheClockAreLedgered: added transition effectSend Ack HoldcallingHold(duration constraint with only a min → unmapped) and accepting an absolute time event whose time names nothing (→ placeholder); the effect gets no "waits for the clock" note while the existing four waits still do (finding 4); addedSend Ack Settle, callingRelay::Settle(accepts a time event, readsgainthrough its context) from aStimulusthat cannot bind it — a placeholder — andSend Ack Pause, callingDelaythrough a target pin nothing feeds — never fires; neither is noted as waiting. Checked the never-fires shape against the runtime: an unconnectedaction call : Delay;besidefirst start then final; action final terminate;completes at clock 0.0, the connected one at 2.0.TestSendOnAnotherObjectsPortKeepsItsArgumentNote(new, insignal_absent_argument_test.go): a send with a surplus argument pin on another block's port; the note joins both reasons (finding 3).go build ./... && go vet ./... && gofmt -l .clean;go test -count=1 ./...all packages ok (incl.tests/corpus,tests/export,tests/identity,tests/model,tests/migrate);python3 scripts/changelog.py checkok.TMT-2024x.mdzip+ MTIP layout): migrated notation byte-identical todevelop+fix(migrate): pass the uniqueness argument the read result pin's shaped multiplicity takes #800;-validate0 errors; migration report differs only in the order of the two joined notes on the PEASAbortand MBClockticktriggers (the UI-only note is now appended after the port note).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