Creating new effects?

74 views
Skip to first unread message

Shea Levy

unread,
Aug 30, 2014, 7:03:37 PM8/30/14
to ats-lan...@googlegroups.com
Hi all,

Is it possible to create new effects of sort eff? For example, none of
the existing cases at [1] seem to cover the side effects of the 'open'
system call, but that is surely not pure!

[1]: https://github.com/githwxi/ATS-Postiats/wiki/effects

~Shea

gmhwxi

unread,
Aug 30, 2014, 9:11:45 PM8/30/14
to ats-lan...@googlegroups.com
The sort 'eff' is currently not extensible.

The effect system in ATS is not meant to track effects like 'open'.
Tracking such effects makes programming intractable in general. The
primary use of the effect system in ATS is to ensure that an implemented
proof function is indeed pure.

Shea Levy

unread,
Aug 31, 2014, 2:18:27 PM8/31/14
to ats-lan...@googlegroups.com
Ah I see, thanks. Under what circumstances should I care about
explicitly annotating functions with their effects?

~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/f7eddf8a-ba78-4777-a0f1-4f63aa885472%40googlegroups.com.

Hongwei Xi

unread,
Aug 31, 2014, 2:27:29 PM8/31/14
to ats-lan...@googlegroups.com
It is hard to say.

I occasionally use effect-tracking to catch bugs causing non-termination.

When implementing (pure) algorithms, one may have the luxury to be very
thorough. In general, I think effect-tracking only works on code of very small
scale.



Shea Levy

unread,
Aug 31, 2014, 2:33:25 PM8/31/14
to ats-lan...@googlegroups.com
I see, thanks. I think for now I will just work without effect
annotations until I find a use case.

~Shea
> > https://groups.google.com/d/msgid/ats-lang-users/20140831181825.GD2237%40nixos.hsd1.nh.comcast.net
> > .
> >
>
> --
> 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/CAPPSPLrNzsokUcUHAy90tTWznjFaUNp%2BWFv8uevGQNcqZP2xCA%40mail.gmail.com.

gmhwxi

unread,
Aug 31, 2014, 2:41:12 PM8/31/14
to ats-lan...@googlegroups.com
I would say that is the right way to proceed.

ATS is feature-rich. It is very important to make sure that
you do not get distracted by features at this stage.

Yannick Duchêne

unread,
Sep 27, 2014, 10:15:55 PM9/27/14
to ats-lan...@googlegroups.com


Le dimanche 31 août 2014 03:11:45 UTC+2, gmhwxi a écrit :
The sort 'eff' is currently not extensible.

The effect system in ATS is not meant to track effects like 'open'.

Better use a linear type instead? 

Hongwei Xi

unread,
Sep 28, 2014, 10:58:16 AM9/28/14
to ats-lan...@googlegroups.com
Yes, using linear proofs (of views) is another possibility. Another possibility
is to adopt a monadic style of programming.


--
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.
Reply all
Reply to author
Forward
0 new messages