Open rebcabin opened 1 year ago
identifier*
in ASDL is an ordered list and it can have duplicates.
In practice, we use (using the terminology from the next comment below):
identifier* dependencies
(in most symbol
s) and that is indeed a set, so unordered unique collection of names.identifier* scope_names
in ExternalSymbol
that is ordered list and can have duplicatesidentifier* members
in StructType
, EnumType
, UnionType
which is ordered but cannot have duplicatesOk, great. The type identifier*
is not sufficiently discriminating. There exist four (and only four) collection types:
#{...}
[]
, ()
I'll add these to MASR so we can have precise, discriminating types for collections.
Lengthy explanation of the four collection types
There may be some lessons on ASR->ASR transformations and optimization in there.
(that tutorial summarizes about 20,000 PhD theses from the 1980's, when monoids were in fashion for understanding databases. Monoids are no longer in fashion and one most likely not earn a PhD even for a novel discovery in monoid.)
(I claim that, while mathematical, the treatise has practical ramifications on the efficient calculation of queries, such as the requirement for hash-tables for operations on suits [permutations]).
fixed in main
c0080c0 (HEAD -> main, origin/main, origin/HEAD) identifier-suit
e6af185 add identifier-list
0811a05 bug fix identifier-set
I updated my comment above (https://github.com/rebcabin/masr/issues/1#issuecomment-1502442677) to add the terminology from your comment.
reopening as documentation reminder as requested by @certik
I'm assuming that
dimension*
is an ordered collection ofdimension
instances. I'll also assume thatidentifier*
is an unordered collection ofidentifier
instances with no duplicates, i.e., a set. @lcompilers, please close this issue ifidentifier*
should be a set, otherwise discuss :)