public ArrayVariant([NotNull] Variable value, [NotNull] AnalysisContext context) : base(value, context)
        {
            Value      = new DataValueArray(Array.Empty <LogicExpressionBase>());
            IndexRange = ValueInterval.Empty;

            if (!(value.TypeRef is ArrayTypeRef arrayTypeRef))
            {
                Log.Error("ArrayVariant expects ArrayTypeRef, not {Type}", value.TypeRef);
                return;
            }

            if (!(arrayTypeRef.Length is OrderedLiteralBase length))
            {
                Log.Information("ArrayVariant expects OrderedLiteralBase as length, not {Type}",
                                arrayTypeRef.Length);
                return;
            }

            IndexRange = new ValueInterval(IntegerLiteral.Zero, length, toInclusive: false);
            foreach (var i in IndexRange.Iterate(IntegerLiteral.One))
            {
                var itemVariant = new ArrayItemVariant(value,
                                                       InnerTypeRef,
                                                       ValueInterval.Single(i),
                                                       context);
                this[context, i] = itemVariant;
            }
        }
 private ArrayItemVariant([NotNull] ArrayItemVariant clone, [NotNull] AnalysisContext context)
     : base(clone, context)
 {
     if (clone == null)
     {
         throw new ArgumentNullException(nameof(clone));
     }
     Value = clone.Value;
 }