Commit 47fef42
[4.1] The ruling reaches the AST accessor too; [4.4] count coherence
Two corrections from Reid, both of which I had got wrong.
[4.1] REACHES FURTHER than I implemented. Reid: *"Is an entity with
portlets a streamlet? Yes, it is. Is a projector with inlets and
outlets a streamlet? Yes it is. So when a definition includes
WithStreamlets, it includes all the processor definitions in its
purview that have portlets."* I had deliberately left
`WithStreamlets.streamlets` alone and asked whether it was in scope; it
was.
So a streamlet is now defined by a NON-ZERO PORTLET COUNT, not by which
keyword declared it — and that definition is applied everywhere,
including narrowing the three output accessors I had over-widened to
"all processors" yesterday.
`checkStreaming` needed nothing: `StreamingValidation` was already
widened to every Processor kind in 70b0f52. The accessor was the last
narrow piece.
ONE RULE WAS RIDING ON THE OLD NARROWNESS and had to be written out.
The "context with entities needs a Sink" check tested
`c.streamlets.exists(_.inlets.nonEmpty)`, and its own suggestion says
"an entity's own inlet does not satisfy this — driving an entity from
outside IS an inbound stream and belongs at the context boundary". Once
entities became streamlets, an entity inlet would have satisfied it
silently. The exclusion is now in the code, not just the prose.
The consequence to know: a PORTLESS processor is not a streamlet,
including a stubbed or `void` Streamlet. Three tests asserted the old
meaning and now say what they mean — `source src is { ??? }` has no
ports, so it is a Streamlet declaration but not a streamlet. Data-flow
diagrams keep portless Streamlet stubs in the GATE (so a stub context
does not lose its diagram) while keeping them out of the DATA.
[4.4] I measured the wrong thing. Reid: *"they shouldn't drop if the
shape is consistent with the number of inlets and outlets; having those
line up is AN INDICATOR of maturity."* I had counted
`ascribedShape.nonEmpty`, which scores whether the author TYPED
something rather than whether the model hangs together, and would have
penalised every correct model that leaves the shape implicit. It now
scores COHERENCE: an ascription that matches the arity counts, an
absent one counts (it cannot disagree), a contradicting one does not.
Compared by KEYWORD, not `==`: `StreamletShape` carries a `loc` and
`arityShape` builds one at the processor's location, so `==` would have
been false for every processor alive — a corpus-wide maturity collapse
that would have looked like a finding.
language 731, passes 1453, riddlLib 144, commands 245 green; corpus
validation-parity holds at 190/190.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>1 parent 1c4dc1f commit 47fef42
11 files changed
Lines changed: 97 additions & 40 deletions
File tree
- language/src
- main/scala/com/ossuminc/riddl/language
- test/scala/com/ossuminc/riddl/language
- parsing
- passes/src
- main/scala/com/ossuminc/riddl/passes
- analysis
- diagrams
- stats
- validate
- test/scala-jvm-native/com/ossuminc/riddl/passes
- analysis
- resolve
- validate
Lines changed: 19 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
749 | 749 | | |
750 | 750 | | |
751 | 751 | | |
752 | | - | |
753 | | - | |
| 752 | + | |
| 753 | + | |
| 754 | + | |
| 755 | + | |
| 756 | + | |
| 757 | + | |
| 758 | + | |
| 759 | + | |
| 760 | + | |
| 761 | + | |
| 762 | + | |
| 763 | + | |
| 764 | + | |
| 765 | + | |
| 766 | + | |
| 767 | + | |
| 768 | + | |
| 769 | + | |
| 770 | + | |
754 | 771 | | |
755 | 772 | | |
756 | 773 | | |
| |||
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
559 | 559 | | |
560 | 560 | | |
561 | 561 | | |
| 562 | + | |
562 | 563 | | |
563 | 564 | | |
564 | 565 | | |
| |||
Lines changed: 6 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
151 | 151 | | |
152 | 152 | | |
153 | 153 | | |
154 | | - | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
155 | 160 | | |
156 | 161 | | |
157 | 162 | | |
| |||
Lines changed: 4 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
262 | 262 | | |
263 | 263 | | |
264 | 264 | | |
265 | | - | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
266 | 269 | | |
267 | 270 | | |
268 | 271 | | |
| |||
Lines changed: 4 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
189 | 189 | | |
190 | 190 | | |
191 | 191 | | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
192 | 195 | | |
193 | 196 | | |
194 | 197 | | |
195 | 198 | | |
196 | | - | |
| 199 | + | |
197 | 200 | | |
198 | 201 | | |
199 | 202 | | |
| |||
Lines changed: 14 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
499 | 499 | | |
500 | 500 | | |
501 | 501 | | |
502 | | - | |
503 | | - | |
504 | | - | |
505 | | - | |
506 | | - | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
507 | 507 | | |
508 | 508 | | |
509 | 509 | | |
| |||
526 | 526 | | |
527 | 527 | | |
528 | 528 | | |
529 | | - | |
530 | | - | |
531 | | - | |
532 | | - | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
533 | 537 | | |
534 | 538 | | |
535 | | - | |
| 539 | + | |
536 | 540 | | |
537 | 541 | | |
538 | 542 | | |
| |||
Lines changed: 18 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
406 | 406 | | |
407 | 407 | | |
408 | 408 | | |
409 | | - | |
410 | | - | |
411 | | - | |
412 | | - | |
413 | | - | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
414 | 412 | | |
415 | | - | |
416 | | - | |
417 | | - | |
418 | | - | |
419 | | - | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
420 | 428 | | |
421 | 429 | | |
422 | 430 | | |
| |||
Lines changed: 14 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
99 | 99 | | |
100 | 100 | | |
101 | 101 | | |
102 | | - | |
103 | | - | |
104 | | - | |
105 | | - | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
106 | 107 | | |
107 | 108 | | |
108 | 109 | | |
| |||
4526 | 4527 | | |
4527 | 4528 | | |
4528 | 4529 | | |
4529 | | - | |
| 4530 | + | |
| 4531 | + | |
| 4532 | + | |
| 4533 | + | |
| 4534 | + | |
| 4535 | + | |
| 4536 | + | |
| 4537 | + | |
| 4538 | + | |
4530 | 4539 | | |
4531 | 4540 | | |
4532 | 4541 | | |
| |||
Lines changed: 6 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
128 | 128 | | |
129 | 129 | | |
130 | 130 | | |
131 | | - | |
132 | | - | |
133 | | - | |
134 | | - | |
135 | | - | |
136 | | - | |
137 | | - | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
138 | 137 | | |
139 | 138 | | |
140 | 139 | | |
| |||
Lines changed: 4 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
79 | 79 | | |
80 | 80 | | |
81 | 81 | | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
82 | 85 | | |
83 | 86 | | |
84 | | - | |
| 87 | + | |
85 | 88 | | |
86 | 89 | | |
87 | 90 | | |
| |||
0 commit comments