Similar to the new representation of cons-cells, the representation of vectors in Scheme should be modified. Currently, in ModularSchemeLattice.scala, a vector and all its elements are represented as a single value in the store with the following representation:
case class Vec(size: I, elements: Map[I, L], init: L) extends Value
Ideally, the sub-values of a vector should each be stored at their own address, similar to how a separate address is allocated for the car and the cdr of each cons-cell. However, unlike with cons-cells, this modification will be non-trivial, because:
a vector can have an arbitrary number of elements
both the size and indices of a vector can use any arbitrary abstract integer domain
Similar to the new representation of cons-cells, the representation of vectors in Scheme should be modified. Currently, in
ModularSchemeLattice.scala
, a vector and all its elements are represented as a single value in the store with the following representation:case class Vec(size: I, elements: Map[I, L], init: L) extends Value
Ideally, the sub-values of a vector should each be stored at their own address, similar to how a separate address is allocated for the car and the cdr of each cons-cell. However, unlike with cons-cells, this modification will be non-trivial, because: