Skip to content

Data Structures in Fabricated Too Restrictive #35

Open

Description

@tmagrino

While working with @karannewatia on a project written in Fabric, I've noticed that there are some overly restrictive labels for various data structures in the fabricated.util package.

As a simple example, ArrayList and other Lists seem to assume that the label on the contents (the label parameter L) should also be the label on the List's size: https://github.com/apl-cornell/fabric/blob/master/src/lib/collections/src/fabricated/util/ArrayList.fab#L131. This and other related issues make it so that a List is generally required to be of the same confidentiality as the contents it holds.

Another place this shows up is the begin label of add: https://github.com/apl-cornell/fabric/blob/master/src/lib/collections/src/fabricated/util/AbstractList.fab#L61. Here, there appears to be an assumption that the code calling the add method should be running with a PC label that allows for modifying the item being added. This is overly restrictive: there are plenty of reasons to allow a list of elements that everyone can read but cannot write!

I believe we need to add more test cases for using these structures with structures labeled differently from their contents to determine whether the labels are flexible enough for reasonable use cases.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions