Skip to content

feat(semantics): hold action parameters as elements and derive their implied relationships - #2618

Open
devin-ai-integration[bot] wants to merge 27 commits into
developfrom
feature/implied-action-parameters
Open

devin-ai-integration[bot] wants to merge 27 commits into
developfrom
feature/implied-action-parameters

Conversation

@devin-ai-integration

@devin-ai-integration devin-ai-integration Bot commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

What and why

Part of #2415. Builds on #2509 and #2558.

The semantic model now holds, as elements, the parameters an action's notation states, and derives their implied relationships from the same computation that masking, inheritance, naming and reflection read. No option and no output surface is added: the default export, ids and round trips are unchanged.

Forms surveyed and the elements each now holds:

Form Elements
assignment target, target::startingAt, target::startingAt::accessedFeature, replacementValues
for the declared variable (var), seq, body
while / loop … until whileTest (empty for loop), body, untilTest
if ifTest, thenClause, elseClause
send payload, sender, receiver (already held; now redefine their kind's)
accept payload, receiver (already held; now redefine their kind's)
terminate terminatedOccurrence, when an operand is written
perform nothing to add: the pilot states no parameter for it either

Each is featured by the unnamed per-type snapshots feature of its owner (ImpliedTypeFeaturing.Snapshots), as the pilot's including export states it.

How they stay out of default output: the symbols are synthesized lazily in the reflective layer (controlPartsOf, memoized per action) and are not AST members, so the export, which walks declarations, never sees them. Where a parameter is an element the export already writes (send and accept parameters, a loop variable, a body written as an action), its positional id and unnamed membership are kept: naming.Table.EffectiveName and the export's memberNames do not take the role name an implied redefinition gives. Node parameters are also kept out of ShapeFeatures, so a runtime object gains no slot for them.

Shared computation: nodeParameters is the one list read by maskingRedefinedFeatures (inheritance), ownRedefinitions (inheritance loss), DirectSupertypes, EffectiveNamed (name resolution and qualifiedName), ValueExpression, ImpliedRedefinitions and ImpliedTypeFeaturings. A parameter's value is the node of the statement itself, the one lowering hands the executor (lower.Assign.Value, the loop's collection); a body written as an action usage is that usage, not a second element.

Specification basis

  • SysML v2 Table 32: checkAssignmentActionUsageSpecialization / SubactionSpecialization, checkIfActionUsageSpecialization / SubactionSpecialization, checkWhileLoopActionUsageSpecialization / SubactionSpecialization, checkForLoopActionUsageSpecialization / SubactionSpecialization (Actions::assignmentActions, ifThenActions, ifThenElseActions, whileLoopActions, forLoopActions; Actions::Action::assignments, ifSubactions, whileLoops, forLoops). Send, accept and terminate rows were already implemented.
  • SysML v2 Table 33: checkAssignmentActionUsageStartingAtRedefinition, checkAssignmentActionUsageAccessedFeatureRedefinition, checkAssignmentActionUsageReferentRedefinition: the table's three assignment rows. checkForLoopActionUsageVarRedefinition is a constraint of the metamodel that the table does not list; it is implemented with them.
  • KerML Table 9: checkFeatureParameterRedefinition for every other parameter above, and checkFeatureResultRedefinition for the test expressions.
  • KerML Table 11: checkFeatureFeatureMembershipTypeFeaturing for the new parameters and the assignment's access features, through snapshots.
  • KerML Table 8: no new row; the existing rows now apply to the new elements (a typed loop variable takes Base::dataValues).
  • Compliance map: the "Implied Redefinitions and TypeFeaturings" row of 25-structural-interface-and-analysis-notation.md and the assignment, loop and conditional rows of implicit-specialization-audit.md.

Not implemented, pinned in testdata/implied_relationships/differences.txt with the reason:

Reason Rows Belongs to
branch-action 14 follow-up: an action written as an if branch stays wrapped in a branch action, as the default export writes it; making it the parameter itself changes default export structure
typed-feature-base 14 specification decides: the pilot omits the base of a test typed by the library feature
sequence-nesting 23 specification decides (KerML 8.2.5.8.1)
loop-variable-subsetting 2 specification decides: no constraint has the variable subset seq
loop-variable-data-value 1 specification decides: checkFeatureDataValueSpecialization
value-featuring 20 (was 12) unchanged by snapshots: the specification gives a value expression its feature's featuring types; the new rows are the values of the new parameters
default-multiplicity 74 (was 64) not this series
lazy-operand 33 not this series
suboccurrence 5 (was 1) not this series
chain-target-feature 8, valuation-result 20, crossing 4 32 binding-connector pull request

action-parameter (46) and action-kind-feature (4) are gone: every such row now agrees with the pilot.

Baselines that moved

Default output, checked by converting 2,798 models before and after: no difference. The movements are on the symbol side or follow a corrected semantic:

  • editors/vscode/src/landing/mission.json: a LunarMission object now lists its seven assignment subactions under assignments (Table 32), so subactions is ordered differently and instance ids are renumbered. This is a runtime-visible change.

  • internal/ir/view/testdata/action-forms.*.golden: a send node no longer lists the inherited ^payload, ^sender, ^receiver rows, which its own parameters now redefine. This changes default diagrams.

  • tests/grpc/…/element_properties_send_action.expected.json: a send's parameters answer the names payload, sender, receiver; ids unchanged.

  • structure_differential_expected.txt (symbol versus export), per root in file order, different:

    Property root 1 root 2 root 3 root 4 root 5
    Element::name, Membership::memberName, OwningMembership::ownedMemberName 4912 → 4939 196 → 202 (198 → 204) 1001 → 1031 6004 → 6119 (6006 → 6121) 742 → 809 (745 → 812)
    Element::qualifiedName 0 → 14 – 20 → 36 6 → 36 0 → 33
    ActionUsage::actionDefinition, Step::behavior 722 → 815, 884 → 977 33 → 39, 41 → 47 170 → 177, 195 → 202 619 → 646, 762 → 789 175 → 196, 200 → 221
    Feature::type, OccurrenceUsage::occurrenceDefinition, Usage::definition +95 each +6 each +9 each +32 each +32 each

    Names: reflection names parameters the export leaves unnamed. Types: a control action written as a statement now specializes its kind (Table 32) and a body takes its implied typing, neither of which the export writes. In root 4, symbol-extra rises by 1 or 2 on the Namespace, Type, Feature, Relationship and Usage rows that count elements (for example Namespace::member 56 → 58), with equal falling by the same amount.

  • element_properties_agreement: new clauses symbol-86 (names of a stated parameter) and symbol-87 (deriveUsageMayTimeVary under an if clause written as a statement). value.txt: ParameterMembership::memberName 2851 → 2966, new OwningMembership::memberName 9 and PerformActionUsage::mayTimeVary 2. answered-not-exported.txt: ParameterMembership::ownedMemberName 2851 → 2966; ReferenceUsage::name 2 → 98 and qualifiedName 4 → 43; ActionUsage::definition and occurrenceDefinition 301 → 313, type 297 → 309, actionDefinition and behavior 300 → 297; the five definition/type properties of AssignmentActionUsage 15 → 126, ForLoopActionUsage 2 → 5, IfActionUsage 1 → 7, WhileLoopActionUsage 3 → 7; and new symbol-86 rows (ActionUsage::name 12 and qualifiedName 4, Feature::qualifiedName 14, FeatureReferenceExpression::name and qualifiedName 2, OperatorExpression::name 14 and qualifiedName 4, OwningMembership::ownedMemberName 9).

  • internal/semantic/metamodel/derived_census_records.tsv (derived census, our side; carriers and the recorded pilot column unchanged): nine rules answer a value where they answered none, summed over the corpus roots, each toward the pilot's count:

    Rule value before → after pilot
    ActionUsage::actionDefinition 2339 → 2494 2817
    Step::behavior 15932 → 16087 16607
    OccurrenceUsage::occurrenceDefinition 7678 → 7853 8396
    Usage::definition 18246 → 18421 20447
    Feature::type 51868 → 52043 58352
    Element::name 32091 → 32336 35666
    Membership::memberName 31205 → 31450 35709
    OwningMembership::ownedMemberName 31172 → 31417 35675
    Element::qualifiedName 13716 → 13809 14468

    The same two causes as the structure differential: stated parameters take the name of the parameter they redefine, and a control action written as a statement specializes its kind.

Known gaps

  • The stated parameters answer parameter, input, feature, ownedFeature and ownedElement, but not the membership side (ownedMember, ownedMembership, ownedFeatureMembership), and the gRPC GetElementProperties reader, which reads the membership structure and its ids, does not list them for assignment and loop actions. Giving them memberships changes positional ids of default output, so it belongs with the option and surfaces.
  • A send's payload, sender and receiver now resolve by qualified name to the send's own parameters; over gRPC that lookup previously answered the library's SendAction parameter.
  • gRPC GetElementProperties reads a parameter the element form holds no element for (a terminate's terminatedOccurrence, bare or with its occurrence, an assignment's target and replacementValues, a loop's seq and body) by qualified name as the feature of the action's kind it redefines, the same by that element's id; a for loop's variable reads as the parameter the loop owns. Spec target, follow-up: such a name answering the parameter its action owns, and parameter = [] for assignment, loop and terminate actions.

How it was verified

  • TestImpliedRelationshipsAgreeWithThePilotPerRow over rows.sysml, extended with every surveyed form and regenerated from the pilot's including export (548 → 769 rows).
  • reflective_control_parameters_test.go: parameters per form, Table 33 redefinitions, masking and naming, values, the declared loop body, no shape slot for node parameters.
  • gofmt -l ., go vet ./..., go build ./..., go test ./..., make lint, pilot-apijson-diff -check, the hygiene, doc-id and changelog checks.

Checklist

  • make test and make lint pass locally
  • Tests added or updated for the change
  • Documentation extended where it already covers the surface (see CONTRIBUTING.md)
  • Changelog entry added as changes/unreleased/<slug>.<section>.md, not as an edit to CHANGELOG.md
  • baselines regenerated and make docs-counts run if a gate count moved (compliance rows need nothing: the census is counted at docs build)
  • No internal work-item labels (waves, slices, F4, K5) in the body, docs, or changelog

🟢 Devin fixed all 4 findings · Follow Devin's work

Devin Review

devin-ai-integration Bot and others added 5 commits November 24, 2026 19:33
…minate actions

An action written as an assignment, a conditional or a loop subsets the feature of its kind
(SysML Table 32) and holds the parameters its notation states; so do send, accept and terminate
actions. Each parameter redefines the parameter of its kind (SysML Table 33, KerML
checkFeatureParameterRedefinition), is featured by the snapshots of its action and masks the
inherited parameter it redefines. Name resolution, inheritance, derived names and the reflective
structure read the same parameters; element ids and the default export are unchanged.

Extends the implied-relationship oracle fixture with the control forms and re-records the
structure differential and the action-forms view goldens, whose send action no longer lists the
inherited parameters it redefines.

Part of #2415

Co-Authored-By: Nicolas Rouquette <nicolas.f.rouquette@jpl.nasa.gov>
… a written loop body as the body parameter

Co-Authored-By: Nicolas Rouquette <nicolas.f.rouquette@jpl.nasa.gov>
…s and re-record the landing mission

Co-Authored-By: Nicolas Rouquette <nicolas.f.rouquette@jpl.nasa.gov>
…tion-parameters

Co-Authored-By: Nicolas Rouquette <nicolas.f.rouquette@jpl.nasa.gov>
…ree and pin the typed loop variable's data value

Co-Authored-By: Nicolas Rouquette <nicolas.f.rouquette@jpl.nasa.gov>
@devin-ai-integration

Copy link
Copy Markdown
Contributor Author

I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".

  • Disable automatic comment, CI, and merge conflict monitoring

@devin-ai-integration

Copy link
Copy Markdown
Contributor Author

QA: FAIL — 6296cb5927 against develop f26f349d14

The parameters now appear in REPL %eval and sysml -e for every node kind, and nothing else moved, but the surfaces do not agree with each other: four failures below. Tested with one model holding in/out/inout parameters, assign, while, loop … until, for, if, send, accept, terminate, nested, inherited (:>) and redefined nodes, and a second model with none of them, both run on base and head.

QA run: the six comparisons, base vs head

Failures

1. gRPC GetElementProperties still returns no parameter for assign, while, loop and for nodes. Head REPL/sysml -e answer ["target", "replacementValues"], ["whileTest", "body", "untilTest"], ["i", "seq", "body"]; GetElementProperties(elementId: P::Base::assignCount, properties: [parameter]) answers [] for all four on head, as on base. if and send are listed (and now named). gRPC Evaluate of SequenceFunctions::last(P::Base::assignCount.metadata).parameter.name does return them, so the two gRPC calls disagree too.

gRPC parameter lists empty

2. replacementValues is an in parameter that is listed as an output. On head assignCount.parameter.direction = [in, in], assignCount.input = ["target", "replacementValues"], and assignCount.output = ["replacementValues"].

3. An accept action lists its payload parameter twice in .feature, and .parameter drops payload. For action acc1 accept r : Sig via t; head acc1.feature.qualifiedName starts acc1::r, acc1::receiver, acc1::r, … (base: acc1::r once). acc1.parameter goes from ["r", "payload", "receiver"] on base to ["r", "receiver"] on head; if r is meant to stand as payload, it is not named so, and it is still listed twice.

direction/output mismatch and duplicated accept feature

4. A parameter element addressed directly over gRPC has no properties. Head GetElementProperties on P::Base::whileAct::whileTest and P::Sys::msg::s::payload resolves the element but returns empty qualifiedName, name, owner, owningType and featuringType; head REPL gives P::Base::whileAct::whileTest owned by P::Base::whileAct for the same element. On base P::Sys::msg::s::payload resolved to the library Actions::SendAction::payload with all five filled, so this lookup lost information. P::Base::assignCount::target and P::Base::forAct::i are not found by that call at all.

direct element lookup returns empty properties

The gap from #2617

Partly closed. REPL %eval and sysml -e now list the assign/while/loop/for parameters, which they did not on #2617. %query / sysml -query / gRPC Query still do not return them (rdf:type=sysml:ReferenceUsage, sysml:ParameterMembership, sysml:OperatorExpression and sysml:declaredName="i" give the same answers as base), and on this branch gRPC GetElementProperties does not list them either (failure 1), so the disagreement is now the other way round. The two branches conflict when merged (7 files, among them reflective_action_nodes.go and model.go), so the combination was not run.

Passed

  • REPL %eval and sysml -e: .parameter for assign, while, loop, for, if, send, terminate, nested (forNested), inherited (Derived::assignMore) and redefined (Redef::assignCount) nodes; qualified names and owner of the parameters; declared in/out/inout lists (Base.input, Base.output, Redef.parameter, nested::inner.parameter) same as base.
  • Same output as base, byte for byte, on both models: -validate, api-json, Turtle, notation, inherited-members JSON, api-json and Turtle round trips back to notation and to api-json, sysml -query, renders (text, mermaid, plantuml, d2), execution of Base, Derived, Redef, Base::nested and traces, REPL %instantiate + %features.
  • gRPC, same as base: ParseSources, diagnostics, Query, Convert (api-json, turtle, sysml), ExecuteAction with and without bound inputs (start=5, acc=2).
  • LSP (sysml-lsp over stdio): outline, hover on every identifier, diagnostics, semantic tokens, inlay hints, folding, code lens, references, definitions — same as base on both models.
  • 300 repository fixtures (220 runtime conformance models using assign/while/loop/for/send/accept/terminate/perform, 80 export convert models): -validate -json and api-json same as base for all 300.
  • Past fixes: the semantics, reflection, query, export, action/runtime, REPL, LSP and gRPC rows of the fix inventory were checked by running the packages their tests live in on head, all green: ./internal/semantic/..., ./internal/doc/queryexec/..., ./internal/doc/querytranslate/..., ./internal/ir/view/..., ./internal/check/passes/..., ./tests/resolve/..., ./tests/model/..., ./internal/workspace/model/..., ./internal/exec/runtime/..., ./internal/frontend/repl/..., ./internal/frontend/symbolfacts/..., ./internal/frontend/lsp/..., ./cmd/sysml/..., ./internal/frontend/grpc/..., ./tests/grpc/..., ./internal/translate/export/..., ./tests/export/....

Not run

  • The VS Code extension GUI (the editor flows were driven against sysml-lsp directly).
  • gRPC RenderView and ExportGraphs; XMI export/import; dot and drawio render forms.
  • tests/corpus sweeps, -race, and the rest of go test ./...; inventory rows were not run one by one, only through their packages.
  • fix(semantics): reflect action node parameters #2617 and this branch together (merge conflicts).

devin-ai-integration Bot and others added 3 commits November 25, 2026 00:40
…scope

A `for` loop's collection is evaluated before the body is entered, so the
parameter that holds it binds its name where the resolver does, not among
the declarations of the body.

Co-Authored-By: Nicolas Rouquette <nicolas.f.rouquette@jpl.nasa.gov>
ownedFeature and ownedElement of an assignment, loop, if, send, accept or
terminate action now hold the parameters its notation states, each once.

Co-Authored-By: Nicolas Rouquette <nicolas.f.rouquette@jpl.nasa.gov>
…statement

An assignment, loop or if action written without the `action` keyword now
specializes the feature of its kind (SysML Table 32) and its parameters
redefine those of that kind, as the declared form does. Reflection answers
more than the default export writes for these statements, so the structure
differential and the element-properties agreement record the movement; the
mayTimeVary of a usage under an if clause is adjudicated for the symbol.

Co-Authored-By: Nicolas Rouquette <nicolas.f.rouquette@jpl.nasa.gov>

@devin-ai-integration devin-ai-integration Bot left a comment •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 4 findings. Devin automatically fixed all 4 findings.

Fixed by Devin (4)
  • Loop variable names fail round-trip — Reproduced for a quoted name (P::Base::quoted::'my var'); the segment is unquoted and compared with the declared name and short name. A short-name-only variable already resolved and is now pinned by the test.
  • Inherited loop variables go unreadable — Reproduced with P::Derived::plain::i; the loop is now found through the inherited-member lookup when the path does not declare it. Same function as the first finding, so one commit.
  • Missing variables on inherited quoted loops — The wrong-variable answer did not reproduce (the read answered element not found), but the member walk does split such a segment, so the loop found must now answer to the path segment that names it; a test pins P::Derived::'step::inner'::wrong as not found.
  • Escaped variable lookup returns wrong element — Reproduced as element not found for P::Base::escaped::'a\tb'; the path is now split into the notation's segments, so the escape is read as the lexer reads it, and the test checks the variable is answered rather than the body action atb.

View findings in Devin Review · Follow Devin's work

Devin Review

An assignment's replacementValues is an input redefining the inout parameter of
AssignmentAction, which was still listed as an output of the assignment.

Co-Authored-By: Nicolas Rouquette <nicolas.f.rouquette@jpl.nasa.gov>
@devin-ai-integration

Copy link
Copy Markdown
Contributor Author

On the four QA failures above:

  1. replacementValues as both input and output: confirmed and fixed in 3de3556. The assignment's in parameter redefines the inout parameter of AssignmentAction, which was still inherited as an output; TestStatedParametersMaskTheOutputsTheyRedefine covers it.
  2. Accept payload listed twice in feature: fixed in df01b6e. parameter answering the declared payload (r) and receiver is intended: the declared payload is the payload parameter, under its own name.
  3. and 4. gRPC GetElementProperties listing no parameter for assignment and loop actions, and a stated parameter read directly answering no properties: not fixed here. That reader works over the membership structure and its ids, and the stated parameters have no membership; giving them one changes positional ids of default output, which this change must leave as it is. Recorded under "Known gaps" in the description, for the change that adds the option and its surfaces.

devin-ai-integration Bot and others added 2 commits November 25, 2026 01:04
…node's argument

An action node's parameters are now read during name lookup, where binding a
chain's target as a name of the node's scope reported it unresolved:
`send via this to aa.target`.

Co-Authored-By: Nicolas Rouquette <nicolas.f.rouquette@jpl.nasa.gov>
…parameters

Nine rules answer a value where they answered none, on the same carriers and
toward the recorded pilot column: the names of stated parameters and the
types of control actions written as statements.

Co-Authored-By: Nicolas Rouquette <nicolas.f.rouquette@jpl.nasa.gov>
@NicolasRouquette
NicolasRouquette added this pull request to the merge queue Nov 25, 2026
@NicolasRouquette
NicolasRouquette removed this pull request from the merge queue due to a manual request Nov 25, 2026
devin-ai-integration Bot and others added 9 commits November 25, 2026 05:49
…tion

A parameter an action's notation states is an input; the payload was listed
by the direction the parser gives it.

Co-Authored-By: Nicolas Rouquette <nicolas.f.rouquette@jpl.nasa.gov>
…Reference

The comment ran over two lines and left out the outward lookup a qualified
target falls back to.

Co-Authored-By: Nicolas Rouquette <nicolas.f.rouquette@jpl.nasa.gov>
The test read no parameter, so it passed without showing that an edit drops
the cached parameter symbols of control and send actions.

Co-Authored-By: Nicolas Rouquette <nicolas.f.rouquette@jpl.nasa.gov>
A control statement written in the unnamed body of a loop specialized the
kind's base usage (Actions::assignmentActions) rather than the subaction
feature of the body that owns it (Actions::Action::assignments), so an
assignment's target redefined the wrong parameter.

Co-Authored-By: jason.han <hanhuijun@gmail.com>
The derived census records and the structure differential are re-recorded over
the merged tree: the same nine rules move as before the merge.

Co-Authored-By: Nicolas Rouquette <nicolas.f.rouquette@jpl.nasa.gov>
Co-Authored-By: Nicolas Rouquette <nicolas.f.rouquette@jpl.nasa.gov>
… examples

Co-Authored-By: jason.han <hanhuijun@gmail.com>
devin-ai-integration Bot and others added 2 commits November 26, 2026 05:11
…o subaction

The shortcut for control statements of an unnamed loop body also took a declared
`ref action` assignment, which the subaction rule excludes. Only a bare statement,
always composite, takes it now; a declared one follows the usage rules.

Co-Authored-By: Nicolas Rouquette <nicolas.f.rouquette@jpl.nasa.gov>
@HuiJun
HuiJun added this pull request to the merge queue Nov 26, 2026
@devin-ai-integration

Copy link
Copy Markdown
Contributor Author

QA: FAIL — 4f84759130 against develop 8a3d580ad8

Two of the four earlier failures are gone (2 and 3), and the default export, ids, round trips, execution, LSP and every gate below are the same as develop or green. Two remain (1 and 4), failure 4 now also on elements develop answered, and one GetElementProperties answer that was right on develop is now empty (5). Tested with the same two models as before: one holding in/out/inout parameters, assign, while, loop … until, for, if, send, accept, terminate, nested, inherited (:>) and redefined nodes, and a second with none of them, both run on base and head.

Reproducer for every failure: sysml-grpc on each build, ParseSources of the model below, then the call quoted.

p.sysml
package P {
    private import ScalarValues::*;
    attribute def Sig { attribute v : Integer; }
    action def Base {
        in start : Integer;
        out result : Integer;
        inout acc : Integer;
        attribute count : Integer := 0;
        attribute total : Integer := 0;
        first start;
        then action assignCount assign count := start + 1;
        then action whileAct while count < 5 { assign count := count + 1; }
        then action loopAct loop { assign total := total + 1; } until total >= 3;
        then action forAct for i : Integer in (1, 2, 3) { assign total := total + i; }
        then action ifAct if total > 3 { assign count := 0; } else { assign count := 1; }
        then action forNested for j : Integer in (1, 2) {
            action innerWhile while count < 2 { assign count := count + 1; }
        }
        then action nested {
            in x : Integer;
            out y : Integer;
            action inner { in a : Integer; out b : Integer; inout c : Integer; }
            action innerAssign assign total := total + 1;
        }
        then action termAct terminate nested;
        then done;
    }
    action def Derived :> Base { action assignMore assign count := count + 10; }
    action def Redef :> Base {
        in redefines start : Integer;
        action redefines assignCount assign count := start + 2;
    }
    part def Sys {
        port t;
        part target;
        action msg {
            action s send new Sig(1) via t to target;
            then action acc1 accept r : Sig via t;
            then action sendBare send new Sig(2) to target;
        }
    }
    action usage1 : Base;
    action usageSub :> usage1;
}

Failures

1. (earlier failure 1, unchanged) gRPC GetElementProperties still returns no parameter for assign, while, loop and for nodes, and the two gRPC calls still disagree. GetElementProperties(elementId: P::Base::assignCount, properties: [parameter, input]) answers [] / [] on head, as on base; the same for whileAct, loopAct, forAct, forNested, nested::innerAssign, Derived::assignMore and Redef::assignCount. On the same server and model hash, Evaluate of SequenceFunctions::last(P::Base::assignCount.metadata).parameter.name answers ["target", "replacementValues"], and ["whileTest", "body"], ["whileTest", "body", "untilTest"], ["i", "seq", "body"] for the loops; REPL %eval and sysml -e answer the same as Evaluate. The PR description now lists this under Known gaps; it is reported because it is the disagreement this QA was asked to see closed.

4. (earlier failure 4, unchanged and wider) A parameter addressed by qualified name over gRPC has no properties. Head GetElementProperties(elementId: <name>, properties: [qualifiedName, name, owner, owningType, featuringType]) resolves the element and returns all five empty for:

element head resolves to base
P::Base::whileAct::whileTest, ::body P__Base__whileAct_pwhileCondition, P__Base__whileAct___402 not found
P::Base::loopAct::untilTest P__Base__loopAct_puntilCondition not found
P::Base::assignCount::replacementValues P__Base__assignCount_pvalue not found
P::Base::forAct::seq, ::body P__Base__forAct_pcollection, P__Base__forAct___402 not found
P::Base::ifAct::ifTest, ::thenClause, ::elseClause P__Base__ifAct_pcondition, …___400___400, …___400___401 not found
P::Sys::msg::s::payload P__Sys__msg__s___400 Actions::SendAction::payload, all five filled
P::Sys::msg::s::receiver P__Sys__msg__s___402 Transfers::SendPerformance::receiver, all five filled
P::Sys::msg::acc1::receiver P__Sys__msg__acc1___400 Transfers::AcceptPerformance::receiver, all five filled
P::Base::termAct::terminatedOccurrence P__Base__termAct___400 Actions::terminateActions::terminatedOccurrence, all five filled

The last four lost information against develop. The Known gaps entry covers a send's parameters resolving to the send's own elements; it does not say the answer is empty, and accept and terminate are not named. The same elements addressed by id answer all five on head (elementId: P__Sys__msg__acc1___400 → P::Sys::msg::acc1::receiver, owner P::Sys::msg::acc1; P__Base__ifAct_pcondition → P::Base::ifAct::ifTest), so the two lookups of one element disagree. P::Base::assignCount::target and P::Base::forAct::i are still not found, while Evaluate lists both under those qualified names.

5. (new) GetElementProperties(input) of an if node went from three elements to none. GetElementProperties(elementId: P::Base::ifAct, properties: [parameter, input]): base parameter and input both list P__Base__ifAct_pcondition, P__Base__ifAct___400___400, P__Base__ifAct___400___401; head parameter lists the three and input is []. Head Evaluate of SequenceFunctions::last(P::Base::ifAct.metadata).input.name answers ["ifTest", "thenClause", "elseClause"].

Earlier failures that are gone

  • 2. assignCount.output is [] on head (parameter.direction = [in, in], input = ["target", "replacementValues"]).
  • 3. acc1.feature.qualifiedName lists P::Sys::msg::acc1::r once; acc1.parameter is ["r", "receiver"], both owned by acc1, with r standing as the payload, and GetElementProperties(parameter) agrees (r, receiver).

Observations, not counted as failures

  • Directions do not line up with input for the stated parameters: head whileAct.parameter.direction = [in] for two parameters, loopAct and forAct give two for three, ifAct gives none for three, while .input lists every one of them.
  • Addressed by id, P__Sys__msg__acc1___400 and P__Sys__msg__acc1___401 both answer the qualified name P::Sys::msg::acc1::receiver on head.
  • Diagrams: -render '#action:P::Base' and gRPC RenderView (#action, #mixed) drop the inherited rows of send (^payload, ^sender, ^receiver), as the description says, and also of accept (^receiver) and terminate (^terminatedOccurrence), which "Baselines that moved" does not name. Nothing else in any render form moved.
  • %query / sysml -query / gRPC Query still do not return the stated parameters (same answers as base), as in the earlier comment.

Passed

  • Exact head 4f847591302da47d21f0b64b04be8675d217e7f7 (contains develop 142a01d5db), base worktree at 8a3d580ad8.
  • go build ./..., go vet ./..., gofmt -l . (empty) on head.
  • -race, corpora downloaded and every OPENSYSML_REQUIRE_* variable set: ./internal/semantic/..., ./internal/frontend/grpc, ./internal/frontend/repl, ./internal/ir/view, ./internal/translate/export, ./tests/corpus, ./tests/export — all green.
  • go test ./... once on head, not -race — green, 141 packages, same variables set.
  • Recorders, without re-recording: go run -C tools ./cmd/derived-census -check and -check -recorded-pilot, go run -C tools ./cmd/pilot-apijson-diff -check (pilot exporter provisioned; 950 files), and the structure differential (TestSymbolStructureMatchesGraphStructure, no -update-structure-differential) all reproduce the committed baselines; the worktree is clean afterwards.
  • REPL %eval and sysml -e agree with each other on both builds (224 evaluations over 28 nodes × 8 expressions), and on head list .parameter for assign, while, loop, for, if, send, accept, terminate, nested (forNested, nested::innerAssign; forNested::innerWhile, declared inside a for body, does not resolve on either build), inherited (Derived::assignMore, Derived::assignCount) and redefined (Redef::assignCount) nodes, with qualified names and owners; declared in/out/inout lists (Base, Derived, Redef, nested, nested::inner, usage1, usageSub) same as base. The second model answers the same as base everywhere.
  • Same output as base, byte for byte, on both models: -validate and -validate -json, api-json, api-json -inherited-members, Turtle, notation, api-json and Turtle round trips back to notation and to api-json/Turtle, sysml -query, #tree renders (text, mermaid, plantuml, d2, dot, drawio), execution of Base with bound inputs, Derived, Redef, Sys::msg, Base::nested and their traces, REPL %instantiate.
  • gRPC, same as base: ParseSources, GetDiagnostics, Query (five queries), Convert (api-json, turtle; notation per document), ExecuteAction with trace, with and without bound inputs, ExportGraphs.
  • LSP (sysml-lsp over stdio): outline, hover, definition and references on every identifier, diagnostics, semantic tokens, inlay hints, folding, code lens — same as base on both models (755 answers).
  • 300 repository fixtures (220 runtime conformance models, 80 export convert models): -validate -json and api-json same as base for all 300.

Not run

  • The VS Code extension GUI (the editor flows were driven against sysml-lsp directly); the Jupyter kernel and MCP binaries.
  • XMI export (not a written form) and import.
  • Base was not put through the Go gates; it was built and used only for the surface comparison.
  • Fix-inventory rows were not run one by one, only through the full suite.

@devin-ai-integration
devin-ai-integration Bot removed this pull request from the merge queue due to a manual request Nov 26, 2026
devin-ai-integration Bot and others added 2 commits November 26, 2026 09:13
…own model

A qualified name resolves through the symbol context's semantic model, which
synthesizes an action's parameters and branches apart from the element
reader's. GetElementProperties placed that foreign symbol in its structure, so
the parameter answered every property empty and a later read of its if action
lost its inputs. The reader now maps the symbol to the one its own model holds,
by role and then by element id, and answers element not found for a parameter
the element form holds no element for.

Co-Authored-By: Nicolas Rouquette <nicolas.f.rouquette@jpl.nasa.gov>
…ent's exclusion

A parameter the element form holds no element for shares its span, and so its
id, with the expression bound to it: reading replacementValues or seq by name
answered the operand expression. The reader now accepts the element behind the
id only when it is the same parameter. The document's exclusion is checked
before the parameter is mapped, so a parameter of an excluded document answers
that document's error.

Co-Authored-By: Nicolas Rouquette <nicolas.f.rouquette@jpl.nasa.gov>
@devin-ai-integration

Copy link
Copy Markdown
Contributor Author

QA: FAIL — 8be9431a95 against develop 142a01d5db

Stopped early at the terminatedOccurrence failure, on request, because a new head is coming: only the gRPC reproducers of the earlier failures 1, 4 and 5 were run. Everything under "Not run" is unverified on this head. Base is 142a01d5db, the develop this head contains (not the current develop 6f13c63949).

Method: sysml-grpc built from each commit, ParseSources of p.sysml from the earlier comment and of t.sysml below, then the call quoted. The five properties are qualifiedName, name, owner, owningType, featuringType.

t.sysml
package T {
    action def A {
        action sub;
        first start;
        then action termArg terminate sub;
        then action termBare terminate;
        then done;
    }
}

Failures

A. A terminate's terminatedOccurrence, written with an operand, is not found by qualified name. GetElementProperties(elementId: <name>, lookup: name, properties: [the five]):

shape element base head
with an operand, action termArg terminate sub; T::A::termArg::terminatedOccurrence Actions::terminateActions::terminatedOccurrence, all five filled no symbol named 'T::A::termArg::terminatedOccurrence' in this model
with an operand, action termAct terminate nested; (p.sysml) P::Base::termAct::terminatedOccurrence Actions::terminateActions::terminatedOccurrence, all five filled no symbol named 'P::Base::termAct::terminatedOccurrence' in this model
bare, action termBare terminate; T::A::termBare::terminatedOccurrence Actions::terminateActions::terminatedOccurrence, all five filled same as base

The bare shape is right on both. The operand shape must resolve to the owned parameter (SysML 8.4.13.8, KerML 8.3.3.3.4 effectiveName()), and head's own Evaluate says it exists: SequenceFunctions::last(T::A::termArg::terminatedOccurrence.metadata).qualifiedName answers T::A::termArg::terminatedOccurrence (base: Actions::terminateActions::terminatedOccurrence), and SequenceFunctions::last(T::A::termArg.metadata).ownedFeature.qualifiedName answers ["T::A::termArg::terminatedOccurrence"] (base []; termBare [] on both). On the same head GetElementProperties(elementId: T::A::termArg, properties: [parameter, input]) answers parameter: [] and input: [Actions::terminateActions::terminatedOccurrence], as on base, so the two gRPC calls disagree about the same action. The id the earlier comment saw, P__Base__termAct___400, is not found on either build.

B. (rest of earlier failure 4) Two parameters found by qualified name still have no qualifiedName and no name. Head:

elementId (lookup: name) resolves to qualifiedName, name owner owningType, featuringType
P::Base::assignCount::replacementValues P__Base__assignCount_pvalue empty P::Base::assignCount empty
P::Base::forAct::seq P__Base__forAct_pcollection empty P::Base::forAct empty

The same two by id answer the same on head and on base, so name and id agree, but an element found under a qualified name answers no qualified name. Head Evaluate names both (assignCount.parameter.name = ["target", "replacementValues"], forAct.parameter.name = ["i", "seq", "body"]). Base: not found by name.

Earlier failures that are gone

  • 5. GetElementProperties(elementId: P::Base::ifAct, properties: [parameter, input, output]) on head: parameter and input both list P__Base__ifAct_pcondition, P__Base__ifAct___400___400, P__Base__ifAct___400___401 (base: the same three ids, unnamed), output []. Evaluate of SequenceFunctions::last(P::Base::ifAct.metadata).input.name answers ["ifTest", "thenClause", "elseClause"]. The answer is the same before and after the 21 qualified-name reads.
  • 4, for these elements. By qualified name, head answers all five, the same as by id, for P::Base::ifAct::ifTest, ::thenClause, ::elseClause, P::Sys::msg::s::payload, ::sender, ::receiver, P::Sys::msg::sendBare::payload, ::receiver and P::Sys::msg::acc1::receiver (each now the action's own element, owner the action; base answered the library feature for the send and accept ones). P::Base::whileAct::whileTest and P::Base::loopAct::untilTest answer qualifiedName, name and owner with owningType and featuringType empty, by name and by id alike.

Known gap (documented, not counted)

  • 1. GetElementProperties(parameter) and (input) are [] on head, as on base, for P::Base::assignCount, whileAct, loopAct, forAct, forNested, nested::innerAssign, P::Derived::assignMore and P::Redef::assignCount. Head Evaluate lists them: ["target", "replacementValues"], ["whileTest", "body"], ["whileTest", "body", "untilTest"], ["i", "seq", "body"], ["j", "seq", "body"]. So the two gRPC calls still disagree for these four forms; for if, send and accept they agree.
  • By qualified name, still not found on head (as on base), while Evaluate lists them: P::Base::whileAct::body, P::Base::loopAct::body, P::Base::forAct::body, P::Base::forAct::i, P::Base::assignCount::target. The changelog fragment states this for a loop's body; it does not name target or the loop variable.

Observations, not counted as failures

  • By id, P__Sys__msg__acc1___400 answers the element P__Sys__msg__acc1___401 (P::Sys::msg::acc1::receiver) on head; base: not found.
  • P::Sys::msg::acc1::payload is not found by name on either build (acc1::r is, unchanged).
  • Unchanged from base: GetElementProperties(parameter/input/output) of P::Base, P::Base::nested, P::Base::nested::inner.

Not run

  • REPL %eval and sysml -e; the second model (none of these constructs).
  • Default export, API-JSON ids, round trips, execution, gRPC Query / Convert / ExecuteAction / RenderView, LSP, the 300 fixtures, the diagram rows and .direction notes.
  • go build ./... (only make build and make build-grpc, both clean), go vet ./..., gofmt -l ., every -race package, go test ./....
  • Derived census, API-JSON differential and structure differential -check.

devin-ai-integration Bot and others added 3 commits November 26, 2026 09:54
… feature it redefines

A terminate's terminatedOccurrence, a loop's seq and body and an assignment's
target and replacementValues read by qualified name as the feature of the
action's kind they redefine, the same by that element's id, instead of
element not found. A for loop's variable reads as the parameter the loop owns.

Co-Authored-By: jason.han <hanhuijun@gmail.com>
…gh an inheriting type

The stated-parameter lookup compared the path's last segment as written, so a
quoted name never matched, and found the loop only where it is declared, so a
path through a type that inherits the loop answered element not found.

Co-Authored-By: Nicolas Rouquette <nicolas.f.rouquette@jpl.nasa.gov>
The stated-parameter lookup cut the path at its last `::` and removed only the
identity quoting, so a quoted variable name with an escape never matched. The
path is now split into the notation's segments, and the loop a member walk
finds must answer to the segment that names it.

Co-Authored-By: Nicolas Rouquette <nicolas.f.rouquette@jpl.nasa.gov>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant