# Why does circuits\[1..\*\] not conform to Collections::Collection?

**URL:** <https://forum.sensmetry.com/t/why-does-circuits-1-not-conform-to-collections-collection/441>\
**Category:** Bug Reports\
**Created:** [April 11, 2026, 12:00pm UTC](https://forum.sensmetry.com/t/why-does-circuits-1-not-conform-to-collections-collection/441 "2026-04-11T12:00:20Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![gwagner](https://avatars.discourse-cdn.com/v4/letter/g/41988e/32.png) [@gwagner](https://forum.sensmetry.com/u/gwagner)\
**Post date:** [April 11, 2026, 12:00pm UTC](https://forum.sensmetry.com/t/why-does-circuits-1-not-conform-to-collections-collection/441/1 "2026-04-11T12:00:20Z")

</div>

I’ve defined a multi-valued property like so:

```auto
private import CollectionFunctions::size;
part circuits[1..*] : Circuit {
    redefines supplyVoltage = nominalVoltage;
    redefines ratedCurrent default = ElectricGrid::ratedCurrent / size( circuits);
}

```

Doesn’t _circuits_ represent a collection?

In Syside Modeler I get the error message “circuits does not conform to Collections::Collection“, while the error message disappears when I import the _size_ function from _SequenceFunctions_, although _circuits_ does not represent a sequence since it’s not ordered.

---

<div class="post-metadata">

**Author:** ![Daumantas](https://yyz2.discourse-cdn.com/flex008/user_avatar/forum.sensmetry.com/daumantas/32/19_2.png) [@Daumantas](https://forum.sensmetry.com/u/Daumantas)\
**Post date:** [April 13, 2026, 6:14am UTC](https://forum.sensmetry.com/t/why-does-circuits-1-not-conform-to-collections-collection/441/2 "2026-04-13T06:14:29Z")

</div>

> Doesn’t _circuits_ represent a collection?

No, it (and everything else) implicitly represents a `sequence`. A `collection` is a library type from [Collections](https://github.com/Systems-Modeling/SysML-v2-Release/blob/master/sysml.library/Kernel%20Libraries/Kernel%20Data%20Type%20Library/Collections.kerml#L15-L23).

---

<div class="post-metadata">

**Author:** ![gwagner](https://avatars.discourse-cdn.com/v4/letter/g/41988e/32.png) [@gwagner](https://forum.sensmetry.com/u/gwagner)\
**Post date:** [April 13, 2026, 8:01pm UTC](https://forum.sensmetry.com/t/why-does-circuits-1-not-conform-to-collections-collection/441/3 "2026-04-13T20:01:23Z")

</div>

But the multi-valued feature circuits[1..\*] is, by default, unique and unordered, so isn’t its value a unique (unordered) collection?

Do you know on which page the KerML spec defines

1. the concepts of a sequence and of sequence functions?
2. what is the value of an unordered multi-valued feature like circuits[1..\*]?

In fact, it’s quite confusing since

1. In the _Collections_ library, nonunique ordered collections are not called “sequences”, but “lists”.
2. In the _SequenceFunctions_ library, the input parameter of _size_ is not required to be ordered, while the input parameters of most other functions are required to be ordered.

---

<div class="post-metadata">

**Author:** ![Daumantas](https://yyz2.discourse-cdn.com/flex008/user_avatar/forum.sensmetry.com/daumantas/32/19_2.png) [@Daumantas](https://forum.sensmetry.com/u/Daumantas)\
**Post date:** [April 14, 2026, 6:24am UTC](https://forum.sensmetry.com/t/why-does-circuits-1-not-conform-to-collections-collection/441/4 "2026-04-14T06:24:57Z")

</div>

> [@gwagner](#):
>
> Do you know on which page the KerML spec defines
> 
> 1. the concepts of a sequence and of sequence functions?
> 2. what is the value of an unordered multi-valued feature like circuits[1..\*]?

Having had a look through the specification, `collection` seems to have a different meaning than the `Collection` used in the KerML library. In the specification, `collection` seems to be used as a term for any number of values, `sequence` - an ordered collection, and library `Collection` - [collections as elements of collections](https://github.com/Systems-Modeling/SysML-v2-Release/blob/master/sysml.library/Kernel%20Libraries/Kernel%20Data%20Type%20Library/Collections.kerml#L3-L7).

During evaluation, values will be evaluated as results of bound feature value expressions, or the features themselves otherwise. Yet another confusing aspect of the specification and grammar since both feature values and bodies are allowed on features. This is different to programming languages where values (similar to features) are only allowed to have expressions (feature values) assigned to them.

> [@gwagner](#):
>
> In fact, it’s quite confusing since
> 
> 1. In the _Collections_ library, nonunique ordered collections are not called “sequences”, but “lists”.
> 2. In the _SequenceFunctions_ library, the input parameter of _size_ is not required to be ordered, while the input parameters of most other functions are required to be ordered.

There is also an `OrderedCollection`, `List` is just subclassification (new type) of it. Collections are more like container data structures used in programming languages, while sequences are the implicitly constructed arrays/lists/vectors of elements. All values in KerML/SysML are implicitly sequences:

- `null` - an empty sequence
- `1` - a sequence of size 1
- `(1, 2)` - a sequence of size 2 etc.

That is only one confusing part of the specification, there are many more. Like `self`, `this`, and `that` defined as library features instead of keywords despite having semantic meaning.

---

<div class="post-metadata">

**Author:** ![gwagner](https://avatars.discourse-cdn.com/v4/letter/g/41988e/32.png) [@gwagner](https://forum.sensmetry.com/u/gwagner)\
**Post date:** [April 14, 2026, 9:26am UTC](https://forum.sensmetry.com/t/why-does-circuits-1-not-conform-to-collections-collection/441/5 "2026-04-14T09:26:35Z")

</div>

Thanks for your answer.

I’ll post a question about this for Ed Seidewitz.
