Can views/linear types be used to represent resources besides memory?
For example, can I encode rules like “file descriptors must be closed to
be released” or “you can only read from a file descriptor open for
reading” with linear types? How would I go about doing that, if so?
Ah, thank you! The existence of abstract views was a key bit I was
missing.
Is ‘assume’ required to only occur once per program for abstract views?
That is, can I make a set of abstract views representing a file being
open, readable, writable, etc. and then ensure that only my
implementation can actually create instances of those views without a
praxi?
~SheaOn Fri, Aug 29, 2014 at 10:12:00PM -0700, gmhwxi wrote:
On Saturday, August 30, 2014 1:01:50 AM UTC-4, Shea Levy wrote:
Hi all,
Can views/linear types be used to represent resources besides memory?
For example, can I encode rules like “file descriptors must be closed to
be released” or “you can only read from a file descriptor open for
reading” with linear types? How would I go about doing that, if so?
Can views/linear types be used to represent resources besides memory?
For example, can I encode rules like “file descriptors must be closed to
be released” or “you can only read from a file descriptor open for
reading” with linear types? How would I go about doing that, if so?
Is ‘assume’ required to only occur once per program for abstract views?
Yes. If an absview (or abstype) is implemented more than once, then a
link-time error
will be reported.On Sat, Aug 30, 2014 at 1:51 AM, Shea Levy sh...@shealevy.com wrote:
Ah, thank you! The existence of abstract views was a key bit I was
missing.
Is ‘assume’ required to only occur once per program for abstract views?
That is, can I make a set of abstract views representing a file being
open, readable, writable, etc. and then ensure that only my
implementation can actually create instances of those views without a
praxi?
~Shea
On Fri, Aug 29, 2014 at 10:12:00PM -0700, gmhwxi wrote:
On Saturday, August 30, 2014 1:01:50 AM UTC-4, Shea Levy wrote:
Hi all,
Can views/linear types be used to represent resources besides memory?
For example, can I encode rules like “file descriptors must be closed
to
be released” or “you can only read from a file descriptor open for
reading” with linear types? How would I go about doing that, if so?