moose icon indicating copy to clipboard operation
moose copied to clipboard

Get rid of `Abstract` prefix for structs

Open mortendahl opened this issue 3 years ago • 2 comments

The Abstract prefix (as in AbstractReplicatedTensor and AbstractRingTensor) was introduced because of ReplicatedSetup: we could use ReplicatedTensor instead of AbstractReplicatedTensor since it doesn't clash with Replicated64Tensor and Replicated128Tensor, but we cannot use ReplicatedSetup instead of AbstractReplicatedSetup since we're also using ReplicatedSetup for AbstractReplicatedSetup<PrfKey>.

However, we have been talking about removing ReplicatedSetup as a Moose type (and only using it internally). If/when this happens we can likely get rid of all Abstract prefixes.

Note that there may also be other solutions we haven't explored.

mortendahl avatar Sep 01 '21 13:09 mortendahl

note that the new logical Tensor seems to have the same problem as ReplicatedSetup!

mortendahl avatar Sep 02 '21 08:09 mortendahl

The only non-enum type left with the Abstract prefix if AbstractHostAesKey

moose_type!(HostAesKey = AbstractHostAesKey<HostBitArray128>);
moose_type!(ReplicatedAesKey = RepAesKey<ReplicatedBitArray128>);

It would perhaps be nice to use name scoping so that we could do

moose_type!(HostAesKey = host::AesKey<HostBitArray128>);
moose_type!(ReplicatedAesKey = replicated::AesKey<ReplicatedBitArray128>);

mortendahl avatar Mar 23 '22 10:03 mortendahl