Skip to content

LMAD slicing #2206

@athas

Description

@athas

It is time to support LMAD slicing properly. It works fine in the IR, but exposing it in the source language requires solving three problems:

  1. How do we bounds check them?
  2. How do we avoid doing in-place updates into slices that have strides of length zero (banning these is not an option)?
  3. What should the syntax be?

@coancea says that (1) is not difficult. I have an idea how how to do (2) by simply making it impossible to consume the result of an LMAD slice. This can be done using machinery similar to how we track aliases of top level constants (which also may not be consumed).

The syntax is clearly the most difficult part. In the papers, we use the notation A[L] where L is then an LMAD, but since LMAD notation is something like x+(o1,n1)...(o2,n2), that may be ambiguous with ordinary slicing (and it may also not be the syntax we want).

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions