Is the `index` of a `MemOp` always a single witness index?

The ACVM code allows the index field to be an Expression involving of multiple witness indices (see below). However, in all the Noir code that I’ve compiled, the index Expression is always a single witness index. Can this be taken as guaranteed, or should downstream code be written to handle the general case?

pub struct MemOp<F> {
    /// A constant expression that can be 0 (read) or 1 (write)
    pub operation: Expression<F>,
    /// array index, it must be less than the array length
    pub index: Expression<F>,
    /// the value we are reading, when operation is 0, or the value we write at
    /// the specified index, when operation is 1
    pub value: Expression<F>,
}
1 Like