Views for resources other than memory?

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?

Thanks,
Shea

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:

Well, you have to use your imagination :slight_smile:

You can find some articles here:

http://www.ats-lang.org/EXAMPLE/EFFECTIVATS

This one is especially related:

http://www.ats-lang.org/EXAMPLE/EFFECTIVATS/Readers-and-Writers/main.html

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?

Thanks,
Shea


You received this message because you are subscribed to the Google Groups “ats-lang-users” group.
To unsubscribe from this group and stop receiving emails from it, send an email to ats-lang-user...@googlegroups.com.
To post to this group, send email to ats-lan...@googlegroups.com.
Visit this group at http://groups.google.com/group/ats-lang-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/ats-lang-users/35c5c987-93aa-47d3-b777-ec54920fe82f%40googlegroups.com.

Well, you have to use your imagination :slight_smile:

You can find some articles here:

http://www.ats-lang.org/EXAMPLE/EFFECTIVATS

This one is especially related:

http://www.ats-lang.org/EXAMPLE/EFFECTIVATS/Readers-and-Writers/main.htmlOn 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?

Thanks,
Shea

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:

Well, you have to use your imagination :slight_smile:

You can find some articles here:

http://www.ats-lang.org/EXAMPLE/EFFECTIVATS

This one is especially related:

http://www.ats-lang.org/EXAMPLE/EFFECTIVATS/Readers-and-Writers/main.html

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?

Thanks,
Shea


You received this message because you are subscribed to the Google
Groups “ats-lang-users” group.
To unsubscribe from this group and stop receiving emails from it, send
an email to ats-lang-user...@googlegroups.com.
To post to this group, send email to ats-lan...@googlegroups.com.
Visit this group at http://groups.google.com/group/ats-lang-users.
To view this discussion on the web visit
https://groups.google.com/d/msgid/ats-lang-users/35c5c987-93aa-47d3-b777-ec54920fe82f%40googlegroups.com
.


You received this message because you are subscribed to the Google Groups
“ats-lang-users” group.
To unsubscribe from this group and stop receiving emails from it, send an
email to ats-lang-user...@googlegroups.com.
To post to this group, send email to ats-lan...@googlegroups.com.
Visit this group at http://groups.google.com/group/ats-lang-users.
To view this discussion on the web visit
https://groups.google.com/d/msgid/ats-lang-users/20140830055128.GG9476%40nixos.hsd1.nh.comcast.net
.