Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Data Structures in Fabricated Too Restrictive #35

Open
tmagrino opened this issue Mar 1, 2019 · 0 comments
Open

Data Structures in Fabricated Too Restrictive #35

tmagrino opened this issue Mar 1, 2019 · 0 comments

Comments

@tmagrino
Copy link
Member

tmagrino commented Mar 1, 2019

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant